示例#1
0
 public CatNameEntityModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new CatNameEntityModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Cat_NameEntityEntity>(id, ConstantSql.hrm_cat_sp_get_NameEntityById, ref status);
     if(entity!= null)
     {
         model = entity.CopyData<CatNameEntityModel>();
     }
     model.ActionStatus = status;
     return model;
 }
示例#2
0
 /// <summary>
 /// xoa hay cap nhat mot doi tuong
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public CatNameEntityModel Post([Bind] CatNameEntityModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <CatNameEntityModel>(model, "Cat_TypeOfStop", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Cat_NameEntityEntity, CatNameEntityModel>(model));
 }
示例#3
0
        public CatNameEntityModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new CatNameEntityModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Cat_NameEntityEntity>(id, ConstantSql.hrm_cat_sp_get_NameEntityById, ref status);

            if (entity != null)
            {
                model = entity.CopyData <CatNameEntityModel>();
            }
            model.ActionStatus = status;
            return(model);
        }