Beispiel #1
0
        void cmsfc_GetContractViewByIdCompleted(object sender, GetContractViewByIdCompletedEventArgs e)//根据查看ID查询
        {
            try
            {
                if (e.Error == null)
                {
                    if (e.Result != null)
                    {
                        ContractViewObj = e.Result;        //合同查看申请视图
                        if (actions == FormTypes.Resubmit) //重新提交
                        {
                            ContractViewObj.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
                        }
                        cprinting = ContractViewObj.T_OA_CONTRACTPRINT;                                           //打印视图
                        ctapp     = ContractViewObj.T_OA_CONTRACTPRINT.T_OA_CONTRACTAPP;
                        ContractID.SelectedText   = ctapp.CONTRACTCODE;                                           //合同编号
                        ContractTitle.Text        = ctapp.CONTRACTTITLE;                                          //标题
                        this.txtCompanyId.Text    = Utility.GetCompanyName(ContractViewObj.OWNERCOMPANYID);       //所属公司ID
                        this.txtDepartmentId.Text = Utility.GetDepartmentName(ContractViewObj.OWNERDEPARTMENTID); //所属部门ID

                        txtTELL.Text       = ContractViewObj.TEL;
                        txtCreateUser.Text = ContractViewObj.OWNERNAME;
                        //if (actions == FormTypes.Audit)
                        //{
                        //    audit.XmlObject = DataObjectToXml<T_OA_CONTRACTVIEW>.ObjListToXml(ContractViewObj, "OA");
                        //}
                        //InitAudit();//审批
                        RefreshUI(RefreshedTypes.AuditInfo);
                        RefreshUI(RefreshedTypes.All);
                        //ctrFile.Load_fileData(cprinting.CONTRACTPRINTID);
                    }
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }
        void cmsfc_GetContractViewByIdCompleted(object sender, GetContractViewByIdCompletedEventArgs e)//根据查看ID查询
        {
            try
            {
                if (e.Error == null)
                {
                    if (e.Result != null)
                    {
                        ContractViewObj = e.Result;//合同查看申请视图
                        if (actions == FormTypes.Resubmit)//重新提交
                        {
                            ContractViewObj.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
                        }
                        cprinting = ContractViewObj.T_OA_CONTRACTPRINT;//打印视图
                        ctapp = ContractViewObj.T_OA_CONTRACTPRINT.T_OA_CONTRACTAPP;
                        ContractID.SelectedText = ctapp.CONTRACTCODE;//合同编号
                        ContractTitle.Text = ctapp.CONTRACTTITLE;//标题 
                        this.txtCompanyId.Text = Utility.GetCompanyName(ContractViewObj.OWNERCOMPANYID);//所属公司ID
                        this.txtDepartmentId.Text = Utility.GetDepartmentName(ContractViewObj.OWNERDEPARTMENTID);//所属部门ID

                        txtTELL.Text = ContractViewObj.TEL;
                        txtCreateUser.Text = ContractViewObj.OWNERNAME;
                        //if (actions == FormTypes.Audit)
                        //{
                        //    audit.XmlObject = DataObjectToXml<T_OA_CONTRACTVIEW>.ObjListToXml(ContractViewObj, "OA");
                        //}
                        //InitAudit();//审批
                        RefreshUI(RefreshedTypes.AuditInfo);
                        RefreshUI(RefreshedTypes.All);
                        //ctrFile.Load_fileData(cprinting.CONTRACTPRINTID);
                    }
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }