public static SalaryBoardDynamicColumnModel Update(SalaryBoardDynamicColumnModel model) { var entity = hr_SalaryBoardDynamicColumnService.GetById(model.Id); if (entity == null) { return(null); } model.FillEntity(ref entity); return(new SalaryBoardDynamicColumnModel(hr_SalaryBoardDynamicColumnService.Update(entity))); }
public static SalaryBoardDynamicColumnModel Create(SalaryBoardDynamicColumnModel model) { var entity = new hr_SalaryBoardDynamicColumn(); // check if column value exists var existsModel = GetAll(null, model.RecordId.ToString(), model.SalaryBoardId, model.ColumnCode, true, null, 1); if (existsModel != null && existsModel.Count > 0) { return(null); } model.FillEntity(ref entity); return(new SalaryBoardDynamicColumnModel(hr_SalaryBoardDynamicColumnService.Create(entity))); }