コード例 #1
0
    public void LoadCategory()
    {
        try
        {
            Session["RptPoCat"] = BLLInvItemsCategory.GetItemCategoryList(null, "Y");

            if (Session["RptPoCat"] != null)
            {
                ddlCategory_cat.DataSource     = Session["RptPoCat"];
                ddlCategory_cat.DataTextField  = "itemsCategoryName";
                ddlCategory_cat.DataValueField = "itemsCategoryID";
                ddlCategory_cat.DataBind();

                ListItem a = new ListItem();
                a.Selected = true;
                a.Text     = "----छान्नुहोस----";
                a.Value    = "0";
                ddlCategory_cat.Items.Insert(0, a);
            }
        }
        catch (Exception ex)
        {
            throw (ex);
        }
    }
    public void LoadCategory()
    {
        try
        {
            Session["Cat"] = BLLInvItemsCategory.GetItemCategoryList(null, "Y");

            if (Session["Cat"] != null)
            {
                ddlCategory.DataSource     = Session["Cat"];
                ddlCategory.DataTextField  = "itemsCategoryName";
                ddlCategory.DataValueField = "itemsCategoryID";
                ddlCategory.DataBind();

                ListItem a = new ListItem();
                a.Selected = true;
                a.Text     = "----छान्नुहोस----";
                a.Value    = "0";
                ddlCategory.Items.Insert(0, a);
            }
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = "Error Status";
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
    private void LoadItemsCategory()
    {
        List <ATTInvItemsCategory> LSTItemsCategory = BLLInvItemsCategory.GetItemCategoryList(null, "Y");

        LSTItemsCategory.Insert(0, new ATTInvItemsCategory(0, "छान्नुहोस्", "", "", ""));
        this.ddlItemCategory.DataTextField  = "ItemsCategoryName";
        this.ddlItemCategory.DataValueField = "ItemsCategoryID";
        this.ddlItemCategory.DataSource     = LSTItemsCategory;
        this.ddlItemCategory.DataBind();
    }
    private void LoadCategory()
    {
        List <ATTInvItemsCategory> lst = BLLInvItemsCategory.GetItemCategoryList(null, null);

        ATTInvItemsCategory obj = new ATTInvItemsCategory();

        obj.ItemsCategoryName = "----छान्नुहोस----";
        obj.ItemsCategoryID   = -1;
        lst.Insert(0, obj);

        ddlCategory.DataSource = lst;
        ddlCategory.DataBind();
    }
コード例 #5
0
 private void LoadItemCategory()
 {
     try
     {
         List <ATTInvItemsCategory> lstItemCategory = BLLInvItemsCategory.GetItemCategoryList(null, "Y", "Y", true);
         Session["Item_ItemCategory"]             = lstItemCategory;
         this.DDLItemsCategory_Rqd.DataSource     = lstItemCategory;
         this.DDLItemsCategory_Rqd.DataTextField  = "ItemsCategoryName";
         this.DDLItemsCategory_Rqd.DataValueField = "ItemCategoryID";
         this.DDLItemsCategory_Rqd.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatus.Text = ex.Message;
     }
 }
 void LoadItemsCategory()
 {
     try
     {
         List <ATTInvItemsCategory> lstItemsCategory = BLLInvItemsCategory.GetItemCategoryList(null, "Y");
         lstItemsCategory.Insert(0, (new ATTInvItemsCategory(0, "छान्नुहोस", "", "", "")));
         Session["ItemsCategory"]                 = lstItemsCategory;
         this.ddlItemsCategory_Rqd.DataSource     = lstItemsCategory;
         this.ddlItemsCategory_Rqd.DataTextField  = "ITEMSCATEGORYNAME";
         this.ddlItemsCategory_Rqd.DataValueField = "ITEMSCATEGORYID";
         this.ddlItemsCategory_Rqd.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
    void LoadItemCategoryList()
    {
        try
        {
            chkICActive.Checked  = true;
            chkISCActive.Checked = true;

            Session["ItemCategory_List"]        = BLLInvItemsCategory.GetItemCategoryList(null, null); //data select from database and assign to Session variable
            this.lstItemCategory.DataSource     = (List <ATTInvItemsCategory>)Session["ItemCategory_List"];
            this.lstItemCategory.DataValueField = "ItemsCategoryID";
            this.lstItemCategory.DataTextField  = "ItemsCategoryName";
            this.lstItemCategory.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatus.Text = ex.Message;
        }
    }
    private void LoadItemCategory()
    {
        try
        {
            List <ATTInvItemsCategory> lstItemCategory = BLLInvItemsCategory.GetItemCategoryList(null, null);

            ATTInvItemsCategory obj = new ATTInvItemsCategory();

            obj.ItemsCategoryID   = -5;
            obj.ItemsCategoryName = "--- छान्नुहोस् ---";

            lstItemCategory.Insert(0, obj);
            Session["Item_ItemCategory"]        = lstItemCategory;
            this.DDLItemCategory.DataSource     = lstItemCategory;
            this.DDLItemCategory.DataTextField  = "ItemsCategoryName";
            this.DDLItemCategory.DataValueField = "ItemsCategoryID";

            this.DDLItemCategory.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatus.Text = ex.Message;
        }
    }