protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         productCategoryGridView.DataSource = productCategoryManager.GetAllProductCategory();
         productCategoryGridView.DataBind();
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // jehetu save e click korle prottekbar page load age hocche ebong automatically dropdown er prothom value ta niye nicche  tai
                //ami chai eta shudhu prothombar load hobe mane save button e click korar agei, tai aei if lekhchi

                //count = 0;


                //itemDropDownList.DataSource = stockInManager.GetItemByCompany() //itemSetupManager.GetAllItems();
                //itemDropDownList.DataTextField = "ItemName";
                //itemDropDownList.DataValueField = "Id";
                //itemDropDownList.DataBind();
                //     CompanyManger company = new CompanyManger();
                //DropDownCompanyList.DataSource = company.GetAllCompany();
                //DropDownCompanyList.DataTextField = "CompanyName";
                //DropDownCompanyList.DataValueField = "CompanyID";
                //DropDownCompanyList.DataBind();
                //DropDownCompanyList.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0"));

                //ItemManager itemManager = new ItemManager();
                //DropDownCategoryList.DataSource = itemManager.GetAllCategory();
                //DropDownCategoryList.DataTextField = "CategoryName";
                //DropDownCategoryList.DataValueField = "CategoryID";
                //DropDownCategoryList.DataBind();
                //DropDownCategoryList.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0"));

                companyDropDownList.DataSource     = companySetupManager.GetAllCompanySetup();
                companyDropDownList.DataTextField  = "CompanyName";
                companyDropDownList.DataValueField = "Id";
                companyDropDownList.DataBind();


                categoryDropDownList.DataSource = categoryManager.GetAllProductCategory();
                //   categoryDropDownList.DataSource = itemSetupManager.GetAllItemsFake();
                categoryDropDownList.DataTextField  = "CategoryName";
                categoryDropDownList.DataValueField = "Id";
                categoryDropDownList.DataBind();

                string code = "--Select--";
                companyDropDownList.Items.Insert(0, new ListItem(code, ""));
                //companyDropDownList.Items.Insert(0, new ListItem(code, ""));
                categoryDropDownList.Items.Insert(0, new ListItem(code, ""));
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // jehetu save e click korle prottekbar page load age hocche ebong automatically dropdown er prothom value ta niye nicche  tai
                //ami chai eta shudhu prothombar load hobe mane save button e click korar agei, tai aei if lekhchi
                categoryDropDownList.DataSource     = productCategoryManager.GetAllProductCategory();
                categoryDropDownList.DataTextField  = "CategoryName";
                categoryDropDownList.DataValueField = "Id";
                categoryDropDownList.DataBind();

                companyDropDownList.DataSource     = companySetupManager.GetAllCompanySetup();
                companyDropDownList.DataTextField  = "CompanyName";
                companyDropDownList.DataValueField = "Id";
                companyDropDownList.DataBind();
                reorderLevelTextBox.Text = "0";

                string code = "--Select--";
                companyDropDownList.Items.Insert(0, new ListItem(code, ""));
                categoryDropDownList.Items.Insert(0, new ListItem(code, ""));
            }
        }