Beispiel #1
0
        /// <summary>
        /// 获取作业报告信息
        /// </summary>
        /// <param name="dr">The dr.</param>
        public DispatchReportInfo(DataRow dr)
            : this()
        {
            this.ID                        = SQLUtil.ConvertInt(dr["ID"]);
            this.Dispatch.ID               = SQLUtil.ConvertInt(dr["DispatchID"]);
            this.Type.ID                   = SQLUtil.ConvertInt(dr["TypeID"]);
            this.Type                      = LookupManager.GetDispatchReportType(this.Type.ID);
            this.FaultCode                 = SQLUtil.TrimNull(dr["FaultCode"]);
            this.FaultDesc                 = SQLUtil.TrimNull(dr["FaultDesc"]);
            this.SolutionCauseAnalysis     = SQLUtil.TrimNull(dr["SolutionCauseAnalysis"]);
            this.SolutionWay               = SQLUtil.TrimNull(dr["SolutionWay"]);
            this.IsPrivate                 = SQLUtil.ConvertBoolean(dr["IsPrivate"]);
            this.ServiceProvider.ID        = SQLUtil.ConvertInt(dr["ServiceProvider"]);
            this.ServiceProvider.Name      = ServiceProviders.GetDescByID(this.ServiceProvider.ID);
            this.SolutionResultStatus.ID   = SQLUtil.ConvertInt(dr["SolutionResultStatusID"]);
            this.SolutionResultStatus.Name = LookupManager.GetSolutionResultStatusDesc(this.SolutionResultStatus.ID);
            this.SolutionUnsolvedComments  = SQLUtil.TrimNull(dr["SolutionUnsolvedComments"]);
            this.DelayReason               = SQLUtil.TrimNull(dr["DelayReason"]);
            this.Comments                  = SQLUtil.TrimNull(dr["Comments"]);
            this.FujiComments              = SQLUtil.TrimNull(dr["FujiComments"]);
            this.Status.ID                 = SQLUtil.ConvertInt(dr["StatusID"]);
            this.Status.Name               = LookupManager.GetDispatchDocStatusDesc(this.Status.ID);

            this.PurchaseAmount       = SQLUtil.ConvertDouble(dr["PurchaseAmount"]); this.ServiceScope = SQLUtil.ConvertBoolean(dr["ServiceScope"]);
            this.ServiceScope         = SQLUtil.ConvertBoolean(dr["ServiceScope"]);
            this.Result               = SQLUtil.TrimNull(dr["Result"]);
            this.IsRecall             = SQLUtil.ConvertBoolean(dr["IsRecall"]);
            this.AcceptanceDate       = SQLUtil.ConvertDateTime(dr["AcceptanceDate"]);
            this.EquipmentStatus.ID   = SQLUtil.ConvertInt(dr["EquipmentStatus"]);
            this.EquipmentStatus.Name = MachineStatuses.GetMachineStatusesDesc(this.EquipmentStatus.ID);
        }
Beispiel #2
0
            /// <summary>
            /// 根据请求类型、故障分类编号获取故障分类字段描述
            /// </summary>
            /// <param name="requestType">请求类型</param>
            /// <param name="faultType">故障分类编号</param>
            /// <returns>故障分类字段描述</returns>
            public static string GetFaultTypeDesc(int requestType, int faultType)
            {
                switch (requestType)
                {
                case Repair:
                    return(MachineStatuses.GetMachineStatusesDesc(faultType));

                case Maintain:
                    return(MaintainType.GetMaintainTypeDesc(faultType));

                case Inspection:
                    return(InspectionType.GetInspectionDesc(faultType));

                case AdverseEvent:
                    return(AdverseEventType.GetAdverseEventDesc(faultType));

                default:
                    return("");
                }
            }
