Exemplo n.º 1
0
        public Sal_RevenueForShopModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Sal_RevenueForShopModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Sal_RevenueForShopEntity>(id, ConstantSql.hrm_sal_sp_get_RevenueForShopById, ref status);//note

            if (entity != null)
            {
                model = entity.CopyData <Sal_RevenueForShopModel>();
            }
            model.ActionStatus = status;
            return(model);
        }
Exemplo n.º 2
0
        public Sal_RevenueForShopModel Post([Bind] Sal_RevenueForShopModel model)
        {
            #region Validate
            string message       = string.Empty;
            var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Sal_RevenueForShopModel>(model, "Sal_RevenueForShop", ref message);
            if (!checkValidate)
            {
                model.ActionStatus = message;
                return(model);
            }
            #endregion

            ActionService service = new ActionService(UserLogin);
            return(service.UpdateOrCreate <Sal_RevenueForShopEntity, Sal_RevenueForShopModel>(model));
        }