public ActionResult Edit([Bind] CatLateEarlyRuleModel model)
        {
            var service = new RestServiceClient <CatLateEarlyRuleModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            var result = service.Put(_hrm_Hr_Service, "api/CatLateEarlyRule/", model);

            return(Json(result));
        }
Exemple #2
0
        /// <summary>
        /// [Tin.Nguyen] - Lấy dữ liệu Lý Do Sớm Muộn(Cat_LateEarlyRule) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public CatLateEarlyRuleModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new CatLateEarlyRuleModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Cat_LateEarlyRuleEntity>(id, ConstantSql.hrm_cat_sp_get_LateEarlyRuleById, ref status);

            if (entity != null)
            {
                model = entity.CopyData <CatLateEarlyRuleModel>();
            }
            model.ActionStatus = status;
            return(model);
        }
Exemple #3
0
        public CatLateEarlyRuleModel Post([Bind] CatLateEarlyRuleModel model)
        {
            ActionService service = new ActionService(UserLogin);

            return(service.UpdateOrCreate <Cat_LateEarlyRuleEntity, CatLateEarlyRuleModel>(model));
        }