Beispiel #3
0
 /// <summary>
 /// 获取派工单信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public DispatchInfo(DataRow dr)
     : this()
 {
     this.ID                 = SQLUtil.ConvertInt(dr["ID"]);
     this.Request.ID         = SQLUtil.ConvertInt(dr["RequestID"]);
     this.RequestType.ID     = SQLUtil.ConvertInt(dr["RequestType"]);
     this.RequestType.Name   = LookupManager.GetRequestTypeDesc(this.RequestType.ID);
     this.Urgency.ID         = SQLUtil.ConvertInt(dr["UrgencyID"]);
     this.Urgency.Name       = LookupManager.GetUrgencyDesc(this.Urgency.ID);
     this.MachineStatus.ID   = SQLUtil.ConvertInt(dr["EquipmentStatus"]);
     this.MachineStatus.Name = MachineStatuses.GetMachineStatusesDesc(this.MachineStatus.ID);
     this.Engineer.ID        = SQLUtil.ConvertInt(dr["EngineerID"]);
     this.ScheduleDate       = SQLUtil.ConvertDateTime(dr["ScheduleDate"]);
     this.LeaderComments     = SQLUtil.TrimNull(dr["LeaderComments"]);
     this.Status.ID          = SQLUtil.ConvertInt(dr["StatusID"]);
     this.Status.Name        = LookupManager.GetDispatchStatusDesc(this.Status.ID);
     this.CreateDate         = SQLUtil.ConvertDateTime(dr["CreateDate"]);
     this.StartDate          = SQLUtil.ConvertDateTime(dr["StartDate"]);
     this.EndDate            = SQLUtil.ConvertDateTime(dr["EndDate"]);
     if (dr.Table.Columns.Contains("DispatchJournalID"))
     {
         this.DispatchJournal.ID = SQLUtil.ConvertInt(dr["DispatchJournalID"]);
     }
     if (dr.Table.Columns.Contains("DispatchJournalStatusID"))
     {
         this.DispatchJournal.Status.ID   = SQLUtil.ConvertInt(dr["DispatchJournalStatusID"]);
         this.DispatchJournal.Status.Name = LookupManager.GetDispatchDocStatusDesc(this.DispatchJournal.Status.ID);
     }
     if (dr.Table.Columns.Contains("DispatchReportID"))
     {
         this.DispatchReport.ID = SQLUtil.ConvertInt(dr["DispatchReportID"]);
     }
     if (dr.Table.Columns.Contains("DispatchReportStatusID"))
     {
         this.DispatchReport.Status.ID   = SQLUtil.ConvertInt(dr["DispatchReportStatusID"]);
         this.DispatchReport.Status.Name = LookupManager.GetDispatchDocStatusDesc(this.DispatchReport.Status.ID);
     }
 }
Beispiel #4
0
 /// <summary>
 /// 获取请求信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public RequestInfo(DataRow dr)
     : this()
 {
     this.ID                 = SQLUtil.ConvertInt(dr["ID"]);
     this.Source.ID          = SQLUtil.ConvertInt(dr["Source"]);
     this.Source.Name        = Sources.GetSourceDesc(this.Source.ID);
     this.RequestType.ID     = SQLUtil.ConvertInt(dr["RequestType"]);
     this.RequestType.Name   = Manager.LookupManager.GetRequestTypeDesc(this.RequestType.ID);
     this.RequestUser.ID     = SQLUtil.ConvertInt(dr["RequestUserID"]);
     this.RequestUser.Name   = SQLUtil.TrimNull(dr["RequestUserName"]);
     this.RequestUser.Mobile = SQLUtil.TrimNull(dr["RequestUserMobile"]);
     if (dr.Table.Columns.Contains("RequestUserRoleID"))
     {
         this.RequestUser.Role.Name = Manager.LookupManager.GetRoleDesc(SQLUtil.ConvertInt(dr["RequestUserRoleID"]));
     }
     this.Subject            = SQLUtil.TrimNull(dr["Subject"]);
     this.FaultDesc          = SQLUtil.TrimNull(dr["FaultDesc"]);
     this.MachineStatus.ID   = SQLUtil.ConvertInt(dr["EquipmentStatus"]);
     this.MachineStatus.Name = MachineStatuses.GetMachineStatusesDesc(this.MachineStatus.ID);
     this.FaultType.ID       = SQLUtil.ConvertInt(dr["FaultTypeID"]);
     this.FaultType.Name     = RequestTypes.GetFaultTypeDesc(this.RequestType.ID, this.FaultType.ID);
     this.Status.ID          = SQLUtil.ConvertInt(dr["StatusID"]);
     this.Status.Name        = Manager.LookupManager.GetRequestStatusDesc(this.Status.ID);
     this.DealType.ID        = SQLUtil.ConvertInt(dr["DealTypeID"]);
     this.DealType.Name      = Manager.LookupManager.GetDealTypeDesc(this.DealType.ID);
     this.Priority.ID        = SQLUtil.ConvertInt(dr["PriorityID"]);
     this.Priority.Name      = Manager.LookupManager.GetUrgencyDesc(this.Priority.ID);
     this.RequestDate        = SQLUtil.ConvertDateTime(dr["RequestDate"]);
     this.DistributeDate     = SQLUtil.ConvertDateTime(dr["DistributeDate"]);
     this.DispatchDate       = SQLUtil.ConvertDateTime(dr["DispatchDate"]);
     this.ResponseDate       = SQLUtil.ConvertDateTime(dr["ResponseDate"]);
     this.CloseDate          = SQLUtil.ConvertDateTime(dr["CloseDate"]);
     this.LastStatus.ID      = SQLUtil.ConvertInt(dr["LastStatusID"]);
     this.LastStatus.Name    = Manager.LookupManager.GetRequestStatusDesc(this.LastStatus.ID);
     this.IsRecall           = SQLUtil.ConvertBoolean(dr["IsRecall"]);
     this.SelectiveDate      = SQLUtil.ConvertDateTime(dr["SelectiveDate"]);
 }