public void GetMilkProductsTestBeforePackingQCDetails(int RMRId)
        {
            DataSet DS = new DataSet();

            bmptbpqc = new BMilkProductsTestBeforePackingQC();
            DS       = bmptbpqc.GetMilkProductsTestBeforePackingQCDetailsById(RMRId);
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                string DATE = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["MilkProductsTestBeforePackingQCDate"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["MilkProductsTestBeforePackingQCDate"].ToString();
                //sky
                if (DATE == "")
                {
                    txtDate.Text = Convert.ToString(DateTime.Now.ToString("yyy-MM-dd"));
                }
                else
                {
                    DateTime date1 = Convert.ToDateTime(DATE, System.Globalization.CultureInfo.GetCultureInfo("ur-PK").DateTimeFormat);
                    txtDate.Text = (Convert.ToDateTime(date1).ToString("yyyy-MM-dd"));
                }
                txtBatchNo.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["BatchNo"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["BatchNo"].ToString();
                dpShiftDetails.ClearSelection();
                string Shift = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["MilkProductsTestBeforePackingQCShiftId"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["MilkProductsTestBeforePackingQCShiftId"].ToString();
                if (Shift == "")
                {
                    dpShiftDetails.SelectedIndex = 0;
                }
                else
                {
                    dpShiftDetails.Items.FindByValue(Convert.ToInt32(DS.Tables[0].Rows[0]["MilkProductsTestBeforePackingQCShiftId"]).ToString()).Selected = true;
                }
                txtparticular.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["Particular"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["Particular"].ToString();
                txtQuantity.Text   = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["Quantity"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["Quantity"].ToString();
                txtTestName.Text   = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["TestName"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["TestName"].ToString();
                txtResult.Text     = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["Result"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["Result"].ToString();
                txtRemarks.Text    = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["Remarks"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["Remarks"].ToString();

                dpQCStatusId.ClearSelection();
                string QCStatusId = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["MilkProdTestBeforePackingQCStatusId"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["MilkProdTestBeforePackingQCStatusId"].ToString();
                if (QCStatusId == "")
                {
                    dpQCStatusId.SelectedIndex = 0;
                }
                else
                {
                    dpQCStatusId.Items.FindByValue(Convert.ToInt32(DS.Tables[0].Rows[0]["MilkProdTestBeforePackingQCStatusId"]).ToString()).Selected = true;
                }
            }
        }