/** * OA_CorporateClients.cs * * 功 能: N/A * 类 名: OA_CorporateClients * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-2 14:27:43 N/A 初版 * * * * * * */ using System; using CY.Infrastructure.Domain; using CY.Infrastructure.Common; namespace CY.Model { /// /// 印刷参数 /// [Serializable] public partial class OA_DriverRecord : IAggregateRoot { public OA_DriverRecord() { } #region Model /// /// id /// public Guid Id { get; set; } /// /// 里程表 公里 /// public int Mileage { get; set; } /// /// 车况 暂时不要 /// public string Condition { get; set; } /// /// 备注 /// public string Remark { get; set; } /// /// 未装货情况 /// public string EmptyCause { get; set; } /// /// 创建时间 /// public DateTime CreatTime { get; set; } /// /// 创建人的memberId /// public Guid? CreaterID { get; set; } /// /// 车辆ID /// public int CarID { get; set; } /// /// 车辆名称 /// public string CarName { get; set; } /// /// 创建人 /// public string Creater { get; set; } /// /// 打卡类型,0 代表未知,1代表上班出车,2代表下班 3 代表草稿 /// public int? ClockType { get; set; } /// /// 状态名称 /// public string ClockTypeName { get { if (ClockType.HasValue) { if (ClockType.Value == 1) { return "上班"; } else if (ClockType.Value == 2) { return "下班"; } else if (ClockType.Value == 3) { return "草稿"; } else { return "未知"; } } else { return "未知"; } } } /// /// 里程图片 /// public string MileageImg { get; set; } public string MileageImgName { get; set; } public string CarConditionImg { get; set; } public string ZhuangcheImg { get; set; } /// /// 车况 /// public string CarCondition { get; set; } // 附件表 4是装货照片 5是车况 #endregion Model #region Visiter /// /// 属性访问器 /// /// 属性名 /// 索引 /// 是否将指定属性设置为传入值 /// 需要赋予的值 /// 与名称对应的属性值 public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) { object theValue = null; if ("Id".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1) { this.Id = isChange ? MyConvert.ConvertToGuid(value) : Id; theValue = this.Id; } else if ("Mileage".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) { this.Mileage = isChange ? MyConvert.ConvertToInt32(value).Value : Mileage; theValue = this.Mileage; } else if ("Condition".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) { this.Condition = isChange ? MyConvert.ConvertToString(value) : Condition; theValue = this.Condition; } else if ("Remark".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4) { this.Remark = isChange ? MyConvert.ConvertToString(value) : Remark; theValue = this.Remark; } else if ("EmptyCause".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5) { this.EmptyCause = isChange ? MyConvert.ConvertToString(value) : EmptyCause; theValue = this.EmptyCause; } else if ("CreatTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6) { this.CreatTime = isChange ? MyConvert.ConvertToDateTime(value).Value : CreatTime; theValue = this.CreatTime; } else if ("CreaterID".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7) { this.CreaterID = isChange ? MyConvert.ConvertToGuid(value) : CreaterID; theValue = this.CreaterID; } else if ("CarID".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8) { this.CarID = isChange ? MyConvert.ConvertToInt32(value).Value : CarID; theValue = this.CarID; } else if ("Creater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9) { this.Creater = isChange ? MyConvert.ConvertToString(value) : Creater; theValue = this.Creater; } else if ("ClockType".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10) { this.ClockType = isChange ? MyConvert.ConvertToInt32(value) : ClockType; theValue = this.ClockType; } else if ("MileageImg".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11) { this.MileageImg = isChange ? MyConvert.ConvertToString(value) : MileageImg; theValue = this.MileageImg; } else if ("CarCondition".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12) { this.CarCondition = isChange ? MyConvert.ConvertToString(value) : CarCondition; theValue = this.CarCondition; } else if ("CarName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13) { this.CarName = isChange ? MyConvert.ConvertToString(value) : CarName; theValue = this.CarName; } return theValue; } #endregion } }