Example #1
0
        protected void GetCustomerListByWareHouseId()
        {
            CustomerBLL customer = new CustomerBLL();
            customer.WarehouseId = warehouseDropDownList.SelectedValue.Trim();

            try
            {
                DataTable dt = customer.GetCustomerListByWareHouseId();
                customerListGridView.DataSource = dt;
                customerListGridView.DataBind();

                if (customerListGridView.Rows.Count > 0)
                {
                    customerListGridView.UseAccessibleHeader = true;
                    customerListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Customer List Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                customer = null;
            }
        }