Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         companySetupGridView.DataSource = companySetupManager.GetAllCompanySetup();
         companySetupGridView.DataBind();
     }
 }
Пример #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


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

                itemDropDownList.DataSource     = itemSetupManager.GetAllItems();
                itemDropDownList.DataTextField  = "ItemName";
                itemDropDownList.DataValueField = "Id";
                itemDropDownList.DataBind();

                availableQuantityTextBox.Text = "<View>";
                reorderLevelTextBox.Text      = "<View>";


                // reorderLevelTextBox.Text = "0";
                string code = "--Select--";
                companyDropDownList.Items.Insert(0, new ListItem(code, ""));
                itemDropDownList.Items.Insert(0, new ListItem(code, ""));
            }

            //else
            //{
            //    string checkCompany = companyDropDownList.SelectedItem.Text;
            //    int companyid = 0;
            //    int itemid = 0;
            //    //companyid = Convert.ToInt32(companyDropDownList.SelectedValue);
            //    string checkItem = itemDropDownList.SelectedItem.Text;



            //    if (!(checkCompany.Equals("--Select--") ||checkItem.Equals("--Select--")))
            //    {
            //        companyid = Convert.ToInt32(companyDropDownList.SelectedValue);
            //        itemid = Convert.ToInt32(itemDropDownList.SelectedValue);
            //        reorderLevelTextBox.Text = itemSetupManager.GetReorderLevelByDropDown(companyid);
            //        availableQuantityTextBox.Text = stockInManager.GetQuantityByDropDown(companyid, itemid);
            //    }



            //}
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                companyDropDownList.DataSource     = aComanySetupManager.GetAllCompanySetup();
                companyDropDownList.DataTextField  = "Name";
                companyDropDownList.DataValueField = "Id";
                companyDropDownList.DataBind();

                ListItem listItem = new ListItem("<SELECT>", "-1");
                companyDropDownList.Items.Insert(0, listItem);

                itemDropDownList.Items.Insert(0, listItem);
            }
        }
Пример #4
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, ""));
            }
        }
Пример #5
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, ""));
            }
        }