private string tmpStrcbxProritity = ""; //缓急 //private SmtOACommonOfficeClient SendDocClient = new SmtOACommonOfficeClient(); void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { //T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; this.tbldepartment.Text = senddoc.DEPARTID; SelectDocType = senddoc.T_OA_SENDDOCTYPE; this.tbldoctype.Text = SelectDocType.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; this.tblnum.Text = DocNum;//获取新的公文编号senddoc.NUM; this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.OWNERDEPARTMENTID); string StrState = ""; string StrSave = ""; tmpStrcbxGrade = senddoc.GRADED; tmpStrcbxProritity = senddoc.PRIORITIES; string StrPublish = ""; if (!string.IsNullOrEmpty(senddoc.PUBLISHDATE.ToString())) { StrPublish = System.Convert.ToDateTime(senddoc.PUBLISHDATE.ToString()).ToShortDateString() + "印发"; } if (!string.IsNullOrEmpty(senddoc.CREATEDATE.ToString())) { this.tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE.ToString()).ToShortDateString().Replace("/", "-"); } //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(GridInfo,16); //} this.tblKeyWord.Text = senddoc.KEYWORDS; this.tblStatus.Text = "待发布"; tblPublishDate.Text = DocPublishDate; //if (!string.IsNullOrEmpty(StrPublish)) //{ // this.tblPublishDate.Text = DocPublishDate.Substring(0, 4) + "年" + DocPublishDate.Substring(5, 2) + "月" + DocPublishDate.Substring(8, 2) + "日印发"; //} //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { senddoc = e.Result; //ctrFile.Load_fileData(senddoc.SENDDOCID); this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; tblcontent.HideControls(); this.tbldepartment.Text = senddoc.DEPARTID; this.tbldoctype.Text = senddoc.T_OA_SENDDOCTYPE.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; string StrPublish = ""; //if(!string.IsNullOrEmpty(senddoc.PUBLISHDATE.ToString())) //{ // StrPublish = System.Convert.ToDateTime(senddoc.PUBLISHDATE.ToString()).ToShortDateString(); //} if (!string.IsNullOrEmpty(senddoc.CREATEDATE.ToString())) { this.tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE.ToString()).ToShortDateString();; } //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(GridInfo,16); //} if (senddoc.PUBLISHDATE != null) { this.tblPublishDate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToLongDateString() + "印发"; //StrPublish = dt.ToString("yyyymmdd"); } //this.tblupdatedate.Text = obj.OACompanySendDoc.UPDATEDATE.ToString(); //senddoctab.TabStripPlacement = Dock.Left; this.tblKeyWord.Text = senddoc.KEYWORDS; this.tblStatus.Text = "发布"; this.tblnum.Text = senddoc.NUM; this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.OWNERDEPARTMENTID); //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
//private SmtOACommonOfficeClient SendDocClient = new SmtOACommonOfficeClient(); void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; tmpSendDoc = e.Result; this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; this.tbldepartment.Text = senddoc.DEPARTID; SelectDocType = senddoc.T_OA_SENDDOCTYPE; this.tbldoctype.Text = SelectDocType.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; this.tblnum.Text = senddoc.NUM; personClient.GetEmployeeByIDAsync(senddoc.OWNERID); this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.OWNERDEPARTMENTID); string StrState = ""; string StrSave = ""; tmpStrcbxGrade = senddoc.GRADED; tmpStrcbxProritity = senddoc.PRIORITIES; if (senddoc.PUBLISHDATE != null) { //tbladddate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortDateString() + " " + System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortTimeString(); tbladddate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToString("d") + " " + System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortTimeString(); } RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
void DocDistrbuteClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { //T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); //senddoc = e.Result; //txtContent.RichTextBoxContext = e.Result.CONTENT; tmpdoc.CREATEDATE = e.Result.CREATEDATE; tmpdoc.CREATEUSERNAME = e.Result.CREATEUSERNAME; tmpdoc.CONTENT = e.Result.CONTENT; tmpdoc.UPDATEUSERID = e.Result.UPDATEUSERID; tmpdoc.UPDATEUSERNAME = e.Result.UPDATEUSERNAME; //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(GridInfo,7); //} } } } }
//private SmtOACommonOfficeClient SendDocClient = new SmtOACommonOfficeClient(); void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; tmpSendDoc = e.Result; this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; this.tbldepartment.Text = senddoc.DEPARTID; SelectDocType = senddoc.T_OA_SENDDOCTYPE; this.tbldoctype.Text = SelectDocType.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; this.tblnum.Text = senddoc.NUM; personClient.GetEmployeeByIDAsync(senddoc.OWNERID); this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.OWNERDEPARTMENTID); string StrState = ""; string StrSave = ""; tmpStrcbxGrade = senddoc.GRADED; tmpStrcbxProritity = senddoc.PRIORITIES; if (senddoc.PUBLISHDATE !=null) { //tbladddate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortDateString() + " " + System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortTimeString(); tbladddate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToString("d") + " " + System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortTimeString(); } RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
void DetailSendClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; tmpSendDocT = senddoc; this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; this.tbldepartment.Text = senddoc.DEPARTID; this.tbldoctype.Text = tmptype.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; this.tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE).ToShortDateString(); //this.tblupdatedate.Text = senddoc.UPDATEDATE.ToString(); //senddoctab.TabStripPlacement = Dock.Left; //if (!ctrFile._files.HasAccessory) // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(DocInfo,16); this.tblnum.Text = senddoc.NUM; this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; //GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.DEPARTID); string StrState = ""; string StrSave = ""; string Strdistrbute = ""; switch (senddoc.CHECKSTATE) { case "0": StrState = "未提交"; senddoctab.Items.Remove(senddoctab.Items[2]); break; case "1": StrState = "审核中"; InitAudit(senddoc); senddoctab.Items.Remove(senddoctab.Items[1]); break; case "2": StrState = "审核通过"; InitAudit(senddoc); break; case "3": StrState = "审核未通过"; senddoctab.Items.Remove(senddoctab.Items[1]); InitAudit(senddoc); break; } switch (senddoc.ISSAVE) { case "0": StrSave = "未归档"; //this.spDistrbuteDetail.Visibility = Visibility.Collapsed; break; case "1": StrSave = "已归档"; //获取发文的详细信息 //this.spDistrbuteDetail.Visibility = Visibility.Visible; DetailSendClient.GetDocDistrbuteInfosCompleted += new EventHandler <GetDocDistrbuteInfosCompletedEventArgs>(DetailSendClient_GetDocDistrbuteInfosCompleted); DetailSendClient.GetDocDistrbuteInfosAsync(senddoc.SENDDOCID); break; } switch (senddoc.ISDISTRIBUTE) { case "0": Strdistrbute = "未发布"; break; case "1": Strdistrbute = "已发布"; break; } //this.tbldistrbute.Text =Strdistrbute; //this.tblsave.Text = StrSave; if (senddoc.PUBLISHDATE != null) { this.tblPublishDate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToLongDateString() + "印发"; } this.tblKeyWord.Text = senddoc.KEYWORDS; this.tblStatus.Text = StrState; //audit.IsEnabled = false; RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { senddoc = e.Result; //ctrFile.Load_fileData(senddoc.SENDDOCID); this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; tblcontent.HideControls(); this.tbldepartment.Text = senddoc.DEPARTID; this.tbldoctype.Text = senddoc.T_OA_SENDDOCTYPE.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; string StrPublish = ""; //if(!string.IsNullOrEmpty(senddoc.PUBLISHDATE.ToString())) //{ // StrPublish = System.Convert.ToDateTime(senddoc.PUBLISHDATE.ToString()).ToShortDateString(); //} if (!string.IsNullOrEmpty(senddoc.CREATEDATE.ToString())) { this.tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE.ToString()).ToShortDateString(); ; } //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(GridInfo,16); //} if (senddoc.PUBLISHDATE != null) { this.tblPublishDate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToLongDateString()+"印发"; //StrPublish = dt.ToString("yyyymmdd"); } //this.tblupdatedate.Text = obj.OACompanySendDoc.UPDATEDATE.ToString(); //senddoctab.TabStripPlacement = Dock.Left; this.tblKeyWord.Text = senddoc.KEYWORDS; this.tblStatus.Text = "发布"; this.tblnum.Text = senddoc.NUM; this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.OWNERDEPARTMENTID); //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
//private SmtOACommonOfficeClient SendDocClient = new SmtOACommonOfficeClient(); void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { loadbar.Stop(); //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { senddoc = e.Result; publicClient.GetContentAsync(senddoc.SENDDOCID); this.tbltitle.Text = string.IsNullOrEmpty(senddoc.SENDDOCTITLE) ? "":senddoc.SENDDOCTITLE; this.tblsend.Text = string.IsNullOrEmpty( senddoc.SEND) ? "":senddoc.SEND; this.tblcopy.Text =string.IsNullOrEmpty( senddoc.CC) ? "":senddoc.CC; //tblcontent.Document = senddoc.CONTENT; //this.tbldepartment.Text = senddoc.DEPARTID; SelectDocType = senddoc.T_OA_SENDDOCTYPE; if (SelectDocType != null) { this.tbldoctype.Text = SelectDocType.SENDDOCTYPE; } this.tblprioritity.Text =string.IsNullOrEmpty( senddoc.PRIORITIES) ? "":senddoc.PRIORITIES; this.tblgrade.Text = string.IsNullOrEmpty(senddoc.GRADED) ? "":senddoc.GRADED; tblKeyWord.Text = string.IsNullOrEmpty(senddoc.KEYWORDS) ? "":senddoc.KEYWORDS; if (string.IsNullOrEmpty(DocNum)) { this.tblnum.Text = senddoc.NUM; } else { this.tblnum.Text = DocNum; } this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetDepartmentName(senddoc.DEPARTID); string StrState = ""; string StrSave = ""; tmpStrcbxGrade = senddoc.GRADED; tmpStrcbxProritity = senddoc.PRIORITIES; //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 16); //} if (senddoc.ISREDDOC == "0") { SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 6); SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 7); SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 8); } if (senddoc.CREATEDATE !=null) { //tbladddate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortDateString() + " " + System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortTimeString(); tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE).ToShortDateString() + " " + System.Convert.ToDateTime(senddoc.CREATEDATE).ToShortTimeString(); } if (string.IsNullOrEmpty(DocPublishDate)) { this.tblPublishDate.Text = DocPublishDate; } else { if (senddoc.PUBLISHDATE != null) { this.tblPublishDate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToLongDateString() + "印发"; //StrPublish = dt.ToString("yyyymmdd"); } } if (senddoc.ISDISTRIBUTE == "1") { this.tblStatus.Text = "已发布"; } else { this.tblStatus.Text = "未发布"; } if (!string.IsNullOrEmpty(senddoc.OWNERNAME)) { tbladduser.Text = senddoc.OWNERNAME; } //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; tmpSendDocT = senddoc; ShowDistributButton(); //HideDistributeButton(); if (tmpSendDocT.ISREDDOC == "0") { tmpIsRed = "否"; } else { tmpIsRed = "是"; } //personClient.getemployee personClient.GetEmployeePostBriefByEmployeeIDAsync(tmpSendDocT.OWNERID); //personClient.GetEmployeeDetailByIDAsync(tmpSendDocT.OWNERID); GetDepartmentNameByDepartmentID(tmpSendDocT.DEPARTID); this.txtZhuSend.Text = string.IsNullOrEmpty(tmpSendDocT.SEND) ? "" : tmpSendDocT.SEND; this.txtChaoSend.Text = string.IsNullOrEmpty(tmpSendDocT.CC) ? "" : tmpSendDocT.CC; if (!string.IsNullOrEmpty(tmpSendDocT.TEL)) { this.txtTel.Text = tmpSendDocT.TEL; } this.txtTemplateTitle.Text = string.IsNullOrEmpty(tmpSendDocT.SENDDOCTITLE) ? "" : tmpSendDocT.SENDDOCTITLE; this.txtNUM.Text = string.IsNullOrEmpty(tmpSendDocT.NUM) ? "" : tmpSendDocT.NUM; if (tmpSendDocT.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString() || tmpSendDocT.CHECKSTATE == Convert.ToInt32(CheckStates.UnApproved).ToString()) { RefreshUI(RefreshedTypes.All); } switch (tmpSendDocT.ISREDDOC) { case "0": this.RbtNo.IsChecked = true; this.rbtYes.IsChecked = false; break; case "1": this.RbtNo.IsChecked = false; this.rbtYes.IsChecked = true; break; } this.txtKey.Text = string.IsNullOrEmpty(tmpSendDocT.KEYWORDS) ? "" : tmpSendDocT.KEYWORDS; //txtContent.RichTextBoxContext = tmpSendDocT.CONTENT; //txtContent.Document = tmpSendDocT.CONTENT; SelectDocType = senddoc.T_OA_SENDDOCTYPE; //tmpStrcbxDocType = tmpSendDocT.T_OA_SENDDOCTYPE.SENDDOCTYPE; tmpStrcbxGrade = tmpSendDocT.GRADED; tmpGrade = tmpStrcbxGrade; tmpStrcbxProritity = tmpSendDocT.PRIORITIES; tmpProri = tmpStrcbxProritity; if (!string.IsNullOrEmpty(tmpSendDocT.GRADED.ToString())) { foreach (T_SYS_DICTIONARY Region in cbxGrade.Items) { if (Region.DICTIONARYNAME == tmpStrcbxGrade) { cbxGrade.SelectedItem = Region; break; } } } if (!string.IsNullOrEmpty(tmpSendDocT.PRIORITIES.ToString())) { foreach (T_SYS_DICTIONARY Region in cbxProritity.Items) { if (Region.DICTIONARYNAME == tmpStrcbxProritity) { cbxProritity.SelectedItem = Region; break; } } } InitComboxSource(); if (action == FormTypes.Audit) { } if (action == FormTypes.Resubmit) { tmpSendDocT.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString(); } RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); //if (IsMainUser) //{ // IsMainUser = false; //} //InitAudit(senddoc); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } } }
void DetailSendClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; tmpSendDocT = senddoc; this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; this.tbldepartment.Text = senddoc.DEPARTID; this.tbldoctype.Text = tmptype.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; this.tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE).ToShortDateString(); //this.tblupdatedate.Text = senddoc.UPDATEDATE.ToString(); //senddoctab.TabStripPlacement = Dock.Left; //if (!ctrFile._files.HasAccessory) // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(DocInfo,16); this.tblnum.Text = senddoc.NUM; this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; //GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.DEPARTID); string StrState = ""; string StrSave = ""; string Strdistrbute = ""; switch (senddoc.CHECKSTATE) { case "0": StrState = "未提交"; senddoctab.Items.Remove(senddoctab.Items[2]); break; case "1": StrState = "审核中"; InitAudit(senddoc); senddoctab.Items.Remove(senddoctab.Items[1]); break; case "2": StrState = "审核通过"; InitAudit(senddoc); break; case "3": StrState = "审核未通过"; senddoctab.Items.Remove(senddoctab.Items[1]); InitAudit(senddoc); break; } switch (senddoc.ISSAVE) { case "0": StrSave = "未归档"; //this.spDistrbuteDetail.Visibility = Visibility.Collapsed; break; case "1": StrSave = "已归档"; //获取发文的详细信息 //this.spDistrbuteDetail.Visibility = Visibility.Visible; DetailSendClient.GetDocDistrbuteInfosCompleted += new EventHandler<GetDocDistrbuteInfosCompletedEventArgs>(DetailSendClient_GetDocDistrbuteInfosCompleted); DetailSendClient.GetDocDistrbuteInfosAsync(senddoc.SENDDOCID); break; } switch (senddoc.ISDISTRIBUTE) { case "0": Strdistrbute = "未发布"; break; case "1": Strdistrbute = "已发布"; break; } //this.tbldistrbute.Text =Strdistrbute; //this.tblsave.Text = StrSave; if (senddoc.PUBLISHDATE != null) { this.tblPublishDate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToLongDateString() + "印发"; } this.tblKeyWord.Text = senddoc.KEYWORDS; this.tblStatus.Text = StrState; //audit.IsEnabled = false; RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
//private SmtOACommonOfficeClient SendDocClient = new SmtOACommonOfficeClient(); void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { loadbar.Stop(); //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { senddoc = e.Result; publicClient.GetContentAsync(senddoc.SENDDOCID); this.tbltitle.Text = string.IsNullOrEmpty(senddoc.SENDDOCTITLE) ? "":senddoc.SENDDOCTITLE; this.tblsend.Text = string.IsNullOrEmpty(senddoc.SEND) ? "":senddoc.SEND; this.tblcopy.Text = string.IsNullOrEmpty(senddoc.CC) ? "":senddoc.CC; //tblcontent.Document = senddoc.CONTENT; //this.tbldepartment.Text = senddoc.DEPARTID; SelectDocType = senddoc.T_OA_SENDDOCTYPE; if (SelectDocType != null) { this.tbldoctype.Text = SelectDocType.SENDDOCTYPE; } this.tblprioritity.Text = string.IsNullOrEmpty(senddoc.PRIORITIES) ? "":senddoc.PRIORITIES; this.tblgrade.Text = string.IsNullOrEmpty(senddoc.GRADED) ? "":senddoc.GRADED; tblKeyWord.Text = string.IsNullOrEmpty(senddoc.KEYWORDS) ? "":senddoc.KEYWORDS; if (string.IsNullOrEmpty(DocNum)) { this.tblnum.Text = senddoc.NUM; } else { this.tblnum.Text = DocNum; } this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetDepartmentName(senddoc.DEPARTID); string StrState = ""; string StrSave = ""; tmpStrcbxGrade = senddoc.GRADED; tmpStrcbxProritity = senddoc.PRIORITIES; //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 16); //} if (senddoc.ISREDDOC == "0") { SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 6); SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 7); SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(this.GridInfo, 8); } if (senddoc.CREATEDATE != null) { //tbladddate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortDateString() + " " + System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToShortTimeString(); tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE).ToShortDateString() + " " + System.Convert.ToDateTime(senddoc.CREATEDATE).ToShortTimeString(); } if (string.IsNullOrEmpty(DocPublishDate)) { this.tblPublishDate.Text = DocPublishDate; } else { if (senddoc.PUBLISHDATE != null) { this.tblPublishDate.Text = System.Convert.ToDateTime(senddoc.PUBLISHDATE).ToLongDateString() + "印发"; //StrPublish = dt.ToString("yyyymmdd"); } } if (senddoc.ISDISTRIBUTE == "1") { this.tblStatus.Text = "已发布"; } else { this.tblStatus.Text = "未发布"; } if (!string.IsNullOrEmpty(senddoc.OWNERNAME)) { tbladduser.Text = senddoc.OWNERNAME; } //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }
private string tmpStrcbxProritity = ""; //缓急 //private SmtOACommonOfficeClient SendDocClient = new SmtOACommonOfficeClient(); void SendDocClient_GetSendDocSingleInfoByIdCompleted(object sender, GetSendDocSingleInfoByIdCompletedEventArgs e) { if (!e.Cancelled) { if (e.Error == null) { if (e.Result != null) { //T_OA_SENDDOC senddoc = new T_OA_SENDDOC(); senddoc = e.Result; this.tbltitle.Text = senddoc.SENDDOCTITLE; this.tblsend.Text = senddoc.SEND; this.tblcopy.Text = senddoc.CC; tblcontent.RichTextBoxContext = senddoc.CONTENT; this.tbldepartment.Text = senddoc.DEPARTID; SelectDocType = senddoc.T_OA_SENDDOCTYPE; this.tbldoctype.Text = SelectDocType.SENDDOCTYPE; this.tblprioritity.Text = senddoc.PRIORITIES; this.tblgrade.Text = senddoc.GRADED; this.tblnum.Text = DocNum;//获取新的公文编号senddoc.NUM; this.tblcontenttitle.Text = senddoc.SENDDOCTITLE; GetCompanyName(senddoc.OWNERCOMPANYID); GetDepartmentName(senddoc.OWNERDEPARTMENTID); string StrState = ""; string StrSave = ""; tmpStrcbxGrade = senddoc.GRADED; tmpStrcbxProritity = senddoc.PRIORITIES; string StrPublish = ""; if (!string.IsNullOrEmpty(senddoc.PUBLISHDATE.ToString())) { StrPublish = System.Convert.ToDateTime(senddoc.PUBLISHDATE.ToString()).ToShortDateString() + "印发"; } if (!string.IsNullOrEmpty(senddoc.CREATEDATE.ToString())) { this.tbladddate.Text = System.Convert.ToDateTime(senddoc.CREATEDATE.ToString()).ToShortDateString().Replace("/","-"); } //if (!ctrFile._files.HasAccessory) //{ // SMT.SaaS.FrameworkUI.Common.Utility.HiddenGridRow(GridInfo,16); //} this.tblKeyWord.Text = senddoc.KEYWORDS; this.tblStatus.Text = "待发布"; tblPublishDate.Text = DocPublishDate; //if (!string.IsNullOrEmpty(StrPublish)) //{ // this.tblPublishDate.Text = DocPublishDate.Substring(0, 4) + "年" + DocPublishDate.Substring(5, 2) + "月" + DocPublishDate.Substring(8, 2) + "日印发"; //} //ctrFile.IsEnabled = false; } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.ToString()); return; } } }