Пример #1
0
        protected void LoadVendors()
        {
            VendorBLL vendor = new VendorBLL();

            try
            {
                vendor.WarehouseId = warehouseDropDownList.SelectedValue;
                DataTable dt = vendor.GetActiveVendorsByWHId();
                vendorDropDownList.DataSource = dt;
                vendorDropDownList.DataValueField = "VendorId";
                vendorDropDownList.DataTextField = "VendorName";
                vendorDropDownList.DataBind();
                vendorDropDownList.Items.Insert(0, "");
                vendorDropDownList.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message;
            }
            finally
            {
                vendor = null;
            }
        }
Пример #2
0
        protected void LoadVendors()
        {
            VendorBLL vendor = new VendorBLL();

            try
            {
                vendor.WarehouseId = warehouseDropDownList.SelectedValue;
                DataTable dt = vendor.GetActiveVendorsByWHId();//vendor.GetVendorListByActivationStatus("True");

                vendorDropDownList.DataSource = dt;
                vendorDropDownList.DataValueField = "VendorId";
                vendorDropDownList.DataTextField = "VendorName";
                vendorDropDownList.DataBind();
                vendorDropDownList.Items.Insert(0, "");
                vendorDropDownList.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }

            finally
            {
                vendor = null;
            }
        }
        protected void VendorList_SelectedIndexChanged(object sender, EventArgs e)
        {
            VendorBLL vendorbll = new VendorBLL();
            try
            {
             // DropDownList  vendorDropDownList = (DropDownList)purchaseRequisitionProductListGridView.Rows[i].FindControl("vendorDropDownList");

                DropDownList vendorDropDown = (DropDownList)sender;
                vendorbll.WarehouseId = warehouseIdLabel.Text;
                
                if(vendorDropDown.SelectedItem.Text == "Select Others.")
                {
                    DataTable dt = vendorbll.GetActiveVendorsByWHId();
                    vendorDropDown.DataSource = dt;
                    vendorDropDown.DataValueField = "VendorId";
                    vendorDropDown.DataTextField = "VendorName";
                    vendorDropDown.DataBind();
                    vendorDropDown.Items.Insert(0, "");
                    vendorDropDown.SelectedIndex = 0;

                }
            
            }
            catch (Exception ex)
            {
                
                //throw;
            }
        }
Пример #4
0
        protected void drpdwnSalesCenterOrWarehouse_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            VendorBLL vendor = new VendorBLL();

            try
            {
                vendor.WarehouseId = drpdwnSalesCenterOrWarehouse.SelectedValue;
                DataTable dt = vendor.GetActiveVendorsByWHId();

                vendorDropDownList.DataSource = dt;
                vendorDropDownList.DataValueField = "VendorId";
                vendorDropDownList.DataTextField = "VendorName";
                vendorDropDownList.DataBind();
                vendorDropDownList.Items.Insert(0, "");
                vendorDropDownList.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message;
            }
            finally
            {
                vendor = null;
            }
        }