| | |
| | | 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")) |
| | | // { |
| | | // } |
| | | |
| | | // 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); |
| | | // } |
| | | |
| | | // base.OnLoad(e); |
| | | // throw new Exception("1"); |
| | | //} |
| | | 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); |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/"); |
| | | string sql; |
| | | DateTime date = Convert.ToDateTime(this.Model.GetValue("F_Paez_Date")); |
| | | //获取单据体信息 |