private void LoadSelectedGRVDetailForInvoiceEntry(int ReceiptID)
        {
            //Display Correct Tab
            selectTab = grpTabInvoiceValue;
            FocusOnSelectedTab();

            // Load The GRV First
            GRV = new CenterCostCalculator();
            GRV.LoadGRV(ReceiptID);
            // Display the GRV Detail for Data Entry(Price Per Pack)

            //Please Make-up ur mind solution
            if (BLL.Settings.IsDamageIncludedOnTotalFOB)
                gridInvoiceDetail.DataSource = GRV.GRVDetail;
            else
                gridInvoiceDetail.DataSource = GRV.GRVSoundDetail;
            gridDiscrenpancy.DataSource = GRV.GRVDiscrepancyDetail;

            BLL.Receipt receipt = new BLL.Receipt();
            receipt.LoadByPrimaryKey(ReceiptID);
        }
        private void LoadSelectedGRVDetailForUnitCostCalculation(int ReceiptID)
        {
            DataRow dr = GRV.IsItemBeingPricedElsewhere();
            if (dr != null)
            {
                    MessageBox.Show(string.Format(
            @"The Item {0} - with Unit: {1} - and Manufacturer: {2} is {3}.
            Please finalize the receive process For {4} under the Activity {5} before continuing"
                                        , dr["FullItemName"], dr["ItemUnitName"], dr["ManufacturerName"], dr["Description"], dr["GRVNo"], dr["ActivityFullName"]
                                        )
                                   , string.Format(@"Pending Receipt()...{0}", dr["ReceiptID"].ToString()), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            // if The Flow is correct Calculate the Cost Coeff and all information on the Previous Tab
            if(selectTab == grpTabCostBuildUp)
                GRV.SaveCostCoefficient(CurrentContext.UserId);

            //Display Correct Tab
            selectTab = grpTabUnitCost;
            FocusOnSelectedTab();
             // Load the GRV First
            GRV = new CenterCostCalculator();
            GRV.LoadGRV(ReceiptID);
            DataRow SelectGRV = gridGRVsView.GetFocusedDataRow();
            if (SelectGRV != null)
            {
                GRV.LoadCostBuilUp(false, SelectGRV["RefNo"].ToString());
                GRV.SuspendFromIssuing();
                gridJournal.DataSource = GRV.CostAnalysis(SelectGRV["RefNo"].ToString());
            }
            gridUnitCost.DataSource = GRV.GRVSoundDetail;
        }