示例#1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (!ctlPrelead.ValidateData(""))
                {
                    return;
                }

                SlmScr046Biz bz = new SlmScr046Biz();
                var          pl = ctlPrelead.GetData();
                if (!bz.SavePrelead(pl, Page.User.Identity.Name))
                {
                    AppUtil.ClientAlert(this, bz.ErrorMessage);
                }
                else
                {
                    AppUtil.ClientAlertAndRedirect(this, "บันทึกข้อมูลเรียบร้อย", "SLM_SCR_029.aspx?backtype=" + Request["backtype"]);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
示例#2
0
        private void BuildCombo()
        {
            AppUtil.BuildCombo(cmbBranch, SlmScr010Biz.GetBranchData());

            AppUtil.BuildCombo(cmbCardTypeId, CardTypeBiz.GetCardTypeList());
            AppUtil.BuildCombo(cmbMaritalStatus, SlmScr046Biz.GetMaritalDataList());
            AppUtil.BuildCombo(cmbOccupation, SlmScr010Biz.GetOccupationData(false));
            var complst = SlmScr034Biz.GetImportInsComCodeListData();

            //complst.RemoveAt(0);
            AppUtil.BuildCombo(cmbCompulCompCode, complst);
            AppUtil.BuildCombo(cmbVolCompanyCode, complst);
            AppUtil.BuildCombo(cmbVolTypeKey, SlmScr046Biz.GetCoverageType());
            var titlelist = SlmScr046Biz.GetTitleDataList();

            AppUtil.BuildCombo(cmbTitleId, titlelist);
            AppUtil.BuildCombo(cmbBenTitleId, titlelist);
            AppUtil.BuildCombo(cmbVolMktTitle, titlelist);
            AppUtil.BuildCombo(cmbDrv1TitleId, titlelist);
            AppUtil.BuildCombo(cmbDrv2TitleId, titlelist);
            AppUtil.BuildCombo(cmbBenTitleId, titlelist);
            AppUtil.BuildCombo(cmbGuar1Title, titlelist);
            AppUtil.BuildCombo(cmbGuar2Title, titlelist);
            AppUtil.BuildCombo(cmbGuar3Title, titlelist);
            AppUtil.BuildCombo(cmbBrandCode, SlmScr010Biz.GetBrandDataNew());
            AppUtil.BuildCombo(cmbProvinceRegis, SlmScr046Biz.GetProvinceDataId());
            AppUtil.BuildCombo(cmbCarByGovId, SlmScr046Biz.GetInsuranceTypeData());
            var relate = SlmScr046Biz.GetRelationData();

            AppUtil.BuildCombo(cmbGuar1Relation, relate);
            AppUtil.BuildCombo(cmbGuar2Relation, relate);
            AppUtil.BuildCombo(cmbGuar3Relation, relate);
        }
示例#3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            //แคมเปญ
            AppUtil.BuildCombo(cmbCampaignId, SlmScr011Biz.GetCampaignEditData());
            //ช่องทาง
            AppUtil.BuildCombo(cmbChannelId, SlmScr003Biz.GetChannelData());
            //status
            AppUtil.BuildCombo(cmbStatus, SlmScr003Biz.GetOptionList("lead status"));
            //Owner Branch
            AppUtil.BuildCombo(cmbOwnerBranch, BranchBiz.GetBranchList(SLMConstant.Branch.Active));
            //Title
            AppUtil.BuildCombo(cmbTitle, SlmScr046Biz.GetTitleDataList());

            AppUtil.SetIntTextBox(txtTelNo_1);
            AppUtil.SetIntTextBox(txtTelNo2);
            if (cmbCampaignId.Enabled == true)
            {
                AppUtil.SetAutoCompleteDropdown(new DropDownList[] {
                    cmbCampaignId,
                    cmbOwnerBranch,
                    cmbOwner,
                    cmbDelegateLead,
                    cmbDelegateBranch,
                    cmbTitle
                }
                                                , Page
                                                , this.ClientID + "_Autocomplete");
            }
        }
示例#4
0
        private void LoadData(decimal preleadId)
        {
            SlmScr046Biz bz = new SlmScr046Biz();
            var          pl = bz.GetPreleadDetail(preleadId);

            if (pl != null)
            {
                ctlPrelead.SetData(pl);
            }
            else
            {
                AppUtil.ClientAlert(this, "ไม่พบข้อมูลจาก Prelead Id ที่ระบุ");
            }
        }
示例#5
0
 public void GetPreleadData(decimal preleadId)
 {
     try
     {
         pnlPrelead.Visible = true;
         SlmScr046Biz bz = new SlmScr046Biz();
         var          pl = bz.GetPreleadDetail(preleadId);
         if (pl != null)
         {
             ctlPrelead.SetData(pl);
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.InnerException != null ? ex.InnerException.Message : ex.Message);
     }
     finally { SetAllView(); }
 }