示例#1
0
        public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Rec_TagModel user)
        {
            var service = new RestServiceClient <Rec_SourceAdsModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Put(_Hrm_Hre_Service, "api/Rec_SourceAds/", user);

            return(Json(result));
        }
示例#2
0
        /// <summary>
        /// Tạo mới một Rec_Tag
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Create([Bind] Rec_TagModel model)
        {
            var service = new RestServiceClient <Rec_TagModel>(UserLogin);

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

            return(Json(result));
        }
示例#3
0
 public Rec_TagModel Post([Bind] Rec_TagModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Rec_TagModel>(model, "Rec_Tag", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Rec_TagEntity, Rec_TagModel>(model));
 }
示例#4
0
        public Rec_TagModel GetById(Guid id)
        {
            string status  = string.Empty;
            var    model   = new Rec_TagModel();
            var    service = new ActionService(UserLogin);
            var    entity  = service.GetByIdUseStore <Rec_TagEntity>(id, ConstantSql.hrm_rec_sp_get_TagById, ref status);

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