Exemple #1
0
 public void InitData()
 {
     if (custVstPlnGuID != Guid.Empty)
     {
         CRM_VisitPlanResult planInfo = planLogic.GetInfo(new CRM_VisitPlanParam {
             CustVstPlnGuID = custVstPlnGuID
         });
         this.ConvertEntityToControl <CRM_VisitPlanResult>(this.grpVisitPlan.Controls, planInfo, null);
         this.ConvertEntityToControl <CRM_VisitPlanResult>(this.grpVisitResult.Controls, planInfo, null);
         companyGuID = planInfo.CompanyGuID;
     }
     if (custVstPlnLineID > 0)
     {
         CRM_VisitPlanLineResult planLineInfo = planLineLogic.GetInfo(new CRM_VisitPlanLineParam {
             CustVstPlnLineID = custVstPlnLineID
         });
         this.ConvertEntityToControl <CRM_VisitPlanLineResult>(this.grpVisitResult.Controls, planLineInfo, null);
         txtLineVstText.BodyInnerHTML = planLineInfo.VstText;
         companyGuID = planLineInfo.CompanyGuID;
     }
     else
     {
         txtRptEmpName.Text = this.SessionInfo.UserName;
         txtRptEmpID.Text   = this.SessionInfo.UserID.ToStringHasNull();
         txtVstDate.Text    = ZNLCRM.UI.Logic.Sys.Common.GetServerNow();
         txtVstName.Text    = txtPlanName.Text;
     }
     if (companyGuID != Guid.Empty)
     {
         CRM_CompanyResult companyInfo = companyLogic.GetCustInfo(new CRM_CompanyParam {
             CompanyGuID = companyGuID
         });
         this.ConvertEntityToControl <CRM_CompanyResult>(this.grpVisitResult.Controls, companyInfo, null);
     }
 }
Exemple #2
0
        private void tsbDelVisitPlan_Click(object sender, EventArgs e)
        {
            CRM_VisitPlanParam param = new CRM_VisitPlanParam();

            param.CustVstPlnID = custVstPlnID;

            CRM_VisitPlanResult rst = planLogic.GetInfo(param);

            if (rst != null)
            {
                if (MessageBox.Show("请确认是否要删除拜访计划:【" + rst.PlanName + "】", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    WCFAddUpdateResult result = this.AsyncExecute <WCFAddUpdateResult, CRM_VisitPlanParam>(param, planLogic.DelInfo, a => { BindDataGridView(pgPlan.PageIndex); });
                }
            }
            else
            {
                this.ShowMessage("请选择需要删除的拜访计划!");
            }
        }
Exemple #3
0
        public void InitData()
        {
            if (custVstPlnID > 0)
            {
                CRM_VisitPlanResult info = cvpLogic.GetInfo(new CRM_VisitPlanParam {
                    CustVstPlnID = custVstPlnID
                });
                this.ConvertEntityToControl <CRM_VisitPlanResult>(this.grpBase.Controls, info, null);
                this.ConvertEntityToControl <CRM_VisitPlanResult>(this.grpVst.Controls, info, null);
                CRM_CompanyResult crmCompany = info.CrmCompany;
                if (crmCompany != null)
                {
                    txtCompanyName.Text = crmCompany.CompanyName;
                    txtWebSite.Text     = crmCompany.WebSite;
                    txtEmail.Text       = crmCompany.Email;
                }
                switch (info.Important)
                {
                case "高":
                    rdoHight.Checked = true;
                    break;

                case "普通":
                    rdoCommon.Checked = true;
                    break;

                case "低":
                    rdoLow.Checked = true;
                    break;
                }
            }
            else
            {
                this.txtOpEmpID.Text   = this.SessionInfo.UserID.ToStringHasNull();
                this.txtOpEmpName.Text = this.SessionInfo.UserName;
                txtStartDate.Text      = Common.GetServerNow();
            }
            BindLineDataGridView();
            BindFeeDataGridView();
        }