protected void GetCancelRequestList()
        {
            PurchaseOrderBLL purchaseOrder = new PurchaseOrderBLL();

            try
            {
                DataTable dt = purchaseOrder.GetPurchaseOrderCancelRequestListByWarehouse(warehouseDropDownList.SelectedValue.Trim());

                purchaseOrderCancelRequestListGridView.DataSource = dt;
                purchaseOrderCancelRequestListGridView.DataBind();

                if (purchaseOrderCancelRequestListGridView.Rows.Count > 0)
                {
                    purchaseOrderCancelRequestListGridView.UseAccessibleHeader = true;
                    purchaseOrderCancelRequestListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = "";
                }
            }
            catch (Exception ex)
            {
                msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message;
            }
            finally
            {
                purchaseOrder = null;
            }
        }
        protected void cancelRequestListButton_Click(object sender, EventArgs e)
        {
            PurchaseOrderBLL purchaseOrder = new PurchaseOrderBLL();

            try
            {
                if (warehouseDropDownList.SelectedValue == "")
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Validation!!!"; msgDetailLabel.Text = "Warehouse Name field is required.";
                }
                else
                {
                    string warehouseId = warehouseDropDownList.SelectedValue.Trim();

                    DataTable dt = purchaseOrder.GetPurchaseOrderCancelRequestListByWarehouse(warehouseId);

                    purchaseOrderCancelRequestListGridView.DataSource = dt;
                    purchaseOrderCancelRequestListGridView.DataBind();

                    if (purchaseOrderCancelRequestListGridView.Rows.Count > 0)
                    {
                        purchaseOrderCancelRequestListGridView.UseAccessibleHeader = true;
                        purchaseOrderCancelRequestListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                    }
                    else
                    {
                        msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = "";
                    }
                }
            }
            catch (Exception ex)
            {
                msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message;
            }
            finally
            {
                purchaseOrder = null;
            }
        }