public override void UserControlLoad() { if (this.ownerPage == null) { throw new UMSException("Current Page is null or is not inheritor of BasicPage."); } if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_STRING) { this.CurrentEntityMasterID = this.hdnRowMasterKey.Value; } this.currentEntity = this.ownerPage.CostCalculationRef.GetOfferByID(this.CurrentEntityMasterID); if (this.currentEntity != null) { this.hdnRowMasterKey.Value = this.currentEntity.idOffer.ToString(); LoadtbltblOfferDataExpenseGroupTon(); } else { SetEmptyValues(); } }
public override void UserControlLoad() { base.ClearResultContext(this.lbResultContext); this.tblOverviewCostTable.Rows.Clear(); this.tblOverviewSalesPriceTable.Rows.Clear(); this.tblOverviewEtemCalculations.Rows.Clear(); this.tblOverviewSummaryExpenses.Rows.Clear(); if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_ZERO_STRING) { this.CurrentEntityMasterID = this.hdnRowMasterKey.Value; } this.currentOffer = this.ownerPage.CostCalculationRef.GetOfferByID(this.hdnRowMasterKey.Value); if (this.currentOffer == null) { this.ownerPage.CallContext.ResultCode = ETEMEnums.ResultEnum.Error; base.AddMessage(this.lbResultContext, string.Format("Entity `Offer` not found by ID ({0})!", this.hdnRowMasterKey.Value)); return; } OfferOverviewResult offerOverviewResult = this.ownerPage.CostCalculationRef.LoadOfferOverviewResultInTableRowsByOfferId(this.hdnRowMasterKey.Value, this.ownerPage.CallContext); if (offerOverviewResult.ResultContext.ResultCode == ETEMEnums.ResultEnum.Success) { this.tblOverviewCostTable.Rows.AddRange(offerOverviewResult.OfferOverviewCostTableRows); this.tblOverviewSalesPriceTable.Rows.AddRange(offerOverviewResult.OfferOverviewSalesPriceTableRows); this.tblOverviewEtemCalculations.Rows.AddRange(offerOverviewResult.OfferOverviewEtemCalculationsTableRows); this.tblOverviewSummaryExpenses.Rows.AddRange(offerOverviewResult.OfferOverviewSummaryExpensesTableRows); } else { base.AddErrorMessage(this.lbResultContext, offerOverviewResult.ResultContext.Message); } }