예제 #1
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);
        }
예제 #2
0
        private void GetBranchOwnerDefault()
        {
            try
            {
                List <StaffData> stafflist = SlmScr016Biz.GetChannelStaffData(HttpContext.Current.User.Identity.Name);
                if (stafflist.Count > 0)
                {
                    if (!string.IsNullOrEmpty(stafflist.FirstOrDefault().ChannelId))
                    {
                        if ((stafflist.FirstOrDefault().ChannelId.ToUpper() == SLM.Resource.SLMConstant.ChannelId.Branch) ||
                            (stafflist.FirstOrDefault().ChannelId.ToUpper() == SLM.Resource.SLMConstant.ChannelId.Telesales) ||
                            (stafflist.FirstOrDefault().ChannelId.ToUpper() == SLM.Resource.SLMConstant.ChannelId.PriorityBanking))
                        {
                            string branch = SlmScr010Biz.GetBranchData(HttpContext.Current.User.Identity.Name);
                            if (branch != "")
                            {
                                //cmbChannelId.SelectedIndex = cmbChannelId.Items.IndexOf(cmbChannelId.Items.FindByValue(stafflist.FirstOrDefault().ChannelId));
                                cmbOwnerBranch.SelectedIndex = cmbOwnerBranch.Items.IndexOf(cmbOwnerBranch.Items.FindByValue(branch));
                                cmbOwnerBranchSelectedIndexChanged();

                                if (cmbOwner.Items.Count > 0)
                                {
                                    ListItem item = cmbOwner.Items.OfType <ListItem>().Where(p => p.Value.Trim().ToLower() == HttpContext.Current.User.Identity.Name.Trim().ToLower()).FirstOrDefault();
                                    if (item != null)
                                    {
                                        cmbOwner.SelectedIndex = cmbOwner.Items.IndexOf(item);
                                    }
                                }

                                //cmbOwner.SelectedIndex = cmbOwner.Items.IndexOf(cmbOwner.Items.FindByValue(HttpContext.Current.User.Identity.Name));
                                //txtOwnerBranchUserLogin.Text = branch;
                                txtOwnerBranchBefore.Text = branch;
                                if (cmbOwner.SelectedIndex >= 0)
                                {
                                    txtOwnerLeadBefore.Text = cmbOwner.SelectedItem.Value;
                                }
                            }
                        }
                        else
                        {
                            cmbOwner.Items.Clear();
                            cmbOwner.Enabled = false;
                        }
                    }
                    else
                    {
                        cmbOwner.Items.Clear();
                        cmbOwner.Enabled = false;
                    }
                }
            }
            catch
            {
                throw;
            }
        }