protected void BindSchemes()
        {
            ddlScheme.Items.Clear();
            //ddlScheme.Items.Insert(0, new ListItem("--SELECT--"));
            ddlScheme.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--SELECT--", "0"));

            ddlScheme.SelectedIndex = 0;

            if (ddlAmc.SelectedIndex == 0 || ddlCategory.SelectedIndex == 0)
            {
                return;
            }

            string category = ddlCategory.SelectedValue.ToLower() == "all" ? null : ddlCategory.SelectedValue.ToLower();
            int    amc      = int.Parse(ddlAmc.SelectedValue);

            DataTable dtScheme = new DataTable();

            dtScheme = commonLookupBo.GetAmcSchemeList(amc, category, customerVo.CustomerId, 'W');

            if (dtScheme == null)
            {
                return;
            }
            if (dtScheme.Rows.Count > 0)
            {
                ddlScheme.DataSource     = dtScheme;
                ddlScheme.DataValueField = dtScheme.Columns["PASP_SchemePlanCode"].ToString();
                ddlScheme.DataTextField  = dtScheme.Columns["PASP_SchemePlanName"].ToString();
                ddlScheme.DataBind();
            }
            //ddlScheme.Items.Insert(0, new ListItem("--SELECT--"));
            //ddlScheme.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--SELECT--", "0"));
            //ddlScheme.SelectedIndex = 0;
        }
        protected void SchemeBind(int amccode, string category, int customerId, char schemeType)
        {
            ddlScheme.Items.Clear();
            DataTable dtScheme = new DataTable();

            dtScheme = commonLookupBo.GetAmcSchemeList(amccode, category, customerId, schemeType);
            if (dtScheme.Rows.Count > 0)
            {
                ddlScheme.DataSource     = dtScheme;
                ddlScheme.DataValueField = dtScheme.Columns["PASP_SchemePlanCode"].ToString();
                ddlScheme.DataTextField  = dtScheme.Columns["PASP_SchemePlanName"].ToString();
                ddlScheme.DataBind();
                ddlScheme.Items.Insert(0, new ListItem("Select", "0"));
            }
        }
예제 #3
0
        protected void SchemeBind(int amccode, string category)
        {
            ddlScheme.Items.Clear();
            DataTable dtScheme = new DataTable();

            dtScheme = commonLookupBo.GetAmcSchemeList(amccode, category, 0, 'P');
            if (dtScheme.Rows.Count > 0)
            {
                ddlScheme.DataSource     = dtScheme;
                ddlScheme.DataValueField = dtScheme.Columns["PASP_SchemePlanCode"].ToString();
                ddlScheme.DataTextField  = dtScheme.Columns["PASP_SchemePlanName"].ToString();
                ddlScheme.DataBind();
                ddlScheme.Items.Insert(0, new ListItem("All", "All"));
                ddlScheme.Items.Insert(0, new ListItem("--SELECT--", "0"));
            }
        }