Ejemplo n.º 1
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="dr">The dr.</param>
        public UserInfo(DataRow dr)
            : this()
        {
            this.ID                = SQLUtil.ConvertInt(dr["ID"]);
            this.LoginID           = SQLUtil.TrimNull(dr["LoginID"]);
            this.LoginPwd          = SQLUtil.TrimNull(dr["LoginPwd"]);
            this.Name              = SQLUtil.TrimNull(dr["Name"]);
            this.Role.ID           = SQLUtil.ConvertInt(dr["RoleID"]);
            this.Role.Name         = Manager.LookupManager.GetRoleDesc(this.Role.ID);
            this.Mobile            = SQLUtil.TrimNull(dr["Mobile"]);
            this.Email             = SQLUtil.TrimNull(dr["Email"]);
            this.Address           = SQLUtil.TrimNull(dr["Address"]);
            this.IsActive          = SQLUtil.ConvertBoolean(dr["IsActive"]);
            this.LastLoginDate     = SQLUtil.ConvertDateTime(dr["LastLoginDate"]);
            this.SessionID         = SQLUtil.TrimNull(dr["SessionID"]);
            this.WebSessionID      = SQLUtil.TrimNull(dr["WebSessionID"]);
            this.CreatedDate       = SQLUtil.ConvertDateTime(dr["CreatedDate"]);
            this.RegistrationID    = SQLUtil.TrimNull(dr["RegistrationID"]);
            this.OSName            = SQLUtil.TrimNull(dr["OSName"]);
            this.VerifyStatus.ID   = SQLUtil.ConvertInt(dr["VerifyStatus"]);
            this.VerifyStatus.Name = BusinessObjects.Domain.VerifyStatus.GetVerifyStatusDesc(this.VerifyStatus.ID);
            this.Comments          = SQLUtil.TrimNull(dr["Comments"]);
            this.Department.ID     = SQLUtil.ConvertInt(dr["Department"]);
            this.Department.Name   = Manager.LookupManager.GetDepartmentDesc(this.Department.ID);

            if (dr.Table.Columns.Contains("HasOpenDispatch"))
            {
                this.HasOpenDispatch = SQLUtil.ConvertBoolean(dr["HasOpenDispatch"]);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改耗材信息
        /// </summary>
        /// <param name="info">耗材信息</param>
        /// <returns>耗材id</returns>
        public int UpdateConsumable(ConsumableInfo info)
        {
            sqlStr = "UPDATE tblConsumable Set FujiClass2ID=@FujiClass2ID,Name=@Name,Description=@Description,TypeID=@TypeID,StdPrice=@StdPrice, " +
                     " ReplaceTimes=@ReplaceTimes,CostPer=@CostPer,IsIncluded=@IsIncluded,IncludeContract=@IncludeContract," +
                     " IsActive=@IsActive,UpdateDate=GetDate() " +
                     " WHERE ID = @ID";

            using (SqlCommand command = ConnectionUtil.GetCommand(sqlStr))
            {
                command.Parameters.Add("@ID", SqlDbType.Int).Value               = info.ID;
                command.Parameters.Add("@FujiClass2ID", SqlDbType.Int).Value     = SQLUtil.ConvertInt(info.FujiClass2.ID);
                command.Parameters.Add("@Name", SqlDbType.NVarChar).Value        = SQLUtil.TrimNull(info.Name);
                command.Parameters.Add("@Description", SqlDbType.NVarChar).Value = SQLUtil.TrimNull(info.Description);
                command.Parameters.Add("@TypeID", SqlDbType.Int).Value           = SQLUtil.ConvertInt(info.Type.ID);
                command.Parameters.Add("@ReplaceTimes", SqlDbType.Decimal).Value = info.ReplaceTimes;
                command.Parameters.Add("@CostPer", SqlDbType.Decimal).Value      = info.CostPer;
                command.Parameters.Add("@StdPrice", SqlDbType.Decimal).Value     = info.StdPrice;
                command.Parameters.Add("@IsIncluded", SqlDbType.Bit).Value       = SQLUtil.ConvertBoolean(info.IsIncluded);
                command.Parameters.Add("@IncludeContract", SqlDbType.Bit).Value  = SQLUtil.ConvertBoolean(info.IncludeContract);
                command.Parameters.Add("@IsActive", SqlDbType.Bit).Value         = SQLUtil.ConvertBoolean(info.IsActive);

                command.ExecuteNonQuery();

                return(info.ID);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取耗材修改字段dt
        /// </summary>
        /// <param name="newInfo">修改后的耗材信息</param>
        /// <returns>耗材修改字段dt</returns>
        public DataTable GetChangedFields(ConsumableInfo newInfo)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("FieldName");
            dt.Columns.Add("OldValue");
            dt.Columns.Add("NewValue");

            if (this.FujiClass2.ID != newInfo.FujiClass2.ID)
            {
                dt.Rows.Add("ConsumableFujiClass2", SQLUtil.TrimNull(this.FujiClass2.Name), SQLUtil.TrimNull(newInfo.FujiClass2.Name));
            }

            if (this.Name != SQLUtil.TrimNull(newInfo.Name))
            {
                dt.Rows.Add("ConsumableName", this.Name, newInfo.Name);
            }

            if (this.Description != SQLUtil.TrimNull(newInfo.Description))
            {
                dt.Rows.Add("ConsumableDescription", this.Description, SQLUtil.TrimNull(newInfo.Description));
            }

            if (this.Type.ID != newInfo.Type.ID)
            {
                dt.Rows.Add("ConsumableType", this.Type.Name, LookupManager.GetConsumabletypeDesc(newInfo.Type.ID));
            }

            if (this.StdPrice != newInfo.StdPrice)
            {
                dt.Rows.Add("ConsumableStdPrice", SQLUtil.ConvertDouble(this.StdPrice), SQLUtil.ConvertDouble(newInfo.StdPrice));
            }

            if (this.ReplaceTimes != newInfo.ReplaceTimes)
            {
                dt.Rows.Add("ConsumableReplaceTimes", SQLUtil.ConvertDouble(this.ReplaceTimes), SQLUtil.ConvertDouble(newInfo.ReplaceTimes));
            }

            if (this.CostPer != newInfo.CostPer)
            {
                dt.Rows.Add("ConsumableCostPer", SQLUtil.ConvertDouble(this.CostPer), SQLUtil.ConvertDouble(newInfo.CostPer));
            }

            if (this.IsIncluded != newInfo.IsIncluded)
            {
                dt.Rows.Add("ConsumableIsIncluded", SQLUtil.ConvertBoolean(this.IsIncluded) ? "是" : "否", SQLUtil.ConvertBoolean(newInfo.IsIncluded) ? "是" : "否");
            }

            if (this.IncludeContract != newInfo.IncludeContract)
            {
                dt.Rows.Add("ConsumableIncludeContract", SQLUtil.ConvertBoolean(this.IncludeContract) ? "是" : "否", SQLUtil.ConvertBoolean(newInfo.IncludeContract) ? "是" : "否");
            }

            if (this.IsActive != newInfo.IsActive)
            {
                dt.Rows.Add("ConsumableIsActive", SQLUtil.ConvertBoolean(this.IsActive) ? "启用" : "停用", SQLUtil.ConvertBoolean(newInfo.IsActive) ? "启用" : "停用");
            }

            return(dt);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 添加零件
        /// </summary>
        /// <param name="info">零件信息</param>
        /// <returns>零件id</returns>
        public int AddComponent(ComponentInfo info)
        {
            sqlStr = "INSERT INTO tblComponent(FujiClass2ID,Name,Description,TypeID,StdPrice,Usage,TotalSeconds,SecondsPer,IsIncluded,IncludeContract,MethodID,LifeTime,IsActive,AddDate) " +
                     " VALUES(@FujiClass2ID,@Name,@Description,@TypeID,@StdPrice,@Usage,@TotalSeconds,@SecondsPer,@IsIncluded,@IncludeContract,@MethodID,@LifeTime,@IsActive,GetDate()); " +
                     " SELECT @@IDENTITY ";

            using (SqlCommand command = ConnectionUtil.GetCommand(sqlStr))
            {
                command.Parameters.Add("@FujiClass2ID", SqlDbType.Int).Value     = SQLUtil.ConvertInt(info.FujiClass2.ID);
                command.Parameters.Add("@Name", SqlDbType.NVarChar).Value        = SQLUtil.TrimNull(info.Name);
                command.Parameters.Add("@Description", SqlDbType.NVarChar).Value = SQLUtil.TrimNull(info.Description);
                command.Parameters.Add("@TypeID", SqlDbType.Int).Value           = SQLUtil.ConvertInt(info.Type.ID);
                command.Parameters.Add("@StdPrice", SqlDbType.Decimal).Value     = info.StdPrice;
                command.Parameters.Add("@Usage", SqlDbType.Int).Value            = SQLUtil.ConvertInt(info.Usage);
                command.Parameters.Add("@TotalSeconds", SqlDbType.Int).Value     = SQLUtil.ConvertInt(info.TotalSeconds);
                command.Parameters.Add("@SecondsPer", SqlDbType.Decimal).Value   = info.SecondsPer;
                command.Parameters.Add("@IsIncluded", SqlDbType.Bit).Value       = SQLUtil.ConvertBoolean(info.IsIncluded);
                command.Parameters.Add("@IncludeContract", SqlDbType.Bit).Value  = SQLUtil.ConvertBoolean(info.IncludeContract);
                command.Parameters.Add("@MethodID", SqlDbType.Int).Value         = (int)info.Method == 0 ? FujiClass2Info.Method.Manual : info.Method;
                command.Parameters.Add("@LifeTime", SqlDbType.Int).Value         = SQLUtil.ConvertInt(info.LifeTime);
                command.Parameters.Add("@IsActive", SqlDbType.Bit).Value         = SQLUtil.ConvertBoolean(info.IsActive);

                info.ID = SQLUtil.ConvertInt(command.ExecuteScalar());

                return(info.ID);
            }
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 修改零件信息
        /// </summary>
        /// <param name="info">零件信息</param>
        /// <returns>零件id</returns>
        public int UpdateComponent(ComponentInfo info)
        {
            sqlStr = "UPDATE tblComponent Set FujiClass2ID=@FujiClass2ID,Name=@Name,Description=@Description,TypeID=@TypeID,StdPrice=@StdPrice, " +
                     " Usage=@Usage,TotalSeconds=@TotalSeconds,SecondsPer=@SecondsPer,IsIncluded=@IsIncluded,IncludeContract=@IncludeContract," +
                     " MethodID=@MethodID,LifeTime=@LifeTime,IsActive=@IsActive,UpdateDate=GetDate() " +
                     " WHERE ID = @ID";

            using (SqlCommand command = ConnectionUtil.GetCommand(sqlStr))
            {
                command.Parameters.Add("@ID", SqlDbType.Int).Value               = info.ID;
                command.Parameters.Add("@FujiClass2ID", SqlDbType.Int).Value     = SQLUtil.ConvertInt(info.FujiClass2.ID);
                command.Parameters.Add("@Name", SqlDbType.NVarChar).Value        = SQLUtil.TrimNull(info.Name);
                command.Parameters.Add("@Description", SqlDbType.NVarChar).Value = SQLUtil.TrimNull(info.Description);
                command.Parameters.Add("@TypeID", SqlDbType.Int).Value           = SQLUtil.ConvertInt(info.Type.ID);
                command.Parameters.Add("@StdPrice", SqlDbType.Decimal).Value     = info.StdPrice;
                command.Parameters.Add("@Usage", SqlDbType.Int).Value            = SQLUtil.ConvertInt(info.Usage);
                command.Parameters.Add("@TotalSeconds", SqlDbType.Int).Value     = SQLUtil.ConvertInt(info.TotalSeconds);
                command.Parameters.Add("@SecondsPer", SqlDbType.Decimal).Value   = info.SecondsPer;
                command.Parameters.Add("@IsIncluded", SqlDbType.Bit).Value       = SQLUtil.ConvertBoolean(info.IsIncluded);
                command.Parameters.Add("@IncludeContract", SqlDbType.Bit).Value  = SQLUtil.ConvertBoolean(info.IncludeContract);
                command.Parameters.Add("@MethodID", SqlDbType.Int).Value         = (int)info.Method == 0 ? FujiClass2Info.Method.Manual : info.Method;
                command.Parameters.Add("@LifeTime", SqlDbType.Int).Value         = SQLUtil.ConvertInt(info.LifeTime);
                command.Parameters.Add("@IsActive", SqlDbType.Bit).Value         = SQLUtil.ConvertBoolean(info.IsActive);

                command.ExecuteNonQuery();

                return(info.ID);
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 估价执行:零件清单Info
 /// </summary>
 /// <param name="dr">数据</param>
 public ValComponentInfo(DataRow dr)
     : this()
 {
     this.User.ID                   = SQLUtil.ConvertInt(dr["UserID"]);
     this.User.Name                 = SQLUtil.TrimNull(dr["UserName"]);
     this.InSystem                  = SQLUtil.ConvertBoolean(dr["InSystem"]);
     this.Equipment.ID              = SQLUtil.ConvertInt(dr["EquipmentID"]);
     this.Equipment.Name            = SQLUtil.TrimNull(dr["Name"]);
     this.Equipment.AssetCode       = SQLUtil.TrimNull(dr["AssetCode"]);
     this.EquipmentType.ID          = SQLUtil.ConvertInt(dr["EquipmentType"]);
     this.EquipmentType.Name        = LookupManager.GetEquipmentTypeDesc(this.EquipmentType.ID);
     this.Equipment.FujiClass2.Name = SQLUtil.TrimNull(dr["FujiClass2Name"]);
     this.Component.ID              = SQLUtil.ConvertInt(dr["ComponentID"]);
     this.Component.Name            = this.Component.ID == 0 ? ComponentType.WholeMachine : SQLUtil.TrimNull(dr["ComponentName"]);
     this.Component.Type.ID         = SQLUtil.ConvertInt(dr["TypeID"]);
     this.Component.StdPrice        = SQLUtil.ConvertDouble(dr["StdPrice"]);
     this.Component.SecondsPer      = SQLUtil.ConvertDouble(dr["SecondsPer"]);
     this.Component.TotalSeconds    = SQLUtil.ConvertInt(dr["TotalSeconds"]);
     this.Component.Usage           = SQLUtil.ConvertInt(dr["ComponentUsage"]);
     this.Qty             = SQLUtil.ConvertInt(dr["Qty"]);
     this.Usage           = SQLUtil.ConvertInt(dr["Usage"]);
     this.Seconds         = SQLUtil.ConvertDouble(dr["Seconds"]);
     this.UsedSeconds     = SQLUtil.ConvertDouble(dr["UsedSeconds"]);
     this.IncludeContract = SQLUtil.ConvertBoolean(dr["IncludeContract"]);
     this.UsageRefere     = SQLUtil.ConvertInt(dr["UsageRefere"]);
     if (dr.Table.Columns.Contains("UseageDate"))
     {
         this.UseageDate = SQLUtil.ConvertDateTime(dr["UseageDate"]);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 获取广播信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public NoticeInfo(DataRow dr)
     : this()
 {
     this.ID          = SQLUtil.ConvertInt(dr["ID"]);
     this.Name        = SQLUtil.TrimNull(dr["Name"]);
     this.Content     = SQLUtil.TrimNull(dr["Content"]);
     this.Comments    = SQLUtil.TrimNull(dr["Comments"]);
     this.IsLoop      = SQLUtil.ConvertBoolean(dr["IsLoop"]);
     this.CreatedDate = SQLUtil.ConvertDateTime(dr["CreatedDate"]);
 }
Ejemplo n.º 9
0
 public UserInfo(DataRow dr) : this()
 {
     this.ID          = SQLUtil.ConvertInt(dr["ID"]);
     this.IsAdmin     = SQLUtil.ConvertBoolean(dr["IsAdmin"]);
     this.LoginID     = SQLUtil.TrimNull(dr["LoginID"]);
     this.LoginPwd    = SQLUtil.TrimNull(dr["LoginPwd"]);
     this.Name        = SQLUtil.TrimNull(dr["Name"]);
     this.Email       = SQLUtil.TrimNull(dr["Email"]);
     this.CreatedDate = SQLUtil.ConvertDateTime(dr["CreatedDate"]);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 服务库info
 /// </summary>
 /// <param name="dr">dr</param>
 public InvServiceInfo(DataRow dr)
     : this()
 {
     if (dr.Table.Columns.Contains("ID"))
     {
         this.ID = SQLUtil.ConvertInt(dr["ID"]);
     }
     this.FujiClass2.ID = SQLUtil.ConvertInt(dr["FujiClass2ID"]);
     if (dr.Table.Columns.Contains("FujiClass2Name"))
     {
         this.FujiClass2.Name = SQLUtil.TrimNull(dr["FujiClass2Name"]);
     }
     this.Name       = SQLUtil.TrimNull(dr["Name"]);
     this.TotalTimes = SQLUtil.ConvertInt(dr["TotalTimes"]);
     this.Price      = SQLUtil.ConvertDouble(dr["Price"]);
     this.StartDate  = SQLUtil.ConvertDateTime(dr["StartDate"]);
     this.EndDate    = SQLUtil.ConvertDateTime(dr["EndDate"]);
     if (dr.Table.Columns.Contains("SupplierID"))
     {
         this.Supplier.ID = SQLUtil.ConvertInt(dr["SupplierID"]);
     }
     if (dr.Table.Columns.Contains("SupplierName"))
     {
         this.Supplier.Name = SQLUtil.TrimNull(dr["SupplierName"]);
     }
     this.Purchase.ID   = SQLUtil.ConvertInt(dr["PurchaseID"]);
     this.Purchase.Name = LookupManager.GetObjectOID(ObjectTypes.PurchaseOrder, this.Purchase.ID);
     if (dr.Table.Columns.Contains("PurchaseDate"))
     {
         this.PurchaseDate = SQLUtil.ConvertDateTime(dr["PurchaseDate"]);
     }
     if (dr.Table.Columns.Contains("Comments"))
     {
         this.Comments = SQLUtil.TrimNull(dr["Comments"]);
     }
     if (dr.Table.Columns.Contains("AddDate"))
     {
         this.AddDate = SQLUtil.ConvertDateTime(dr["AddDate"]);
     }
     if (dr.Table.Columns.Contains("AvaibleTimes"))
     {
         this.AvaibleTimes = SQLUtil.ConvertInt(dr["AvaibleTimes"]);
     }
     if (dr.Table.Columns.Contains("UpdateDate"))
     {
         this.UpdateDate = SQLUtil.ConvertDateTime(dr["UpdateDate"]);
     }
     if (dr.Table.Columns.Contains("Inbounded"))
     {
         this.Inbounded = SQLUtil.ConvertBoolean(dr["Inbounded"]);
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 估价执行条件:维保对耗材的覆盖情况Info
 /// </summary>
 /// <param name="dr">数据</param>
 public ValConsumableInfo(DataRow dr)
     : this()
 {
     this.User.ID   = SQLUtil.ConvertInt(dr["UserID"]);
     this.User.Name = SQLUtil.TrimNull(dr["UserName"]);
     this.Consumable.FujiClass2.ID   = SQLUtil.ConvertInt(dr["FujiClass2ID"]);
     this.Consumable.FujiClass2.Name = SQLUtil.TrimNull(dr["FujiClass2Name"]);
     this.Consumable.ID           = SQLUtil.ConvertInt(dr["ConsumableID"]);
     this.Consumable.Name         = SQLUtil.TrimNull(dr["ConsumableName"]);
     this.Consumable.CostPer      = SQLUtil.ConvertDouble(dr["CostPer"]);
     this.Consumable.ReplaceTimes = SQLUtil.ConvertDouble(dr["ReplaceTimes"]);
     this.IncludeContract         = SQLUtil.ConvertBoolean(dr["IncludeContract"]);
 }
Ejemplo n.º 12
0
 public SupplierInfo(DataRow dr)
     : this()
 {
     this.SupplierType.ID = SQLUtil.ConvertInt(dr["TypeID"]);
     this.Name            = SQLUtil.TrimNull(dr["Name"]);
     this.Province        = SQLUtil.TrimNull(dr["State/City"]);
     this.Mobile          = SQLUtil.TrimNull(dr["Phone"]);
     this.Address         = SQLUtil.TrimNull(dr["Address"]);
     this.Contact         = SQLUtil.TrimNull(dr["ContactPerson"]);
     this.ContactMobile   = SQLUtil.TrimNull(dr["ContactPhone"]);
     this.AddDate         = SQLUtil.ConvertDateTime(dr["AddDate"]);
     this.IsActive        = SQLUtil.ConvertBoolean(dr["Status"]);
 }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取修改的字段
        /// </summary>
        /// <param name="newInfo">修改后的信息</param>
        /// <returns>修改的字段</returns>
        public DataTable GetChangedFields(SupplierInfo newInfo)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("FieldName");
            dt.Columns.Add("OldValue");
            dt.Columns.Add("NewValue");

            if (this.SupplierType.ID != newInfo.SupplierType.ID)
            {
                dt.Rows.Add("SupplierType", this.SupplierType.Name, Manager.LookupManager.GetSupplierTypeDesc(newInfo.SupplierType.ID));
            }

            if (this.Name != SQLUtil.TrimNull(newInfo.Name))
            {
                dt.Rows.Add("SupplierName", this.Name, newInfo.Name == null ? "" : newInfo.Name);
            }

            if (this.Province != SQLUtil.TrimNull(newInfo.Province))
            {
                dt.Rows.Add("SupplierProvince", this.Province, newInfo.Province == null ? "" : newInfo.Province);
            }

            if (this.Mobile != SQLUtil.TrimNull(newInfo.Mobile))
            {
                dt.Rows.Add("SupplierMobile", this.Mobile, newInfo.Mobile == null ? "" : newInfo.Mobile);
            }

            if (this.Address != SQLUtil.TrimNull(newInfo.Address))
            {
                dt.Rows.Add("SupplierAddress", this.Address, newInfo.Address == null ? "" : newInfo.Address);
            }

            if (this.Contact != SQLUtil.TrimNull(newInfo.Contact))
            {
                dt.Rows.Add("SupplierContact", this.Contact, newInfo.Contact == null ? "" : newInfo.Contact);
            }

            if (this.ContactMobile != SQLUtil.TrimNull(newInfo.ContactMobile))
            {
                dt.Rows.Add("SupplierContactMobile", this.ContactMobile, newInfo.ContactMobile == null ? "" : newInfo.ContactMobile);
            }

            if (this.IsActive != newInfo.IsActive)
            {
                dt.Rows.Add("SupplierStatus", SQLUtil.ConvertBoolean(this.IsActive) ? "启用" : "停用", SQLUtil.ConvertBoolean(newInfo.IsActive) ? "启用" : "停用");
            }
            return(dt);
        }
Ejemplo n.º 14
0
 /// <summary>
 /// 获取供应商信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public SupplierInfo(DataRow dr)
     : this()
 {
     this.ID = SQLUtil.ConvertInt(dr["ID"]);
     this.SupplierType.ID   = SQLUtil.ConvertInt(dr["TypeID"]);
     this.SupplierType.Name = Manager.LookupManager.GetSupplierTypeDesc(this.SupplierType.ID);
     this.Name          = SQLUtil.TrimNull(dr["Name"]);
     this.Province      = SQLUtil.TrimNull(dr["Province"]);
     this.Mobile        = SQLUtil.TrimNull(dr["Mobile"]);
     this.Address       = SQLUtil.TrimNull(dr["Address"]);
     this.Contact       = SQLUtil.TrimNull(dr["Contact"]);
     this.ContactMobile = SQLUtil.TrimNull(dr["ContactMobile"]);
     this.AddDate       = SQLUtil.ConvertDateTime(dr["AddDate"]);
     this.IsActive      = SQLUtil.ConvertBoolean(dr["IsActive"]);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// 获取系统信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public SmtpInfo(DataRow dr)
     : this()
 {
     this.AdminEmail      = SQLUtil.TrimNull(dr["AdminEmail"]);
     this.Host            = SQLUtil.TrimNull(dr["SmtpHost"]);
     this.Port            = SQLUtil.ConvertInt(dr["SmtpPort"]);
     this.UseSsl          = SQLUtil.ConvertBoolean(dr["SmtpUseSsl"]);
     this.UserName        = SQLUtil.TrimNull(dr["SmtpUserName"]);
     this.Pwd             = SQLUtil.TrimNull(dr["SmtpPwd"]);
     this.EmailFrom       = SQLUtil.TrimNull(dr["SmtpEmailFrom"]);
     this.MessageKey      = SQLUtil.TrimNull(dr["MessageKey"]);
     this.MessageEnabled  = SQLUtil.ConvertBoolean(dr["MessageEnabled"]);
     this.AppValidVersion = SQLUtil.TrimNull(dr["AppValidVersion"]);
     this.MobilePhone     = SQLUtil.TrimNull(dr["MobilePhone"]);
 }
Ejemplo n.º 16
0
 public EquipmentInfo(DataRow dr)
     : this()
 {
     this.EquipmentLevel.ID = SQLUtil.ConvertInt(dr["EquipmentLevel"]);
     this.Name                   = SQLUtil.TrimNull(dr["Name"]);
     this.EquipmentCode          = SQLUtil.TrimNull(dr["Model"]);
     this.SerialCode             = SQLUtil.TrimNull(dr["SerialNo#"]);
     this.ManufacturerID         = SQLUtil.ConvertInt(dr["ManufacturerID"]);
     this.EquipmentClass1        = SQLUtil.ConvertInt(dr["EquipmentClass1"]);
     this.EquipmentClass2        = SQLUtil.ConvertInt(dr["EquipmentClass2"]);
     this.EquipmentClass3        = SQLUtil.ConvertInt(dr["EquipmentClass3"]);
     this.ResponseTimeLength     = SQLUtil.ConvertInt(dr["StandardResponseTime(minutes)"]);
     this.FixedAsset             = SQLUtil.ConvertBoolean(dr["FixedAsset"]);
     this.AssetCode              = SQLUtil.TrimNull(dr["AssetNumber"]);
     this.AssetLevel.ID          = SQLUtil.ConvertInt(dr["AssetClassID"]);
     this.DepreciationYears      = SQLUtil.ConvertInt(dr["DepreciationYears"]);
     this.ValidityStartDate      = SQLUtil.ConvertDateTime(dr["DurationofCertificateStartDate"]);
     this.ValidityEndDate        = SQLUtil.ConvertDateTime(dr["DurationofCertificateEndDate"]);
     this.SaleContractName       = SQLUtil.TrimNull(dr["SalesContract"]);
     this.SupplierID             = SQLUtil.ConvertInt(dr["DealerID"]);
     this.PurchaseWay            = SQLUtil.TrimNull(dr["PurchaseType"]);
     this.PurchaseAmount         = SQLUtil.ConvertDouble(dr["PurchaseAmount"]);
     this.PurchaseDate           = SQLUtil.ConvertDateTime(dr["PurchaseDate"]);
     this.IsImport               = SQLUtil.ConvertBoolean(dr["ProductionDistrict"]);
     this.Department.ID          = SQLUtil.ConvertInt(dr["DepartmentID"]);
     this.InstalSite             = SQLUtil.TrimNull(dr["InstallationLocation"]);
     this.InstalStartDate        = SQLUtil.ConvertDateTime(dr["InstalStartDate"]);
     this.InstalEndDate          = SQLUtil.ConvertDateTime(dr["InstalEndDate"]);
     this.Accepted               = SQLUtil.ConvertBoolean(dr["AcceptanceStatus"]);
     this.AcceptanceDate         = SQLUtil.ConvertDateTime(dr["AcceptanceDate"]);
     this.UsageStatus.ID         = SQLUtil.ConvertInt(dr["StatusofUse"]);
     this.EquipmentStatus.ID     = SQLUtil.ConvertInt(dr["EquipmentStatusID"]);
     this.ScrapDate              = SQLUtil.ConvertDateTime(dr["DisposalDate"]);
     this.MaintenancePeriod      = SQLUtil.ConvertInt(dr["MaintenancePeriod"]);
     this.MaintenanceType.ID     = SQLUtil.ConvertInt(dr["MaintenanceTypeID"]);
     this.PatrolPeriod           = SQLUtil.ConvertInt(dr["PatrolPeriod"]);
     this.PatrolType.ID          = SQLUtil.ConvertInt(dr["PatrolTypeID"]);
     this.CorrectionPeriod       = SQLUtil.ConvertInt(dr["CalibrationPeriod"]);
     this.CorrectionType.ID      = SQLUtil.ConvertInt(dr["CalibrationTypeID"]);
     this.MandatoryTestStatus.ID = SQLUtil.ConvertInt(dr["InspectionFlag"]);
     this.MandatoryTestDate      = SQLUtil.ConvertDateTime(dr["InspectionDate"]);
     this.RecallFlag             = SQLUtil.ConvertBoolean(dr["RecallFlag"]);
     this.RecallDate             = SQLUtil.ConvertDateTime(dr["RecallDate"]);
     this.CreateDate             = SQLUtil.ConvertDateTime(dr["CreateDate"]);
     this.CreateUserID           = SQLUtil.ConvertInt(dr["CreateUserID"]);
 }
Ejemplo n.º 17
0
 public DispatchReportInfo(DataRow dr)
     : this()
 {
     this.DispatchID               = SQLUtil.ConvertInt(dr["DispatchID"]);
     this.Type.ID                  = SQLUtil.ConvertInt(dr["ReportTypeID"]);
     this.FaultCode                = SQLUtil.TrimNull(dr["ErrorCode"]);
     this.FaultDesc                = SQLUtil.TrimNull(dr["FaultDescription"]);
     this.SolutionCauseAnalysis    = SQLUtil.TrimNull(dr["Reason"]);
     this.SolutionWay              = SQLUtil.TrimNull(dr["Solution"]);
     this.IsPrivate                = SQLUtil.ConvertBoolean(dr["SpecialFormat"]);
     this.ServiceProvider.ID       = SQLUtil.ConvertInt(dr["ServiceProvider"]);
     this.SolutionResultStatus.ID  = SQLUtil.ConvertInt(dr["WorkSummaryID"]);
     this.SolutionUnsolvedComments = SQLUtil.TrimNull(dr["ProblemEscalation"]);
     this.DelayReason              = SQLUtil.TrimNull(dr["MissedworkNote"]);
     this.Comments                 = SQLUtil.TrimNull(dr["Note"]);
     this.FujiComments             = SQLUtil.TrimNull(dr["ReviewNote"]);
     this.Status.ID                = SQLUtil.ConvertInt(dr["ServiceReportStatusID"]);
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 获取服务凭证信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public DispatchJournalInfo(DataRow dr)
     : this()
 {
     this.ID                = SQLUtil.ConvertInt(dr["ID"]);
     this.Dispatch.ID       = SQLUtil.ConvertInt(dr["DispatchID"]);
     this.FaultCode         = SQLUtil.TrimNull(dr["FaultCode"]);
     this.JobContent        = SQLUtil.TrimNull(dr["JobContent"]);
     this.FollowProblem     = SQLUtil.TrimNull(dr["FollowProblem"]);
     this.Advice            = SQLUtil.TrimNull(dr["Advice"]);
     this.UserName          = SQLUtil.TrimNull(dr["UserName"]);
     this.UserMobile        = SQLUtil.TrimNull(dr["UserMobile"]);
     this.Signed            = SQLUtil.ConvertBoolean(dr["Signed"]);
     this.Status.ID         = SQLUtil.ConvertInt(dr["StatusID"]);
     this.Status.Name       = LookupManager.GetDispatchDocStatusDesc(this.Status.ID);
     this.ResultStatus.ID   = SQLUtil.ConvertInt(dr["ResultStatusID"]);
     this.ResultStatus.Name = LookupManager.GetDispatchJournalResultStatusDesc(this.ResultStatus.ID);
     this.FujiComments      = SQLUtil.TrimNull(dr["FujiComments"]);
 }
Ejemplo n.º 19
0
 /// <summary>
 /// 耗材info
 /// </summary>
 /// <param name="dr">dr</param>
 public ConsumableInfo(DataRow dr)
     : this()
 {
     this.ID              = SQLUtil.ConvertInt(dr["ID"]);
     this.FujiClass2.ID   = SQLUtil.ConvertInt(dr["FujiClass2ID"]);
     this.FujiClass2.Name = SQLUtil.TrimNull(dr["FujiClass2Name"]);
     this.Name            = SQLUtil.TrimNull(dr["Name"]);
     this.Description     = SQLUtil.TrimNull(dr["Description"]);
     this.Type.ID         = SQLUtil.ConvertInt(dr["TypeID"]);
     this.Type.Name       = LookupManager.GetConsumabletypeDesc(this.Type.ID);
     this.ReplaceTimes    = SQLUtil.ConvertDouble(dr["ReplaceTimes"]);
     this.CostPer         = SQLUtil.ConvertDouble(dr["CostPer"]);
     this.StdPrice        = SQLUtil.ConvertDouble(dr["StdPrice"]);
     this.IsIncluded      = SQLUtil.ConvertBoolean(dr["IsIncluded"]);
     this.IncludeContract = SQLUtil.ConvertBoolean(dr["IncludeContract"]);
     this.IsActive        = SQLUtil.ConvertBoolean(dr["IsActive"]);
     this.AddDate         = SQLUtil.ConvertDateTime(dr["AddDate"]);
     this.UpdateDate      = SQLUtil.ConvertDateTime(dr["UpdateDate"]);
 }
Ejemplo n.º 20
0
        /// <summary>
        /// 估价执行条件:设备清单Info
        /// </summary>
        /// <param name="dr"></param>
        public ValEquipmentInfo(DataRow dr)
            : this()
        {
            this.User.ID                              = SQLUtil.ConvertInt(dr["UserID"]);
            this.User.Name                            = SQLUtil.TrimNull(dr["UserName"]);
            this.Equipment.ID                         = SQLUtil.ConvertInt(dr["EquipmentID"]);
            this.Equipment.AssetCode                  = SQLUtil.TrimNull(dr["AssetCode"]);
            this.Equipment.Name                       = SQLUtil.TrimNull(dr["Name"]);
            this.Equipment.SerialCode                 = SQLUtil.TrimNull(dr["SerialCode"]);
            this.Equipment.Manufacturer.Name          = SQLUtil.TrimNull(dr["Manufacturer"]);
            this.Equipment.FujiClass2.ID              = SQLUtil.ConvertInt(dr["FujiClass2ID"]);
            this.Equipment.FujiClass2.Name            = SQLUtil.TrimNull(dr["FujiClass2Name"]);
            this.Equipment.FujiClass2.FujiClass1.ID   = SQLUtil.ConvertInt(dr["FujiClass1ID"]);
            this.Equipment.FujiClass2.FujiClass1.Name = SQLUtil.TrimNull(dr["FujiClass1Name"]);
            if (dr.Table.Columns.Contains("EquipmentTypeID"))
            {
                this.Equipment.FujiClass2.EquipmentType.ID   = SQLUtil.ConvertInt(dr["EquipmentTypeID"]);
                this.Equipment.FujiClass2.EquipmentType.Name = LookupManager.GetEquipmentTypeDesc(this.Equipment.FujiClass2.EquipmentType.ID);
            }
            if (dr.Table.Columns.Contains("FullCoveragePtg"))
            {
                this.Equipment.FujiClass2.FullCoveragePtg = SQLUtil.ConvertDouble(dr["FullCoveragePtg"]);
            }
            if (dr.Table.Columns.Contains("TechCoveragePtg"))
            {
                this.Equipment.FujiClass2.TechCoveragePtg = SQLUtil.ConvertDouble(dr["TechCoveragePtg"]);
            }

            this.Equipment.Department.Name = SQLUtil.TrimNull(dr["Department"]);
            this.Equipment.PurchaseAmount  = SQLUtil.ConvertDouble(dr["PurchaseAmount"]);
            this.Equipment.UseageDate      = SQLUtil.ConvertDateTime(dr["UseageDate"]);
            this.CurrentScope.ID           = SQLUtil.ConvertInt(dr["CurrentScopeID"]);
            this.CurrentScope.Name         = ScopeTypes.GetScopeDesc(this.CurrentScope.ID);
            this.NextScope.ID     = SQLUtil.ConvertInt(dr["NextScopeID"]);
            this.NextScope.Name   = ScopeTypes.GetScopeDesc(this.NextScope.ID);
            this.EndDate          = SQLUtil.ConvertDateTime(dr["EndDate"]);
            this.InSystem         = SQLUtil.ConvertBoolean(dr["InSystem"]);
            this.PatrolHours      = SQLUtil.ConvertDouble(dr["PatrolHours"]);
            this.MaintenanceHours = SQLUtil.ConvertDouble(dr["MaintenanceHours"]);
            this.RepairHours      = SQLUtil.ConvertDouble(dr["RepairHours"]);
        }
Ejemplo n.º 21
0
        /// <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);
        }
Ejemplo n.º 22
0
        /// <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);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 获取合同报表的部分字段描述信息
        /// </summary>
        /// <param name="dr">报表所有字段信息</param>
        /// <param name="fieldsInRpt">选取的报表字段</param>
        /// <returns>报表信息</returns>
        public DataRow GetContractDesc(DataRow dr, List <string> fieldsInRpt)
        {
            if (fieldsInRpt.Contains("TypeDesc"))
            {
                dr["TypeDesc"] = LookupManager.GetContractTypeDesc(SQLUtil.ConvertInt(dr["TypeID"]));
            }
            if (fieldsInRpt.Contains("ScopeDesc"))
            {
                dr["ScopeDesc"] = LookupManager.GetContractScopeDesc(SQLUtil.ConvertInt(dr["ScopeID"]));
            }
            if (fieldsInRpt.Contains("SupplierType"))
            {
                dr["SupplierType"] = LookupManager.GetSupplierTypeDesc(SQLUtil.ConvertInt(dr["SupplierTypeID"]));
            }
            if (fieldsInRpt.Contains("SupplierStatus"))
            {
                dr["SupplierStatus"] = SQLUtil.ConvertBoolean(dr["SupplierStatusID"]) ? "启用" : "停用";
            }

            return(dr);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 富士II类info
        /// </summary>
        /// <param name="dr">dr</param>
        public FujiClass2Info(DataRow dr)
            : this()
        {
            this.ID            = SQLUtil.ConvertInt(dr["ID"]);
            this.Name          = SQLUtil.TrimNull(dr["Name"]);
            this.Description   = SQLUtil.TrimNull(dr["Description"]);
            this.FujiClass1.ID = SQLUtil.ConvertInt(dr["FujiClass1ID"]);
            if (dr.Table.Columns.Contains("FujiClass1Name"))
            {
                this.FujiClass1.Name = SQLUtil.TrimNull(dr["FujiClass1Name"]);
            }

            this.IncludeLabour    = SQLUtil.ConvertBoolean(dr["IncludeLabour"]);
            this.PatrolTimes      = SQLUtil.ConvertDouble(dr["PatrolTimes"]);
            this.PatrolHours      = SQLUtil.ConvertDouble(dr["PatrolHours"]);
            this.MaintenanceTimes = SQLUtil.ConvertDouble(dr["MaintenanceTimes"]);
            this.MaintenanceHours = SQLUtil.ConvertDouble(dr["MaintenanceHours"]);
            this.RepairHours      = SQLUtil.ConvertDouble(dr["RepairHours"]);

            this.IncludeContract = SQLUtil.ConvertBoolean(dr["IncludeContract"]);
            this.FullCoveragePtg = SQLUtil.ConvertDouble(dr["FullCoveragePtg"]);
            this.TechCoveragePtg = SQLUtil.ConvertDouble(dr["TechCoveragePtg"]);

            this.IncludeSpare = SQLUtil.ConvertBoolean(dr["IncludeSpare"]);
            this.SparePrice   = SQLUtil.ConvertDouble(dr["SparePrice"]);
            this.SpareRentPtg = SQLUtil.ConvertDouble(dr["SpareRentPtg"]);

            this.IncludeRepair       = SQLUtil.ConvertBoolean(dr["IncludeRepair"]);
            this.Usage               = SQLUtil.ConvertInt(dr["Usage"]);
            this.EquipmentType.ID    = SQLUtil.ConvertInt(dr["EquipmentType"]);
            this.EquipmentType.Name  = LookupManager.GetEquipmentTypeDesc(this.EquipmentType.ID);
            this.RepairComponentCost = SQLUtil.ConvertDouble(dr["RepairComponentCost"]);
            this.Repair3partyRatio   = SQLUtil.ConvertDouble(dr["Repair3partyRatio"]);
            this.Repair3partyCost    = SQLUtil.ConvertDouble(dr["Repair3partyCost"]);
            this.RepairCostRatio     = SQLUtil.ConvertDouble(dr["RepairCostRatio"]);
            this.MethodID            = SQLUtil.ConvertEnum <Method>(dr["MethodID"]);

            this.AddDate    = SQLUtil.ConvertDateTime(dr["AddDate"]);
            this.UpdateDate = SQLUtil.ConvertDateTime(dr["UpdateDate"]);
        }
Ejemplo n.º 25
0
 public RequestInfo(DataRow dr)
     : this()
 {
     this.Source.ID          = SQLUtil.ConvertInt(dr["Category"]);
     this.IsRecall           = SQLUtil.ConvertBoolean(dr["IsRecall"]);
     this.RequestType.ID     = SQLUtil.ConvertInt(dr["RequestType"]);
     this.RequestUser.ID     = SQLUtil.ConvertInt(dr["CustomerID"]);
     this.RequestUser.Name   = SQLUtil.TrimNull(dr["CustomerName"]);
     this.RequestUser.Mobile = SQLUtil.TrimNull(dr["CustomerMobile"]);
     this.Subject            = SQLUtil.TrimNull(dr["Subject"]);
     this.FaultDesc          = SQLUtil.TrimNull(dr["FaultDescription"]);
     this.MachineStatus.ID   = SQLUtil.ConvertInt(dr["EquipmentStatusID"]);
     this.FaultType.ID       = SQLUtil.ConvertInt(dr["FaultTypeID"]);
     this.Status.ID          = SQLUtil.ConvertInt(dr["RequestStatusID"]);
     this.DealType.ID        = SQLUtil.ConvertInt(dr["SolutionID"]);
     this.Priority.ID        = SQLUtil.ConvertInt(dr["EmergencyLevelID"]);
     this.RequestDate        = SQLUtil.ConvertDateTime(dr["RequestDate"]);
     this.DistributeDate     = SQLUtil.ConvertDateTime(dr["DistributeDate"]);
     this.ResponseDate       = SQLUtil.ConvertDateTime(dr["ResponseDate"]);
     this.CloseDate          = SQLUtil.ConvertDateTime(dr["CloseDate"]);
     this.SelectiveDate      = SQLUtil.ConvertDateTime(dr["RescheduledDate"]);
 }
Ejemplo n.º 26
0
        /// <summary>
        /// 估价前提条件Info
        /// </summary>
        /// <param name="dr">数据</param>
        public ValControlInfo(DataRow dr)
            : this()
        {
            this.CtlFlag    = SQLUtil.TrimNull(dr["CtlFlag"]);
            this.User.ID    = SQLUtil.ConvertInt(dr["UserID"]);
            this.UpdateDate = SQLUtil.ConvertDateTime(dr["UpdateDate"]);
            this.IsExecuted = SQLUtil.ConvertBoolean(dr["IsExecuted"]);

            this.EndDate           = SQLUtil.ConvertDateTime(dr["EndDate"]);
            this.ContractStartDate = SQLUtil.ConvertDateTime(dr["ContractStartDate"]);
            this.Years             = SQLUtil.ConvertInt(dr["Years"]);
            this.HospitalLevel.ID  = SQLUtil.ConvertInt(dr["HospitalLevel"]);
            this.ImportCost        = SQLUtil.ConvertDouble(dr["ImportCost"]);
            this.ProfitMargins     = SQLUtil.ConvertDouble(dr["ProfitMargins"]);
            this.RiskRatio         = SQLUtil.ConvertDouble(dr["RiskRatio"]);
            this.VarAmount         = SQLUtil.ConvertDouble(dr["VarAmount"]);
            this.ComputeEngineer   = SQLUtil.ConvertInt(dr["ComputeEngineer"]);
            this.ForecastEngineer  = SQLUtil.ConvertInt(dr["ForecastEngineer"]);
            this.HospitalFactor1   = SQLUtil.ConvertDouble(dr["HospitalFactor1"]);
            this.HospitalFactor2   = SQLUtil.ConvertDouble(dr["HospitalFactor2"]);
            this.HospitalFactor3   = SQLUtil.ConvertDouble(dr["HospitalFactor3"]);
        }
Ejemplo n.º 27
0
 /// <summary>
 /// 零件info
 /// </summary>
 /// <param name="dr">dr</param>
 public ComponentInfo(DataRow dr)
     : this()
 {
     this.ID              = SQLUtil.ConvertInt(dr["ID"]);
     this.FujiClass2.ID   = SQLUtil.ConvertInt(dr["FujiClass2ID"]);
     this.FujiClass2.Name = SQLUtil.TrimNull(dr["FujiClass2Name"]);
     this.Name            = SQLUtil.TrimNull(dr["Name"]);
     this.Description     = SQLUtil.TrimNull(dr["Description"]);
     this.Type.ID         = SQLUtil.ConvertInt(dr["TypeID"]);
     this.Type.Name       = LookupManager.GetComponentTypeDesc(this.Type.ID);
     this.StdPrice        = SQLUtil.ConvertDouble(dr["StdPrice"]);
     this.Usage           = SQLUtil.ConvertInt(dr["Usage"]);
     this.TotalSeconds    = SQLUtil.ConvertInt(dr["TotalSeconds"]);
     this.SecondsPer      = SQLUtil.ConvertDouble(dr["SecondsPer"]);
     this.IsIncluded      = SQLUtil.ConvertBoolean(dr["IsIncluded"]);
     this.IncludeContract = SQLUtil.ConvertBoolean(dr["IncludeContract"]);
     this.Method          = SQLUtil.ConvertEnum <FujiClass2Info.Method>(dr["MethodID"]);
     this.LifeTime        = SQLUtil.ConvertInt(dr["LifeTime"]);
     this.IsActive        = SQLUtil.ConvertBoolean(dr["IsActive"]);
     this.AddDate         = SQLUtil.ConvertDateTime(dr["AddDate"]);
     this.UpdateDate      = SQLUtil.ConvertDateTime(dr["UpdateDate"]);
 }
Ejemplo n.º 28
0
 /// <summary>
 /// 富士类别关联信息
 /// </summary>
 /// <param name="dr">dr</param>
 public FujiClassLink(DataRow dr)
     : this()
 {
     this.FujiClass2.ID          = SQLUtil.ConvertInt(dr["ID"]);
     this.FujiClass2.Name        = SQLUtil.TrimNull(dr["Name"]);
     this.FujiClass2.Description = SQLUtil.TrimNull(dr["Description"]);
     if (dr.Table.Columns.Contains("EquipmentType1ID"))
     {
         this.EquipmentType1.Code        = SQLUtil.TrimNull(dr["EquipmentType1ID"]);
         this.EquipmentType1.Description = LookupManager.GetEquipmentClassDesc(this.EquipmentType1.Code, 1);
     }
     if (dr.Table.Columns.Contains("EquipmentType2ID"))
     {
         this.EquipmentType2.Code        = SQLUtil.TrimNull(dr["EquipmentType2ID"]);
         this.EquipmentType2.Description = LookupManager.GetEquipmentClassDesc(this.EquipmentType2.Code, 2, this.EquipmentType1.Code);
     }
     if (dr.Table.Columns.Contains("FujiClass1ID"))
     {
         this.FujiClass2.FujiClass1.ID = SQLUtil.ConvertInt(dr["FujiClass1ID"]);
     }
     if (dr.Table.Columns.Contains("FujiClass1Name"))
     {
         this.FujiClass2.FujiClass1.Name = SQLUtil.TrimNull(dr["FujiClass1Name"]);
     }
     if (dr.Table.Columns.Contains("FujiClass1Description"))
     {
         this.FujiClass2.FujiClass1.Description = SQLUtil.TrimNull(dr["FujiClass1Description"]);
     }
     if (dr.Table.Columns.Contains("FujiClass2Count"))
     {
         this.FujiClass2.FujiClass1.FujiClass2Count = SQLUtil.ConvertInt(dr["FujiClass2Count"]);
     }
     if (dr.Table.Columns.Contains("hasEdited"))
     {
         this.FujiClass2.hasEdited = SQLUtil.ConvertBoolean(dr["hasEdited"]);
     }
 }
Ejemplo n.º 29
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"]);
 }
Ejemplo n.º 30
0
        /// <summary>
        /// 添加耗材
        /// </summary>
        /// <param name="info">耗材信息</param>
        /// <returns>耗材id</returns>
        public int AddConsumable(ConsumableInfo info)
        {
            sqlStr = "INSERT INTO tblConsumable(FujiClass2ID,Name,Description,TypeID,ReplaceTimes, CostPer,StdPrice,IsIncluded,IncludeContract,IsActive,AddDate) " +
                     " VALUES(@FujiClass2ID,@Name,@Description,@TypeID,@ReplaceTimes,@CostPer,@StdPrice,@IsIncluded,@IncludeContract,@IsActive,GetDate()); " +
                     " SELECT @@IDENTITY ";

            using (SqlCommand command = ConnectionUtil.GetCommand(sqlStr))
            {
                command.Parameters.Add("@FujiClass2ID", SqlDbType.Int).Value     = SQLUtil.ConvertInt(info.FujiClass2.ID);
                command.Parameters.Add("@Name", SqlDbType.NVarChar).Value        = SQLUtil.TrimNull(info.Name);
                command.Parameters.Add("@Description", SqlDbType.NVarChar).Value = SQLUtil.TrimNull(info.Description);
                command.Parameters.Add("@TypeID", SqlDbType.Int).Value           = SQLUtil.ConvertInt(info.Type.ID);
                command.Parameters.Add("@ReplaceTimes", SqlDbType.Decimal).Value = info.ReplaceTimes;
                command.Parameters.Add("@CostPer", SqlDbType.Decimal).Value      = info.CostPer;
                command.Parameters.Add("@StdPrice", SqlDbType.Decimal).Value     = info.StdPrice;
                command.Parameters.Add("@IsIncluded", SqlDbType.Bit).Value       = SQLUtil.ConvertBoolean(info.IsIncluded);
                command.Parameters.Add("@IncludeContract", SqlDbType.Bit).Value  = SQLUtil.ConvertBoolean(info.IncludeContract);
                command.Parameters.Add("@IsActive", SqlDbType.Bit).Value         = SQLUtil.ConvertBoolean(info.IsActive);

                info.ID = SQLUtil.ConvertInt(command.ExecuteScalar());

                return(info.ID);
            }
        }