protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            GetStockByMinmax();
        }

        HeaderFilterMode headerFilterMode = hFModeCheckBox.Checked ? HeaderFilterMode.CheckedList : HeaderFilterMode.List;

        foreach (GridViewDataColumn column in grvSTK_Minmax.Columns)
        {
            column.Settings.HeaderFilterMode = headerFilterMode;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["strPARTY_ID"] != null)
            {
                partyid = Request.QueryString["strPARTY_ID"].ToString();
            }

            if (Request.QueryString["strETD"] != null)
            {
                etd = Request.QueryString["strETD"].ToString();
            }

            if (Request.QueryString["strWH_ID"] != null)
            {
                wh = Request.QueryString["strWH_ID"].ToString();
            }

            if (Request.QueryString["strSTATUS"] != null)
            {
                status = Request.QueryString["strSTATUS"].ToString();
            }


            DateTime dateSel = DateTime.ParseExact(etd, "yyyyMMdd HH:mm tt", DateTimeFormatInfo.CurrentInfo);

            this.lblCustomer.Text = partyid;
            this.lblDate.Text     = dateSel.ToString("dd-MM-yyyy HH:mm tt");
            this.lblStatus.Text   = status.ToUpper();
            switch (status.ToLower())
            {
            case "complete":
                this.lblStatus.ForeColor = System.Drawing.Color.SkyBlue;
                this.grvDelivery_Detail.Columns["PICKED_QTY"].Caption = "PICKED**";
                this.grvDelivery_Detail.Columns["LOADED_QTY"].Caption = "LOAD**";
                break;

            case "pick-load":
                //this.lblStatus.ForeColor = System.Drawing.Color.Green;
                this.lblStatus.ForeColor = System.Drawing.ColorTranslator.FromHtml("#0FAB0F");
                this.grvDelivery_Detail.Columns["PICKED_QTY"].Caption = "PICKED**";
                this.grvDelivery_Detail.Columns["LOADED_QTY"].Caption = "LOAD**";
                break;

            case "not compt":
                this.lblStatus.ForeColor = System.Drawing.Color.Yellow;
                this.grvDelivery_Detail.Columns["PICKED_QTY"].Caption = "PICKED**";
                this.grvDelivery_Detail.Columns["LOADED_QTY"].Caption = "LOAD**";
                break;

            case "delay":
                this.lblStatus.ForeColor = System.Drawing.Color.Red;
                this.grvDelivery_Detail.Columns["PICKED_QTY"].Caption = "****";
                this.grvDelivery_Detail.Columns["LOADED_QTY"].Caption = "DELAY";
                break;

            case "no plan":
                this.lblStatus.ForeColor = System.Drawing.Color.White;
                this.grvDelivery_Detail.Columns["PICKED_QTY"].Caption = "PICKED**";
                this.grvDelivery_Detail.Columns["LOADED_QTY"].Caption = "LOAD**";
                break;

            default:
                this.lblStatus.ForeColor = System.Drawing.Color.White;
                break;
            }

            this.GetDeliveryDetail(partyid, dateSel, wh, status);

            HeaderFilterMode headerFilterMode = hFModeCheckBox.Checked ? HeaderFilterMode.CheckedList : HeaderFilterMode.List;
            foreach (GridViewDataColumn column in grvDelivery_Detail.Columns)
            {
                column.Settings.HeaderFilterMode = headerFilterMode;
            }
        }
    }