public Person() { this.ID = Guid.NewGuid(); this.UpdateTime = DateTime.Now; this.CreateDateTime = DateTime.Now; this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <Person>(); }
} // 关联上传人ID public BusinessImage() { this.ID = Guid.NewGuid(); this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <BusinessImage>(); this.UploadedTime = DateTime.Now; this.IsForTitle = false; }
public ActionResult Save(PersonVM boVM) { if (ModelState.IsValid) { var bo = _Service.GetSingle(boVM.ID); if (bo == null) { bo = new Person(); bo.ID = boVM.ID; } boVM.MapToBo(bo); var creID = Guid.Parse(boVM.CredentialsTypeID); var credentialType = _Service.GetSingleRelevance <CredentialsType>(creID); var jlID = Guid.Parse(boVM.JobLevelID); var jobLevel = _Service.GetSingleRelevance <JobLevel>(jlID); var jtID = Guid.Parse(boVM.JobTitleID); var jobTitle = _Service.GetSingleRelevance <JobTitle>(jtID); var dID = Guid.Parse(boVM.ParentItemID); var dept = _Service.GetSingleRelevance <Department>(dID); bo.Name = bo.FirstName + bo.LastName; if (String.IsNullOrEmpty(bo.SortCode)) { bo.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <Person>(); } bo.CredentialsType = credentialType; bo.JobLevel = jobLevel; bo.JobTitle = jobTitle; bo.Department = dept; bo.UpdateTime = DateTime.Now; bo.IsActivePerson = true; _Service.AddOrEditAndSave(bo); //var personInDepartment = _Service.GetSingleRelevanceBy<PersonsInDepartment>(p => p.Person.ID == bo.ID && p.Department.ID == dID); //if (personInDepartment == null) //{ // personInDepartment = new PersonsInDepartment() { Department = dept, Person = bo }; // _Service.AddAndSaveRelevance<PersonsInDepartment>(personInDepartment); //} var typeID = boVM.ParentItemID; return(Json(PageComponentRepository <PersonVM> .SaveOK(true, "1", typeID))); } else { var vItems = new List <ValidatorResult>(); foreach (var item in ModelState) { if (item.Value.Errors != null) { foreach (var vItem in item.Value.Errors) { var errItem = new ValidatorResult(); errItem.Name = item.Key; errItem.ErrorMessage = vItem.ErrorMessage; vItems.Add(errItem); } } } boVM.ParentItemColection = BusinessCollectionFactory <Department> .GetSelfReferentialItemCollection(true); boVM.CredentialsTypeCollection = BusinessCollectionFactory <CredentialsType> .GetPlainFacadeItemCollection(); boVM.JobLevelCollection = BusinessCollectionFactory <JobLevel> .GetPlainFacadeItemCollection(); boVM.JobTitleCollection = BusinessCollectionFactory <JobTitle> .GetPlainFacadeItemCollection(); var editor = PageComponentRepository <PersonVM> .UpdateCreateOrEditDialog(boVM, false, vItems).InnerHtmlContent; return(Json(editor)); } }
public DepartmentTypeInDepartment() { this.ID = Guid.NewGuid(); this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <DepartmentTypeInDepartment>(); }
} //订单创建时间 public SK_WM_ShopCarGoodsItem() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <SK_WM_ShopCarGoodsItem>(); this.ID = Guid.NewGuid(); }
public BusinessFile() { this.BussinessCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <BusinessFile>(); }
} // 关联上传人ID public BusinessFile() { this.Id = Guid.NewGuid(); this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <BusinessFile>(); this.AttachmentTimeUploaded = DateTime.Now; }
public YZ_Commodity() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <YZ_Commodity>(); this.Id = Guid.NewGuid(); this.AddTime = DateTime.Now; }
public Person() { ID = Guid.NewGuid(); UpdateTime = CreateDateTime = Birthday = ExpiredDateTime = DateTime.Now; SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <Person>(); }
} //系统审核员ID public SK_WM_ShopSttled() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <SK_WM_Goods>(); this.ID = Guid.NewGuid(); this.State = 0; }
public SK_WM_Shop() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <SK_WM_Shop>(); this.ID = Guid.NewGuid(); SettledDateTime = DateTime.Now; }
} //绑定的User //public virtual IQueryable<SK_WM_OrderItem> SK_WM_OrderItem { get; set; } public SK_WM_Order() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <SK_WM_Order>(); this.ID = Guid.NewGuid(); }
public ApplicaitionUserInApplication() { this.ID = Guid.NewGuid(); this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <ApplicationInformation>(); }
public MessageNotification() { ID = Guid.NewGuid(); CreateDateTime = DateTime.Now; SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <MessageNotification>(); }
} // 备案号 public WebSiteSettings() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <WebSiteSettings>(); this.Id = Guid.NewGuid(); }
} // 上级部门 public Department() { this.Id = Guid.NewGuid(); this.IsActiveDepartment = true; this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <Department>(); }
} // 审核人 public AuditRecord() { Id = Guid.NewGuid(); BussinessCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <AuditRecord>(); AuditDateTime = DateTime.Now; }
} // 授权任务 public AccreditRoleGroup() { this.ID = Guid.NewGuid(); this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <AccreditRoleGroup>(); }
public SK_WM_ShopExecuteIllegal() { this.SortCode = BusinessEntityComponentsFactory.SortCodeByDefaultDateTime <SK_WM_Goods>(); this.ID = Guid.NewGuid(); }