Ejemplo n.º 1
0
        /// <summary>
        /// Tạo mời một Cat_SyncItem
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Create([Bind] Cat_SyncItemModel model)
        {
            var service = new RestServiceClient <Cat_SyncItemModel>(UserLogin);

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

            return(Json(result));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Cat_SyncItemModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Cat_SyncItemModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Cat_SyncItemEntity>(id, ConstantSql.hrm_cat_sp_get_ImportItemById, ref status);

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

            return(service.UpdateOrCreate <Cat_SyncItemEntity, Cat_SyncItemModel>(model));
        }