Exemplo n.º 1
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");
            }
        }
Exemplo n.º 2
0
        private void InitialControl()
        {
            //ประเภทบุคคล
            cmbCardType.DataSource     = CardTypeBiz.GetCardTypeList();
            cmbCardType.DataTextField  = "TextField";
            cmbCardType.DataValueField = "ValueField";
            cmbCardType.DataBind();
            cmbCardType.Items.Insert(0, new ListItem("", ""));

            //cmbCampaign.DataSource = SlmScr003Biz.GetAllActiveCampaignData();
            cmbCampaign.DataSource     = SlmScr003Biz.GetSaleAndBothCampaignData();
            cmbCampaign.DataTextField  = "TextField";
            cmbCampaign.DataValueField = "ValueField";
            cmbCampaign.DataBind();
            cmbCampaign.Items.Insert(0, new ListItem("", ""));

            //GetOwnerLead(cmbCampaign.SelectedItem.Value);

            cmbChannel.DataSource     = SlmScr003Biz.GetChannelData();
            cmbChannel.DataTextField  = "TextField";
            cmbChannel.DataValueField = "ValueField";
            cmbChannel.DataBind();
            cmbChannel.Items.Insert(0, new ListItem("", ""));

            //Owner Lead
            //cmbOwnerLeadSearch.DataSource = SlmScr003Biz.GetOwnerList(HttpContext.Current.User.Identity.Name);
            //cmbOwnerLeadSearch.DataTextField = "TextField";
            //cmbOwnerLeadSearch.DataValueField = "ValueField";
            //cmbOwnerLeadSearch.DataBind();
            //cmbOwnerLeadSearch.Items.Insert(0, new ListItem("", ""));

            var branchList = BranchBiz.GetBranchList(SLMConstant.Branch.All);

            //Owner Branch
            cmbOwnerBranchSearch.DataSource     = branchList;
            cmbOwnerBranchSearch.DataTextField  = "TextField";
            cmbOwnerBranchSearch.DataValueField = "ValueField";
            cmbOwnerBranchSearch.DataBind();
            cmbOwnerBranchSearch.Items.Insert(0, new ListItem("", ""));
            cmbOwnerLeadSearch.Items.Insert(0, new ListItem("", ""));
            //BindOwnerLead();

            //Delegate Branch
            cmbDelegateBranchSearch.DataSource     = branchList;
            cmbDelegateBranchSearch.DataTextField  = "TextField";
            cmbDelegateBranchSearch.DataValueField = "ValueField";
            cmbDelegateBranchSearch.DataBind();
            cmbDelegateBranchSearch.Items.Insert(0, new ListItem("", ""));
            cmbDelegateLeadSearch.Items.Insert(0, new ListItem("", ""));
            //BindDelegateLead();

            //CreateBy Branch
            cmbCreatebyBranchSearch.DataSource     = branchList;
            cmbCreatebyBranchSearch.DataTextField  = "TextField";
            cmbCreatebyBranchSearch.DataValueField = "ValueField";
            cmbCreatebyBranchSearch.DataBind();
            cmbCreatebyBranchSearch.Items.Insert(0, new ListItem("", ""));
            cmbCreatebySearch.Items.Insert(0, new ListItem("", ""));
            //BindCreateByLead();

            var             statusList = SlmScr003Biz.GetOptionList(AppConstant.OptionType.LeadStatus);
            ControlListData data       = statusList.Where(p => p.ValueField == "16").FirstOrDefault();

            if (data != null)
            {
                statusList.Remove(data);
            }

            cbOptionList.DataSource     = statusList;
            cbOptionList.DataTextField  = "TextField";
            cbOptionList.DataValueField = "ValueField";
            cbOptionList.DataBind();

            //ListItem lst = cbOptionList.Items.FindByValue("00");
            //if (lst != null) lst.Selected = true;
            //lst = cbOptionList.Items.FindByValue("01");
            //if (lst != null) lst.Selected = true;

            pcTop.SetVisible = false;
        }
Exemplo n.º 3
0
        private void InitialControl()
        {
            //ประเภทบุคคล
            cmbCardType.DataSource     = CardTypeBiz.GetCardTypeList();
            cmbCardType.DataTextField  = "TextField";
            cmbCardType.DataValueField = "ValueField";
            cmbCardType.DataBind();
            cmbCardType.Items.Insert(0, new ListItem("", ""));

            cmbCampaign.DataSource     = SlmScr003Biz.GetSaleAndBothCampaignData();
            cmbCampaign.DataTextField  = "TextField";
            cmbCampaign.DataValueField = "ValueField";
            cmbCampaign.DataBind();
            cmbCampaign.Items.Insert(0, new ListItem("", ""));

            cmbChannel.DataSource     = SlmScr003Biz.GetChannelData();
            cmbChannel.DataTextField  = "TextField";
            cmbChannel.DataValueField = "ValueField";
            cmbChannel.DataBind();
            cmbChannel.Items.Insert(0, new ListItem("", ""));

            var branchList = BranchBiz.GetBranchList(SLMConstant.Branch.All);

            //Owner Branch
            cmbOwnerBranchSearch.DataSource     = branchList;
            cmbOwnerBranchSearch.DataTextField  = "TextField";
            cmbOwnerBranchSearch.DataValueField = "ValueField";
            cmbOwnerBranchSearch.DataBind();
            cmbOwnerBranchSearch.Items.Insert(0, new ListItem("", ""));
            cmbOwnerLeadSearch.Items.Insert(0, new ListItem("", ""));

            //Delegate Branch
            cmbDelegateBranchSearch.DataSource     = branchList;
            cmbDelegateBranchSearch.DataTextField  = "TextField";
            cmbDelegateBranchSearch.DataValueField = "ValueField";
            cmbDelegateBranchSearch.DataBind();
            cmbDelegateBranchSearch.Items.Insert(0, new ListItem("", ""));
            cmbDelegateLeadSearch.Items.Insert(0, new ListItem("", ""));

            //CreateBy Branch
            cmbCreatebyBranchSearch.DataSource     = branchList;
            cmbCreatebyBranchSearch.DataTextField  = "TextField";
            cmbCreatebyBranchSearch.DataValueField = "ValueField";
            cmbCreatebyBranchSearch.DataBind();
            cmbCreatebyBranchSearch.Items.Insert(0, new ListItem("", ""));
            cmbCreatebySearch.Items.Insert(0, new ListItem("", ""));

            var             statusList = SlmScr003Biz.GetOptionList(AppConstant.OptionType.LeadStatus);
            ControlListData data       = statusList.Where(p => p.ValueField == "16").FirstOrDefault();

            if (data != null)
            {
                statusList.Remove(data);
            }

            cbOptionList.DataSource     = statusList;
            cbOptionList.DataTextField  = "TextField";
            cbOptionList.DataValueField = "ValueField";
            cbOptionList.DataBind();

            pcTop.SetVisible = false;
        }