Exemple #1
0
        protected void GetProductList()
        {
            ProductBLL product = new ProductBLL();

            try
            {
                product.WareHouseId = warehouseDropDownList.SelectedValue.Trim();
               
                DataTable dt = product.GetProductListByWareHouseId();
                productListGridView.DataSource = dt;
                productListGridView.DataBind();

                if (productListGridView.Rows.Count > 0)
                {
                    productListGridView.UseAccessibleHeader = true;
                    productListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Product 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
            {
                product = null;
            }
        }