/// <summary> /// 获取作业报告报表的部分字段描述信息 /// </summary> /// <param name="dr">报表所有字段信息</param> /// <param name="fieldsInRpt">选取的报表字段</param> /// <returns>报表信息</returns> public DataRow GetDispatchReportDesc(DataRow dr, List <string> fieldsInRpt) { if (SQLUtil.ConvertInt(dr["ReportID"]) != 0) { if (fieldsInRpt.Contains("ReportTypeDesc")) { dr["ReportTypeDesc"] = LookupManager.GetDispatchReportType(SQLUtil.ConvertInt(dr["TypeID"])).Name; } if (fieldsInRpt.Contains("ReportStatusDesc")) { dr["ReportStatusDesc"] = LookupManager.GetDispatchDocStatusDesc(SQLUtil.ConvertInt(dr["DispatchReportStatusID"])); } if (fieldsInRpt.Contains("ServiceProviderDesc")) { dr["ServiceProviderDesc"] = DispatchReportInfo.ServiceProviders.GetDescByID(SQLUtil.ConvertInt(dr["ServiceProvider"])); } if (fieldsInRpt.Contains("ReportEquipmentStatusDesc")) { dr["ReportEquipmentStatusDesc"] = LookupManager.GetEquipmentStatusDesc(SQLUtil.ConvertInt(dr["reportEquipmentStatus"])); } if (fieldsInRpt.Contains("ServiceScopeDesc")) { dr["ServiceScopeDesc"] = SQLUtil.ConvertBoolean(dr["ServiceScope"]) ? "是" : "否"; } if (fieldsInRpt.Contains("SolutionResultStatusDesc")) { dr["SolutionResultStatusDesc"] = LookupManager.GetSolutionResultStatusDesc(SQLUtil.ConvertInt(dr["SolutionResultStatusID"])); } if (fieldsInRpt.Contains("ReportIsRecallDesc")) { dr["ReportIsRecallDesc"] = SQLUtil.ConvertBoolean(dr["ReportIsRecall"]) ? "是" : "否"; } if (fieldsInRpt.Contains("IsPrivateDesc")) { dr["IsPrivateDesc"] = SQLUtil.ConvertBoolean(dr["IsPrivate"]) ? "是" : "否"; } } return(dr); }
/// <summary> /// 获取服务凭证报表的部分字段描述信息 /// </summary> /// <param name="dr">报表所有字段信息</param> /// <param name="fieldsInRpt">选取的报表字段</param> /// <returns>报表信息</returns> public DataRow GetDispatchJournalDesc(DataRow dr, List <string> fieldsInRpt) { if (SQLUtil.ConvertInt(dr["JournalID"]) != 0) { if (fieldsInRpt.Contains("ResultStatusDesc")) { dr["ResultStatusDesc"] = LookupManager.GetDispatchJournalResultStatusDesc(SQLUtil.ConvertInt(dr["ResultStatusID"])); } if (fieldsInRpt.Contains("SignedDesc")) { dr["SignedDesc"] = (SQLUtil.ConvertInt(dr["JournalID"]) > 0) ? (SQLUtil.ConvertBoolean(dr["Signed"]) ? "是" : "否") : ""; } if (fieldsInRpt.Contains("JournalStatusDesc")) { dr["JournalStatusDesc"] = LookupManager.GetDispatchDocStatusDesc(SQLUtil.ConvertInt(dr["DispatchJournalStatusID"])); } } return(dr); }