protected override string Execute(CodeActivityContext context) { try { int userId = UserId.Get <int>(context); int workspaceId = WorkspaceId.Get <int>(context); int fpid = FPId.Get <int>(context); int subsystemId = SubsystemId.Get <int>(context); string reportName = ReportName.Get <string>(context); string[] paramTypes = new[] { ParamTypes.Get <string>(context) }; string[] paramValues = new[] { ParamValues.Get <string>(context) }; string outputFileName = PrintReport(userId, workspaceId, fpid, subsystemId, reportName, paramTypes, paramValues, out string exceptionStr); if (outputFileName == null) { return(exceptionStr); } return(Convert.ToBase64String(File.ReadAllBytes(outputFileName))); } catch (Exception ex) { EventLog.WriteEntry("BasePrint.TadbirPrint", ex.Message); return("-4"); //ex.Message; //throw ex; } }
public override int GetHashCode() { unchecked { int hashCode = (Id != null ? Id.GetHashCode() : 0); hashCode = (hashCode * 397) ^ VersionCounter.GetHashCode(); hashCode = (hashCode * 397) ^ Created.GetHashCode(); hashCode = (hashCode * 397) ^ LastUpdated.GetHashCode(); hashCode = (hashCode * 397) ^ (CreatedBy != null ? CreatedBy.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (WorkspaceId != null ? WorkspaceId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BranchName != null ? BranchName.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { return(WorkspaceId.GetHashCode()); }