using DevExpress.Pdf.Native; using HStation.Service.Xhs; namespace HStation.WinFrmUI { /// /// /// public class XhsProjectMgrViewModel { /// /// /// public XhsProjectMgrViewModel() { } public enum eFileStatus { /// /// 上传中 /// [Display(Name = "上传中")] Uploading, /// /// 上传成功 /// [Display(Name = "上传成功")] UploadSucceed, /// /// 转换中 /// [Display(Name = "转换中")] Converting, /// /// 转换成功 /// [Display(Name = "转换成功")] ConvertSucceed, /// /// 对比中 /// [Display(Name = "对比中")] Comparing, /// /// 对比成功 /// [Display(Name = "对比成功")] CompareSucceed, /// /// 集成中 /// [Display(Name = "集成中")] Integrating, /// /// 集成成功 /// [Display(Name = "集成成功")] IntegrateSucceed, /// /// 未上传 /// [Display(Name = "未上传")] Noupload, } public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project, bool IsHaveBimface, int BimfaceState, Yw.Vmo.Map.MapInfo mapInfo) { this.ID = project.ID; this.ParentID = project.ParentID; this.NO = project.NO; this.Name = project.Name; if (mapInfo != null) { this.Address = Yw.Model.Map.Marker.ToModel(mapInfo.Position).Address; } this.CreateTime = project.NO.Substring(4, 10); this.Customer = project.Customer; this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags); this.TagName = project.TagName; this.SortCode = project.SortCode; this.Description = project.Description; this.IsHaveBimface = IsHaveBimface; this.ModelState = (eFileStatus)BimfaceState; } public void Reset(Vmo.Xhs.XhsProjectExtensions project) { this.ID = project.ID; this.ParentID = project.ParentID; this.NO = project.NO; this.Name = project.Name; this.Address = project.Address; this.Customer = project.Customer; this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags); this.TagName = project.TagName; this.SortCode = project.SortCode; this.Description = project.Description; } public void Reset(XhsProjectMgrViewModel project, int BimfaceState) { this.ID = project.ID; this.ParentID = project.ParentID; this.NO = project.NO; this.Name = project.Name; this.Address = project.Address; this.Customer = project.Customer; this.TagName = project.TagName; this.SortCode = project.SortCode; this.Description = project.Description; this.ModelState = (eFileStatus)BimfaceState; } public XhsProjectMgrViewModel(HStation.WinFrmUI.ImportXhsProjectViewModel project, int BimfaceState) { this.ID = (long)project.ProjectID; this.NO = project.NO; this.CreateTime = project.NO.Substring(4, 10); this.Name = project.Name; this.Address = project.Address; this.Customer = project.Customer; this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags); this.TagName = project.TagName; this.Description = project.Description; } /// /// ID /// [Display(Name = "ID")] public long ID { get; set; } /// /// 父级ID /// [Display(Name = "ID")] public long ParentID { get; set; } /// /// 编号 /// [Display(Name = "项目编号")] public string NO { get; set; } /// /// 名称 /// [Display(Name = "项目名称")] public string Name { get; set; } /// /// 生效时间 /// [Display(Name = "生效时间")] public string StartTime { get; set; } /// /// 失效时间 /// [Display(Name = "失效时间")] public string EndTime { get; set; } /// /// 发布状态 /// [Display(Name = "发布状态")] public string PublishStatus { get; set; } /// /// 详细地址 /// [Display(Name = "详细地址")] public string Address { get; set; } /// /// 创建时间 /// [Display(Name = "创建时间")] public string CreateTime { get; set; } /// /// 客户 /// [Display(Name = "客户名称")] public string Customer { get; set; } /// /// 模型状态 /// [Display(Name = "模型状态")] public eFileStatus? ModelState { get; set; } /// /// 标签 /// [Display(Name = "标签")] public string Flags { get; set; } /// /// 标志 /// [Display(Name = "标志")] public string TagName { get; set; } /// /// 排序码 /// [Display(Name = "排序码")] public int SortCode { get; set; } /// /// 说明 /// [Display(Name = "说明")] public string Description { get; set; } /* /// /// 定位 /// [Display(Name = "定位")] public bool HasLocation { get; set; }*/ /// /// 是否存在三维模型 /// public bool IsHaveBimface { get; set; } } }