/// <summary> /// Load Summery Details /// </summary> private void LoadSummery() { CompensationFinancialBLL oCompensationFinancialBLL = new CompensationFinancialBLL(); CompensationFinancialBO oCompensationFinancial = oCompensationFinancialBLL.GetCompensationFinancial(Convert.ToInt32(Session["HH_ID"])); // Replaced on 08jan2013 ResPayment as ResTotalValuation if (oCompensationFinancial != null) { txtLandValuation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.LandTotalValuation); //oCompensationFinancial.LandTotalValuation.ToString(); txtFixturesValuation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.FixtureTotalValuation); //oCompensationFinancial.FixtureTotalValuation.ToString(); txtCropsValuation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CropTotalValuation); //oCompensationFinancial.CropTotalValuation.ToString(); //decimal ReplacementHouseValue = oCompensationFinancial.ResReplacementValue + (oCompensationFinancial.ResReplacementValue * oCompensationFinancial.ResDA) / 100; txtReplacementHouseValue.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResPayment); //UtilBO.CurrencyFormat(oCompensationFinancial.ResTotalValuation);ResPayment //oCompensationFinancial.ResTotalValuation.ToString();//ReplacementHouseValue.ToString(); txtDamagedCropValue.Text = UtilBO.CurrencyFormat(oCompensationFinancial.DamagedCropValuation); //oCompensationFinancial.DamagedCropValuation.ToString(); txtCultureProperty.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CulturePropValuation); //oCompensationFinancial.DamagedCropValuation.ToString(); txtFacilitation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.FacilitationAllowance); txtFinalCompensation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.LandTotalValuation + oCompensationFinancial.FixtureTotalValuation + oCompensationFinancial.CropTotalValuation + oCompensationFinancial.ResPayment + oCompensationFinancial.DamagedCropValuation + oCompensationFinancial.CulturePropValuation + oCompensationFinancial.FacilitationAllowance); //oCompensationFinancial.TotalValuation.ToString(); txtNegotiatedAmount.Text = UtilBO.CurrencyFormat(oCompensationFinancial.NegotiatedAmount); //oCompensationFinancial.NegotiatedAmount.ToString();//Newly Added txtInKindLand.Text = oCompensationFinancial.LandInKindCompensation.ToString().Trim(); ddlResidentialStructure.ClearSelection(); if (string.IsNullOrEmpty(oCompensationFinancial.ResInKindCompensation)) { ddlResidentialStructure.ClearSelection(); } else { if (ddlResidentialStructure.Items.FindByValue(oCompensationFinancial.ResInKindCompensation.ToString()) != null) { ddlResidentialStructure.ClearSelection(); ddlResidentialStructure.Items.FindByValue(oCompensationFinancial.ResInKindCompensation.ToString()).Selected = true; } } txtResidentialStructure.Text = ""; if (ddlResidentialStructure.SelectedIndex > 0) { txtResidentialStructure.Text = ddlResidentialStructure.SelectedItem.Text; } //Displaying LABEL APPROVAL STATUS //--------------------------------------------LAND STATUS----------------------------------------------------- if (oCompensationFinancial.Land_Approval_Status != null && oCompensationFinancial.Land_Approval_Status.ToUpper() == "APPROVED") { lblLandValuationMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Land_Approval_Status + "</font>"; } else { lblLandValuationMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Land_Approval_Status + "</font>"; } //--------------------------------------------FIXTURE STATUS----------------------------------------------------- if (oCompensationFinancial.Fixture_Approval_Status != null && oCompensationFinancial.Fixture_Approval_Status.ToUpper() == "APPROVED") { lblFixturesValuationMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Fixture_Approval_Status + "</font>"; } else { lblFixturesValuationMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Fixture_Approval_Status + "</font>"; } //--------------------------------------------CROP STATUS----------------------------------------------------- if (oCompensationFinancial.Crop_Approval_Status != null && oCompensationFinancial.Crop_Approval_Status.ToUpper() == "APPROVED") { lblCropsValuationMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Crop_Approval_Status + "</font>"; } else { lblCropsValuationMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Crop_Approval_Status + "</font>"; } //--------------------------------------------REPLACEMENT STATUS----------------------------------------------------- if (oCompensationFinancial.Replacment_Approval_Status != null && oCompensationFinancial.Replacment_Approval_Status.ToUpper() == "APPROVED") { lblReplacementHouseValueMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Replacment_Approval_Status + "</font>"; } else { lblReplacementHouseValueMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Replacment_Approval_Status + "</font>"; } //--------------------------------------------DAMAGED STATUS----------------------------------------------------- if (oCompensationFinancial.Damaged_Approval_Status != null && oCompensationFinancial.Damaged_Approval_Status.ToUpper() == "APPROVED") { lblDamagedCropValueMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Damaged_Approval_Status + "</font>"; } else { lblDamagedCropValueMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Damaged_Approval_Status + "</font>"; } //--------------------------------------------CULTURE PROPERTIES STATUS----------------------------------------------------- if (oCompensationFinancial.Culture_Approval_Status != null && oCompensationFinancial.Culture_Approval_Status.ToUpper() == "APPROVED") { lblCulturePropertyMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Culture_Approval_Status + "</font>"; } else { lblCulturePropertyMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Culture_Approval_Status + "</font>"; } //--------------------------------------------FACILITATION PROPERTIES STATUS----------------------------------------------------- if (oCompensationFinancial.Facilitation_Approval_Status != null && oCompensationFinancial.Facilitation_Approval_Status.ToUpper() == "APPROVED") { lblFacilitationMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Facilitation_Approval_Status + "</font>"; } else { lblFacilitationMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Facilitation_Approval_Status + "</font>"; } //--------------------------------------------FINAL STATUS----------------------------------------------------- if (oCompensationFinancial.Final_Approval_Status != null && oCompensationFinancial.Final_Approval_Status.ToUpper() == "APPROVED") { lblFinalCompensationMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Final_Approval_Status + "</font>"; } else { lblFinalCompensationMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Final_Approval_Status + "</font>"; } //--------------------------------------------NEGOTIATED STATUS----------------------------------------------------- if (oCompensationFinancial.Nego_Amount_Approval_Status != null && oCompensationFinancial.Nego_Amount_Approval_Status.ToUpper() == "APPROVED") { lblNegotiatedAmountMsg.Text = "<font class='StatusApproved'>" + oCompensationFinancial.Nego_Amount_Approval_Status + "</font>"; } else { lblNegotiatedAmountMsg.Text = "<font class='StatusPending'>" + oCompensationFinancial.Nego_Amount_Approval_Status + "</font>"; } //Disabling Checkbox For Approved & Request Pending & Submitted string LAS = oCompensationFinancial.Land_Approval_Status; string FAS = oCompensationFinancial.Fixture_Approval_Status; string CAL = oCompensationFinancial.Crop_Approval_Status; string RAL = oCompensationFinancial.Replacment_Approval_Status; string DAL = oCompensationFinancial.Damaged_Approval_Status; string CPAL = oCompensationFinancial.Culture_Approval_Status; string OPAL = oCompensationFinancial.Facilitation_Approval_Status; string FCAL = oCompensationFinancial.Final_Approval_Status; string NAAS = oCompensationFinancial.Nego_Amount_Approval_Status; int statusCount = 0; int chkcount = 7; int cl = 1, cf = 1, cc = 1, cd = 1, cr = 1, cneg = 0, ccu = 1, co = 1; // start if ((txtLandValuation.Text.Trim() == "" || oCompensationFinancial.LandTotalValuation == 0) && (txtInKindLand.Text.Trim() == "" || oCompensationFinancial.LandInKindCompensation == 0)) { chkLandValuation.Style.Add("display", "none"); chkcount--; cl = 0; } if (txtFixturesValuation.Text.Trim() == "" || oCompensationFinancial.FixtureTotalValuation == 0) { chkFixtureValuation.Style.Add("display", "none"); chkcount--; cf = 0; } if (txtCropsValuation.Text.Trim() == "" || oCompensationFinancial.CropTotalValuation == 0) { chkCropsValuation.Style.Add("display", "none"); chkcount--; cc = 0; } if ((txtReplacementHouseValue.Text.Trim() == "" || oCompensationFinancial.ResPayment == 0) && (txtResidentialStructure.Text.Trim() == "" || txtResidentialStructure.Text.Trim().ToUpper() == "NA")) { chkReplacementHouseValue.Style.Add("display", "none"); chkcount--; cr = 0; } if (txtDamagedCropValue.Text.Trim() == "" || oCompensationFinancial.DamagedCropValuation == 0) { chkDamagedCropValue.Style.Add("display", "none"); chkcount--; cd = 0; } if (txtCultureProperty.Text.Trim() == "" || oCompensationFinancial.CulturePropValuation == 0) { chkCulturePropertyValue.Style.Add("display", "none"); chkcount--; ccu = 0; } if (txtFacilitation.Text.Trim() == "" || oCompensationFinancial.FacilitationAllowance == 0) { chkFacilitationValue.Style.Add("display", "none"); chkcount--; co = 0; } if ((cl + cf + cc + cd + cr + ccu + co) <= 0) { ChkAll.Style.Add("display", "none"); } chkcount = 7; //if (txtFinalCompensation.Text.Trim() == "" || oCompensationFinancial.TotalValuation == 0) // chkFinalCompensation.Style.Add("display", "none"); if (txtNegotiatedAmount.Text.Trim() == "" || oCompensationFinancial.NegotiatedAmount == 0) { chkNegotiatedAmount.Style.Add("display", "none"); } else { cneg++; chkLandValuation.Style.Add("display", "none"); chkFixtureValuation.Style.Add("display", "none"); chkCropsValuation.Style.Add("display", "none"); chkReplacementHouseValue.Style.Add("display", "none"); chkDamagedCropValue.Style.Add("display", "none"); chkCulturePropertyValue.Style.Add("display", "none"); chkFacilitationValue.Style.Add("display", "none"); ChkAll.Style.Add("display", "none"); } //end if ((!string.IsNullOrEmpty(LAS) && LAS.Length > 3) && (LAS.Substring(0, 3).ToUpper() == "APP" || LAS.Substring(0, 3).ToUpper() == "SUB" || LAS.Substring(0, 3).ToUpper() == "REQ"))//LAS.Substring(0, 3).ToUpper() == "DEC" || { chkLandValuation.Style.Add("display", "none"); statusCount++; chkcount--; cl = 0; } if ((!string.IsNullOrEmpty(FAS) && FAS.Length > 3) && (FAS.Substring(0, 3).ToUpper() == "APP" || FAS.Substring(0, 3).ToUpper() == "SUB" || FAS.Substring(0, 3).ToUpper() == "REQ"))//FAS.Substring(0, 3).ToUpper() == "DEC" || { chkFixtureValuation.Style.Add("display", "none"); statusCount++; chkcount--; cf = 0; } if ((!string.IsNullOrEmpty(CAL) && CAL.Length > 3) && (CAL.Substring(0, 3).ToUpper() == "APP" || CAL.Substring(0, 3).ToUpper() == "SUB" || CAL.Substring(0, 3).ToUpper() == "REQ"))//CAL.Substring(0, 3).ToUpper() == "DEC" || { chkCropsValuation.Style.Add("display", "none"); statusCount++; chkcount--; cc = 0; } if ((!string.IsNullOrEmpty(RAL) && RAL.Length > 3) && (RAL.Substring(0, 3).ToUpper() == "APP" || RAL.Substring(0, 3).ToUpper() == "SUB" || RAL.Substring(0, 3).ToUpper() == "REQ"))//RAL.Substring(0, 3).ToUpper() == "DEC" || { chkReplacementHouseValue.Style.Add("display", "none"); statusCount++; chkcount--; cr = 0; } if ((!string.IsNullOrEmpty(DAL) && DAL.Length > 3) && (DAL.Substring(0, 3).ToUpper() == "APP" || DAL.Substring(0, 3).ToUpper() == "SUB" || DAL.Substring(0, 3).ToUpper() == "REQ"))//DAL.Substring(0, 3).ToUpper() == "DEC" || { chkDamagedCropValue.Style.Add("display", "none"); statusCount++; chkcount--; cd = 0; } if ((!string.IsNullOrEmpty(CPAL) && CPAL.Length > 3) && (CPAL.Substring(0, 3).ToUpper() == "APP" || CPAL.Substring(0, 3).ToUpper() == "SUB" || CPAL.Substring(0, 3).ToUpper() == "REQ"))//CPAL.Substring(0, 3).ToUpper() == "DEC" || { chkCulturePropertyValue.Style.Add("display", "none"); statusCount++; chkcount--; ccu = 0; } if ((!string.IsNullOrEmpty(OPAL) && OPAL.Length > 3) && (OPAL.Substring(0, 3).ToUpper() == "APP" || OPAL.Substring(0, 3).ToUpper() == "SUB" || OPAL.Substring(0, 3).ToUpper() == "REQ"))//CPAL.Substring(0, 3).ToUpper() == "DEC" || { chkFacilitationValue.Style.Add("display", "none"); statusCount++; chkcount--; co = 0; } if ((cl + cf + cc + cd + cr + ccu + co) <= 0) { ChkAll.Style.Add("display", "none"); pnlPaymentRequest.Visible = false; } if ((!string.IsNullOrEmpty(FCAL) && FCAL.Length > 3) && (FCAL.Substring(0, 3).ToUpper() == "APP" || FCAL.Substring(0, 3).ToUpper() == "SUB" || FCAL.Substring(0, 3).ToUpper() == "REQ"))//FCAL.Substring(0, 3).ToUpper() == "DEC" || { DisableAllCheckBox(); } if ((!string.IsNullOrEmpty(NAAS) && NAAS.Length > 3) && (NAAS.Substring(0, 3).ToUpper() == "APP" || NAAS.Substring(0, 3).ToUpper() == "SUB" || NAAS.Substring(0, 3).ToUpper() == "REQ"))//NAAS.Substring(0, 3).ToUpper() == "DEC" || { DisableAllCheckBox(); } if (statusCount > 0) { //chkFinalCompensation.Style.Add("display", "none"); chkNegotiatedAmount.Style.Add("display", "none"); cneg = 0; } if (cneg > 0) { pnlPaymentRequest.Visible = true; } GetPAPValuationSummery_NegotiatedAmount((oCompensationFinancial.LandTotalValuation + oCompensationFinancial.FixtureTotalValuation + oCompensationFinancial.CropTotalValuation + oCompensationFinancial.ResPayment + oCompensationFinancial.DamagedCropValuation + oCompensationFinancial.CulturePropValuation + oCompensationFinancial.FacilitationAllowance), oCompensationFinancial.NegotiatedAmount); if ((!string.IsNullOrEmpty(LAS) && LAS.Length > 3) && (LAS.Substring(0, 3).ToUpper() == "SUB" || LAS.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(FAS) && FAS.Length > 3) && (FAS.Substring(0, 3).ToUpper() == "SUB" || FAS.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(CAL) && CAL.Length > 3) && (CAL.Substring(0, 3).ToUpper() == "SUB" || CAL.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(RAL) && RAL.Length > 3) && (RAL.Substring(0, 3).ToUpper() == "SUB" || RAL.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(DAL) && DAL.Length > 3) && (DAL.Substring(0, 3).ToUpper() == "SUB" || DAL.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(CPAL) && CPAL.Length > 3) && (CPAL.Substring(0, 3).ToUpper() == "SUB" || CPAL.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(OPAL) && OPAL.Length > 3) && (OPAL.Substring(0, 3).ToUpper() == "SUB" || OPAL.Substring(0, 3).ToUpper() == "REQ") || (!string.IsNullOrEmpty(NAAS) && NAAS.Length > 3) && (NAAS.Substring(0, 3).ToUpper() == "SUB" || NAAS.Substring(0, 3).ToUpper() == "REQ")) { ViewState["Valuation_Status"] = "Request Pending"; } else { ViewState["Valuation_Status"] = "None"; } } else { DisableAllCheckBox(); } }
/// <summary> /// Get the data from data base /// </summary> private void LoadData() { CompensationFinancialBO oCompensationFinancial = new CompensationFinancialBO(); //oCompensationFinancial.Cmp_FinancialID = ""; oCompensationFinancial.HHID = Convert.ToInt32(Session["HH_ID"]); CompensationFinancialBLL oCompensationFinancialBLL = new CompensationFinancialBLL(); oCompensationFinancial = oCompensationFinancialBLL.GetCompensationFinancial(Convert.ToInt32(Session["HH_ID"])); if (oCompensationFinancial != null) { //LAND SECTION #region Land Section txtLandValuation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.LandValuation);//oCompensationFinancial.LandValuation.ToString(); if (oCompensationFinancial.LandDA > 0) { txtLandDAinPercentage.Text = oCompensationFinancial.LandDA.ToString(); } txtAcreageDifferencePayment.Text = UtilBO.CurrencyFormat(oCompensationFinancial.LandDiffPayment); //oCompensationFinancial.LandDiffPayment.ToString(); //if (!string.IsNullOrEmpty(txtLandValuation.Text) && !string.IsNullOrEmpty(txtLandDAinAmount.Text)) // oCompensationFinancial.LandTotalValuation = Convert.ToDecimal(txtLandValuation.Text.Trim()) + Convert.ToDecimal(txtLandDAinAmount.Text.Trim()); txtLandTotal.Text = UtilBO.CurrencyFormat(oCompensationFinancial.LandTotalValuation); //oCompensationFinancial.LandTotalValuation.ToString(); txtLandDAinAmount.Text = UtilBO.CurrencyFormat(oCompensationFinancial.LandTotalValuation - oCompensationFinancial.LandValuation); //(oCompensationFinancial.LandTotalValuation - oCompensationFinancial.LandValuation).ToString(); txtLandComments.Text = oCompensationFinancial.LandValComments; #endregion //RESIDENTIAL STRUCTURE #region Residencial Structure txtRSDepreciatedValue.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResDepreciatedValue); //oCompensationFinancial.ResDepreciatedValue.ToString(); txtRSReplacementValue.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResReplacementValue); //oCompensationFinancial.ResReplacementValue.ToString(); if (oCompensationFinancial.ResDA > 0) { txtRSDAinPercentage.Text = oCompensationFinancial.ResDA.ToString(); } txtRSMovingAllowance.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResMovingAllowance); //oCompensationFinancial.ResMovingAllowance.ToString(); txtRSLabourCost.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResLabourCost); //oCompensationFinancial.ResLabourCost.ToString(); txtRSPaymentHighHouseValue.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResPayment); //oCompensationFinancial.ResPayment.ToString(); //if (!string.IsNullOrEmpty(txtRSReplacementValue.Text) && !string.IsNullOrEmpty(txtResidentialDAinAmount.Text))//Calculated mannually // oCompensationFinancial.ResTotalValuation = Convert.ToDecimal(txtRSReplacementValue.Text.Trim()) + Convert.ToDecimal(txtResidentialDAinAmount.Text.Trim()); //txtResidentialDAinAmount.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResTotalValuation - oCompensationFinancial.ResReplacementValue); //(oCompensationFinancial.ResTotalValuation - oCompensationFinancial.ResReplacementValue).ToString(); txtResidentialStructureComments.Text = oCompensationFinancial.ResComments; #endregion //FIXTURES #region Fixture Section txtFixturesValuation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.FixtureValuation); //oCompensationFinancial.FixtureValuation.ToString(); if (oCompensationFinancial.FixtureDA > 0) { txtFixturesDAinPercentage.Text = oCompensationFinancial.FixtureDA.ToString(); } //if (!string.IsNullOrEmpty(txtFixturesDAinAmount.Text) && !string.IsNullOrEmpty(txtFixturesValuation.Text)) // oCompensationFinancial.FixtureTotalValuation = Convert.ToDecimal(txtFixturesDAinAmount.Text.Trim()) + Convert.ToDecimal(txtFixturesValuation.Text.Trim()); txtFixturesDAinAmount.Text = UtilBO.CurrencyFormat(oCompensationFinancial.FixtureTotalValuation - oCompensationFinancial.FixtureValuation); //(oCompensationFinancial.FixtureTotalValuation - oCompensationFinancial.FixtureValuation).ToString(); txtRSDepreciatedValue.Text = UtilBO.CurrencyFormat(oCompensationFinancial.ResDepreciatedValue); //oCompensationFinancial.ResDepreciatedValue.ToString(); txtFixturesComments.Text = oCompensationFinancial.FixtureComments; #endregion //CROPS #region Crops Section txtCropsValuation.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CropValuation); //oCompensationFinancial.CropValuation.ToString(); //CheckBox if (oCompensationFinancial.CropMaxCapCase != null) { if (oCompensationFinancial.CropMaxCapCase.ToUpper() == "YES") { chkMaxCapCase.Checked = true; } else { chkMaxCapCase.Checked = false; } } else { chkMaxCapCase.Checked = false; } txtValuationAfterMaxCap.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CropValAftMaxCap); //oCompensationFinancial.CropValAftMaxCap.ToString(); if (oCompensationFinancial.CropDA > 0) { txtCropsDAinPercentage.Text = oCompensationFinancial.CropDA.ToString(); } //if (!string.IsNullOrEmpty(txtCropsValuation.Text) && !string.IsNullOrEmpty(txtCropsDAinAmount.Text)) // oCompensationFinancial.CropTotalValuation = Convert.ToDecimal(txtCropsValuation.Text.Trim()) + Convert.ToDecimal(txtCropsDAinAmount.Text.Trim()); if (oCompensationFinancial.CropMaxCapCase.ToUpper() == "YES") { if (!string.IsNullOrEmpty(txtValuationAfterMaxCap.Text) && !string.IsNullOrEmpty(txtCropsDAinAmount.Text)) { oCompensationFinancial.CropTotalValuation = Convert.ToDecimal(txtValuationAfterMaxCap.Text.Trim()) + Convert.ToDecimal(txtCropsDAinAmount.Text.Trim()); } } else { if (!string.IsNullOrEmpty(txtCropsValuation.Text) && !string.IsNullOrEmpty(txtCropsDAinAmount.Text)) { oCompensationFinancial.CropTotalValuation = Convert.ToDecimal(txtCropsValuation.Text.Trim()) + Convert.ToDecimal(txtCropsDAinAmount.Text.Trim()); } } txtCropsDAinAmount.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CropTotalValuation - oCompensationFinancial.CropValuation); //(oCompensationFinancial.CropTotalValuation - oCompensationFinancial.CropValuation).ToString(); txtCropsComments.Text = oCompensationFinancial.CropComments; #endregion //OTHERS #region Others txtCompensationForCultureProperty.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CulturePropValuation); //oCompensationFinancial.CulturePropValuation.ToString(); txtOtherDamagedCrops.Text = UtilBO.CurrencyFormat(oCompensationFinancial.DamagedCropValuation); //oCompensationFinancial.DamagedCropValuation.ToString(); //if (!string.IsNullOrEmpty(txtCulturePropertyValue.Text) && !string.IsNullOrEmpty(txtOtherDamagedCrops.Text)) // oCompensationFinancial.TotalOtherValuation = Convert.ToDecimal(txtCulturePropertyValue.Text.Trim()) + Convert.ToDecimal(txtOtherDamagedCrops.Text.Trim()); txtOthersTotal.Text = UtilBO.CurrencyFormat(oCompensationFinancial.CulturePropValuation + oCompensationFinancial.DamagedCropValuation); //(oCompensationFinancial.CulturePropValuation + oCompensationFinancial.DamagedCropValuation).ToString(); #endregion //SUMMERY #region Summery Section txtNegotiatedAmount.Text = UtilBO.CurrencyFormat(oCompensationFinancial.NegotiatedAmount); decimal RDAllowance = (oCompensationFinancial.ResDepreciatedValue * oCompensationFinancial.FixtureDA) / 100; decimal SummeryFixturesValue = (((oCompensationFinancial.FixtureValuation * oCompensationFinancial.FixtureDA) / 100) + oCompensationFinancial.FixtureValuation); txtSummeryFixturesValue.Text = UtilBO.CurrencyFormat(SummeryFixturesValue); //SummeryFixturesValue.ToString(); decimal DamagedCropsValue = (((oCompensationFinancial.CropValuation * oCompensationFinancial.CropDA) / 100) + oCompensationFinancial.CropValuation); txtDamagedCropsValue.Text = UtilBO.CurrencyFormat(DamagedCropsValue); // DamagedCropsValue.ToString(); txtDamagedCropsValue.Text = txtOtherDamagedCrops.Text; txtCulturePropertyValue.Text = txtCompensationForCultureProperty.Text; txtInKindLand.Text = oCompensationFinancial.LandInKindCompensation.ToString().Trim(); ddlResidentialStructure.ClearSelection(); if (string.IsNullOrEmpty(oCompensationFinancial.ResInKindCompensation)) { ddlResidentialStructure.SelectedValue = "0"; } else { ddlResidentialStructure.SelectedValue = oCompensationFinancial.ResInKindCompensation.ToString(); } txtFacilitationallowances.Text = UtilBO.CurrencyFormat(oCompensationFinancial.FacilitationAllowance); //if (!string.IsNullOrEmpty(txtRSDepreciatedValue.Text)) // oCompensationFinancial.ResDepreciatedValue = Convert.ToDecimal(txtRSDepreciatedValue.Text.Trim()); #endregion //PACKAGE DELIVERY INFO #region Package Delivery Section CompensationFinancialBO ooCompensationFinancial = new CompensationFinancialBO(); ooCompensationFinancial = oCompensationFinancialBLL.getPackageDeliveryInfo(SessionHHID); if (ooCompensationFinancial != null) { if (ooCompensationFinancial.DeliveryDate != DateTime.MinValue) { dpDeliveryDate.Text = ooCompensationFinancial.DeliveryDate.ToString(UtilBO.DateFormat); } else { dpDeliveryDate.Text = ""; } if (ooCompensationFinancial.PAPAction == "Y") { rdoActionAccepted.Checked = true; } else if (ooCompensationFinancial.PAPAction == "N") { rdoActionRejected.Checked = true; } ddlDeliveredBy.SelectedValue = ooCompensationFinancial.DeliveredBy.ToString(); txtPackageDeliveryInfoComments.Text = ooCompensationFinancial.DeliveryComments; } #endregion Package Delivery Section hdnDoCalc.Value = "1"; btnSave.Text = "Update"; } else { FinalValuationBLL oFinalValuationBLL = new FinalValuationBLL(); FinalValuationBO oFinalValuationBO = new FinalValuationBO(); if (SessionHHID > 0) { oFinalValuationBO = oFinalValuationBLL.getFinalValuatin(SessionHHID); if (oFinalValuationBO != null) { txtLandValuation.Text = UtilBO.CurrencyFormat(oFinalValuationBO.LandValue); //oFinalValuationBO.LandValue.ToString(); txtCropsValuation.Text = UtilBO.CurrencyFormat(oFinalValuationBO.CropValue); //oFinalValuationBO.CropValue.ToString(); txtFixturesValuation.Text = UtilBO.CurrencyFormat(oFinalValuationBO.FixtureValue); //oFinalValuationBO.FixtureValue.ToString(); txtHouseValues.Text = UtilBO.CurrencyFormat(oFinalValuationBO.HouseValue); //oFinalValuationBO.HouseValue.ToString(); txtReplacementHouseValue.Text = UtilBO.CurrencyFormat(oFinalValuationBO.ReplacementValue); //oFinalValuationBO.ReplacementValue.ToString(); txtCompensationForCultureProperty.Text = UtilBO.CurrencyFormat(oFinalValuationBO.CulturalpropertyValue); //oFinalValuationBO.CulturalpropertyValue.ToString(); txtOtherDamagedCrops.Text = UtilBO.CurrencyFormat(oFinalValuationBO.DamagedcropValue); // oFinalValuationBO.DamagedcropValue.ToString(); txtOthersTotal.Text = UtilBO.CurrencyFormat(oFinalValuationBO.CulturalpropertyValue + oFinalValuationBO.DamagedcropValue); //(oFinalValuationBO.CulturalpropertyValue + oFinalValuationBO.DamagedcropValue).ToString(); txtDamagedCropsValue.Text = UtilBO.CurrencyFormat(oFinalValuationBO.DamagedcropValue); //oFinalValuationBO.DamagedcropValue.ToString(); txtCulturePropertyValue.Text = UtilBO.CurrencyFormat(oFinalValuationBO.CulturalpropertyValue); //oFinalValuationBO.CulturalpropertyValue.ToString(); txtRSDepreciatedValue.Text = UtilBO.CurrencyFormat(oFinalValuationBO.HouseValue); //oFinalValuationBO.HouseValue.ToString(); txtRSReplacementValue.Text = UtilBO.CurrencyFormat(oFinalValuationBO.ReplacementValue); //oFinalValuationBO.ReplacementValue.ToString(); txtNegotiatedAmount.Text = UtilBO.CurrencyFormat(oFinalValuationBO.NegotiatedAmount); //oFinalValuationBO.NegotiatedAmount.ToString(); txtRSLabourCost.Text = UtilBO.CurrencyFormat(oFinalValuationBO.ResLabourCost); //txtFacilitationallowances.Text = "0"; txtFacilitationallowances.Text = UtilBO.CurrencyFormat(oFinalValuationBO.GOUAllowance); if (oFinalValuationBO.Crop_Max_Cap_Case.ToLower() == "yes") { chkMaxCapCase.Checked = true; } else { chkMaxCapCase.Checked = false; } txtValuationAfterMaxCap.Text = UtilBO.CurrencyFormat(oFinalValuationBO.Crop_Val_Aft_Max_Cap); hdnDoCalc.Value = "1"; ScriptManager.RegisterStartupScript(this, this.GetType(), "CalTotal", "CalcLandTotal();CalcResidenitalTotal();CalcFixtureTotal();CalcCropTotal();CalcOtherTotal();FindTotalAmount();", true); } } } }