private void FillReport(bool throwException = true) { ReportCompositeRequest req = GetRequest(); ListResponse <Model.Reports.RT106> resp = _reportsService.ChildGetAll <Model.Reports.RT106>(req); //if (resp == null || string.IsNullOrEmpty(resp.Error)) //{ // throw new Exception(GetGlobalResourceObject("Errors", "Error_1").ToString()); //} //if (!resp.Success) //{ // throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>"); //} if (!resp.Success) { Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString()); } TurnoverRate y = new TurnoverRate(); y.RightToLeft = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No; y.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No; resp.Items.ForEach(x => { x.MonthString = CultureInfo.CurrentUICulture.DateTimeFormat.GetMonthName(x.month); x.month = x.month - 1; x.rate = x.rate / 100; }); y.DataSource = resp.Items; string user = _systemService.SessionHelper.GetCurrentUser(); y.Parameters["User"].Value = user; ASPxWebDocumentViewer1.DataBind(); ASPxWebDocumentViewer1.OpenReport(y); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; // Suitable nullity checks etc, of course :) if (Date != null) { hashCode = hashCode * 59 + Date.GetHashCode(); } if (Rehabilitation != null) { hashCode = hashCode * 59 + Rehabilitation.GetHashCode(); } if (TurnoverRate != null) { hashCode = hashCode * 59 + TurnoverRate.GetHashCode(); } if (Per != null) { hashCode = hashCode * 59 + Per.GetHashCode(); } if (Psr != null) { hashCode = hashCode * 59 + Psr.GetHashCode(); } if (Pcfr != null) { hashCode = hashCode * 59 + Pcfr.GetHashCode(); } if (Pbr != null) { hashCode = hashCode * 59 + Pbr.GetHashCode(); } if (Stopped != null) { hashCode = hashCode * 59 + Stopped.GetHashCode(); } if (SpecialTreatment != null) { hashCode = hashCode * 59 + SpecialTreatment.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if DailyPrice instances are equal /// </summary> /// <param name="other">Instance of DailyPrice to be compared</param> /// <returns>Boolean</returns> public bool Equals(DailyPrice other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (Equals((PriceBase)other) && ( Date == other.Date || Date != null && Date.Equals(other.Date) ) && ( PreClosing == other.PreClosing || PreClosing != null && PreClosing.Equals(other.PreClosing) ) && ( Rehabilitation == other.Rehabilitation || Rehabilitation != null && Rehabilitation.Equals(other.Rehabilitation) ) && ( TurnoverRate == other.TurnoverRate || TurnoverRate != null && TurnoverRate.Equals(other.TurnoverRate) ) && ( Per == other.Per || Per != null && Per.Equals(other.Per) ) && ( Psr == other.Psr || Psr != null && Psr.Equals(other.Psr) ) && ( Pcfr == other.Pcfr || Pcfr != null && Pcfr.Equals(other.Pcfr) ) && ( Pbr == other.Pbr || Pbr != null && Pbr.Equals(other.Pbr) ) && ( Stopped == other.Stopped || Stopped != null && Stopped.Equals(other.Stopped) ) && ( SpecialTreatment == other.SpecialTreatment || SpecialTreatment != null && SpecialTreatment.Equals(other.SpecialTreatment) )); }