Beispiel #1
0
 public Cat_ShopModel Post([Bind] Cat_ShopModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_ShopModel>(model, "Cat_Shop", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Cat_ShopEntity, Cat_ShopModel>(model));
 }
Beispiel #2
0
        /// <summary>
        /// [Chuc.Nguyen] - Lấy dữ liệu Ngân Hàng(Cat_Bank) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Cat_ShopModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Cat_ShopModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Cat_ShopEntity>(id, ConstantSql.hrm_cat_sp_get_ShopById, ref status);

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