王 垚
2021-03-19 2a2e3fbbef29bbc568b10f2bd45bd6e658443d6e
src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs
@@ -12,73 +12,37 @@
using System.ComponentModel;
using System.Data;
using Newtonsoft.Json.Linq;
using ZD.Cloud.WebApi;
using ZD.Cloud.Logger;
using Demo.Model.Model;
using ZD.Share.Common;
using System.Linq;
using Demo.Utility;
namespace Demo.BillView.PRD
{
    [Description("生产日计划导入")]
    [HotUpdate]
    public class Pro_ScDayImport : AbstractDynamicFormPlugIn
    {
        CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
        private string fileFullPath = string.Empty;
        //public override void BarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
        //public override void OnLoad(EventArgs e)
        //{
        //    base.BarItemClick(e);
        //    if (e.BarItemKey.ToUpper().Equals("TBIMPORT"))
        //    {
        //    base.OnLoad(e);
        //    throw new Exception("1");
        //    }
        //    if (e.BarItemKey.ToUpper().Equals("TBWJSC"))
        //    {
        //        //Control updateControl = this.View.GetControl("fileFullPath");
        //        //// 上传地址
        //        //string uploadUrl = "FileUpLoadServices/FileService.svc/upload2attachment/";
        //        //updateControl.SetCustomPropertyValue("ExtandUrl", uploadUrl);
        //        //// 下载地址
        //        //string downloadUrl = "FileUpLoadServices/download.aspx";
        //        //updateControl.SetCustomPropertyValue("ExDownLoadUrl", downloadUrl);
        //        ImportData(fileFullPath);
        //    }
        //}
        public override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            throw new Exception("1");
        }
        public override void BarItemClick(BarItemClickEventArgs e)
        {
            base.BarItemClick(e);
            throw new Exception("1");
            LogHelper.Info("导入功能点击按钮:");
            if (e.BarItemKey.ToUpper().Equals("TBIMPORT"))
            {
                this.View.ShowErrMessage("测试导入功能点击按钮");
                LogHelper.Info("导入功能点击按钮:");
                ImportData();
                //this.View.ShowErrMessage("测试导入功能点击按钮");
            }
            if (e.BarItemKey.ToUpper().Equals("TBWJSC"))
            {
                this.View.ShowErrMessage("测试文件上传功能点击按钮");
                //Control updateControl = this.View.GetControl("fileFullPath");
                //// 上传地址
                //string uploadUrl = "FileUpLoadServices/FileService.svc/upload2attachment/";
                //updateControl.SetCustomPropertyValue("ExtandUrl", uploadUrl);
                //// 下载地址
                //string downloadUrl = "FileUpLoadServices/download.aspx";
                //updateControl.SetCustomPropertyValue("ExDownLoadUrl", downloadUrl);
                LogHelper.Info("文件上传功能点击按钮:");
                ImportDataSC(fileFullPath);
            }
@@ -260,6 +224,7 @@
        {
            try
            {
                CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
                string sql;
                DateTime date = Convert.ToDateTime(this.Model.GetValue("F_Paez_Date"));
                //获取单据体信息