Пример #1
0
 /// <summary>
 /// [Tho.Bui] - Lấy dữ liệu Quốc Gia(Cat_Country) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Sal_GradeModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sal_GradeModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Sal_GradeEntity>(id, ConstantSql.hrm_sal_sp_get_GradeById, ref status);//note
     if (entity != null)
     {
         model = entity.CopyData<Sal_GradeModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Пример #2
0
        public ActionResult Create(Sal_GradeModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Sal_GradeModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
                var result = service.Put(_hrm_Hr_Service, "api/Sal_Grade/", model);
                ViewBag.MsgInsert = ConstantDisplay.HRM_Att_Grade_InsertSuccess.TranslateString();
            }
            return View();
        }
Пример #3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sal_GradeModel Sal_Grade)
 {
     //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Att_Grade);
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Sal_GradeModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Sal_Grade/", Sal_Grade);
         //return Json(result);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_Att_Grade_UpdateSuccess.TranslateString();
     }
     return View();
 }