private void InitEvent() { caswsc = new SmtOADocumentAdminClient(); selecContractInfoObj = new V_ContractPrint(); caswsc.GetInquiryContractPrintingRecordInfoCompleted += new EventHandler<GetInquiryContractPrintingRecordInfoCompletedEventArgs>(caswsc_GetInquiryContractPrintingRecordInfoCompleted); LoadData(); }
private void InitEvent() { caswsc = new SmtOADocumentAdminClient(); selecContractInfoObj = new V_ContractPrint(); caswsc.GetInquiryContractPrintingRecordInfoCompleted += new EventHandler <GetInquiryContractPrintingRecordInfoCompletedEventArgs>(caswsc_GetInquiryContractPrintingRecordInfoCompleted); LoadData(); }
private void Select() { string strLeaveTypeSetID = string.Empty; if (DaGr.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "PRINT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (DaGr.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "PRINT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } V_ContractPrint contractApplications = new V_ContractPrint(); contractApplications.contractApp = DaGr.SelectedItem as V_ContractApplications; contractApplications.contractPrint = null; //ContractPrintUploadControl AddWin = new ContractPrintUploadControl(Action.Print, contractApplications); //EntityBrowser browser = new EntityBrowser(AddWin); //browser.MinWidth = 550; //browser.MinHeight = 430; //browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); //browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); RefreshUI(RefreshedTypes.Close); }
[OperationContract]//根据ID获取合同申请(打印) public V_ContractPrint GetContractPrintingById(string contractPrintinglID) { using (ContractApprovalBLL cab = new ContractApprovalBLL()) { V_ContractPrint ContractPrinting = cab.GetContractPrintingById(contractPrintinglID); return(ContractPrinting == null ? null : ContractPrinting); } }
private void browser_ReloadDataEvent() { if (viewForm.selecContractInfoObj != null) { cprintingObj = viewForm.selecContractInfoObj; GetContractPrint(cprintingObj); } }
private void Save() { if (DaGr.SelectedItem != null) { V_ContractPrint tmp = DaGr.SelectedItem as V_ContractPrint; selecContractInfoObj = tmp; } RefreshUI(RefreshedTypes.CloseAndReloadData); }
private void DaGr_LoadingRow(object sender, DataGridRowEventArgs e) { V_ContractPrint tmp = (V_ContractPrint)e.Row.DataContext; SetRowLogo(DaGr, e.Row, "T_OA_CONTRACTPRINT"); ImageButton MyButton_Addbaodao = DaGr.Columns[11].GetCellContent(e.Row).FindName("myBtn") as ImageButton; MyButton_Addbaodao.Margin = new Thickness(0); MyButton_Addbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", Utility.GetResourceStr("UPLOADACCESSORY")); MyButton_Addbaodao.Tag = tmp; }
private void myBtn_Click(object sender, RoutedEventArgs e) { V_ContractPrint contractApplications = DaGr.SelectedItem as V_ContractPrint; ContractPrintUploadControl AddWin = new ContractPrintUploadControl(Action.FromAnnex, contractApplications); EntityBrowser browser = new EntityBrowser(AddWin); browser.MinWidth = 580; browser.MinHeight = 480; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); }
private void GetContractPrint(V_ContractPrint contractPrint) { if (cprinting != null) { if (!string.IsNullOrEmpty(contractPrint.contractApp.contractApp.CONTRACTTITLE)) { ContractTitle.Text = contractPrint.contractApp.contractApp.CONTRACTTITLE;//标题 } cprinting = contractPrint.contractPrint; ctapp = contractPrint.contractApp.contractApp; ContractID.SelectedText = contractPrint.contractApp.contractApp.CONTRACTCODE; //合同编号 ContractTitle.Text = contractPrint.contractApp.contractApp.CONTRACTTITLE; //标题 } }
//private void UploadFiles() //{ // System.Windows.Controls.OpenFileDialog openFileWindow = new OpenFileDialog(); // openFileWindow.Multiselect = true; // if (openFileWindow.ShowDialog() == true) // foreach (FileInfo file in openFileWindow.Files) // ctrFile.InitFiles(file.Name, file.OpenRead()); //} //void ctrFile_Event_AllFilesFinished(object sender, SMT.SaaS.FrameworkUI.FileUpload.FileCountEventArgs e) //{ // RefreshUI(RefreshedTypes.HideProgressBar); //} #endregion #region GetSelectContractPrint private void GetSelectContractPrint(V_ContractPrint cprintingContract) { if (cprinting != null) { if (!string.IsNullOrEmpty(cprintingContract.contractApp.contractApp.CONTRACTTITLE)) { ContractTitle.Text = cprintingContract.contractApp.contractApp.CONTRACTTITLE; //标题 } cprinting = cprintingContract.contractPrint; //打印 ctapp = cprintingContract.contractApp.contractApp; ContractID.SelectedText = cprintingContract.contractApp.contractApp.CONTRACTCODE; //合同编号 ContractLevel.SelectedIndex = Convert.ToInt32(cprintingContract.contractApp.contractApp.CONTRACTLEVEL); //级别 ContractTitle.Text = cprintingContract.contractApp.contractApp.CONTRACTTITLE; //标题 StartTime.Text = cprintingContract.contractApp.contractApp.STARTDATE.ToString(); //开始时间 EndTime.Text = cprintingContract.contractApp.contractApp.ENDDATE.ToString(); //结束时间 //ContractText.RichTextBoxContext = cprintingContract.contractApp.contractApp.CONTENT; Party.Add(cprintingContract.contractApp.contractApp.PARTYA); //甲方 Party.Add(cprintingContract.contractApp.contractApp.PARTYB); //乙方 personclient.GetEmployeeByIDsAsync(Party); switch (cprintingContract.contractApp.contractApp.CONTRACTFLAG) //申请标志 { case "0": this.RbtNo.IsChecked = false; this.rbtYes.IsChecked = true; break; case "1": this.RbtNo.IsChecked = true; this.rbtYes.IsChecked = false; break; } } }
public ContractPrintUploadControl(Action action, V_ContractPrint AppObj) { actions = action; InitializeComponent(); this.Loaded += (sender, args) => { #region 原来的 InitEvent(); Utility.CbxItemBinders(ContractLevel, "CONTRACTLEVEL", "0"); this.StartTime.Text = DateTime.Now.ToString(); this.EndTime.Text = DateTime.Now.ToString(); combox_SelectSource(); if (action == Action.Read || action == Action.FromAnnex) { GetSelectContractPrint(AppObj); if (AppObj.contractPrint.SIGNDATE != null) { this.DateSigned.Text = AppObj.contractPrint.SIGNDATE.ToString();//合同签订日期 } else { this.DateSigned.Text = string.Empty; } this.nudBalanceMonth.Value = Convert.ToInt32(AppObj.contractPrint.NUM);//打印份数 } if (action == Action.Read) { ContractFromAnnex(); this.DateSigned.IsEnabled = false; //this.ctrFile.IsEnabled = false; if (AppObj.contractPrint.SIGNDATE != null) { this.DateSigned.Text = AppObj.contractPrint.SIGNDATE.ToString();//合同签订日期 } else { this.DateSigned.Text = string.Empty; } } if (action == Action.Print) { this.DateSigned.Text = string.Empty; ContractPrint(); } if (action == Action.FromAnnex) { if (AppObj.contractPrint.SIGNDATE != null) { this.DateSigned.Text = AppObj.contractPrint.SIGNDATE.ToString();//合同签订日期 } else { this.DateSigned.Text = string.Empty; } ContractFromAnnex(); } //ctrFile.SystemName = "OA"; //ctrFile.ModelName = "Contract"; //ctrFile.InitBtn(Visibility.Collapsed, Visibility.Collapsed); //ctrFile.Event_AllFilesFinished += new EventHandler<SMT.SaaS.FrameworkUI.FileUpload.FileCountEventArgs>(ctrFile_Event_AllFilesFinished); #endregion }; }
private void GetContractPrint(V_ContractPrint contractPrint) { if (cprinting != null) { if (!string.IsNullOrEmpty(contractPrint.contractApp.contractApp.CONTRACTTITLE)) { ContractTitle.Text = contractPrint.contractApp.contractApp.CONTRACTTITLE;//标题 } cprinting = contractPrint.contractPrint; ctapp = contractPrint.contractApp.contractApp; ContractID.SelectedText = contractPrint.contractApp.contractApp.CONTRACTCODE;//合同编号 ContractTitle.Text = contractPrint.contractApp.contractApp.CONTRACTTITLE;//标题 } }