public ActionResult Edit(Sys_AutoBackupModel model) { var service = new RestServiceClient <Sys_AutoBackupModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Post(_hrm_Sys_Service, "api/Sys_AutoBackup/", model); return(Json(result)); }
/// <summary> /// [Tin.Nguyen] - Xóa hoặc chuyển đổi trạng thái của Dân Tộc(Cat_ExportItem) sang IsDelete /// </summary> /// <param name="id"></param> /// <returns></returns> public Sys_AutoBackupModel DeleteOrRemove(string id) { //var spitId = id.Split(','); var model = new Sys_AutoBackupModel(); //LibraryService.StartTaskScheduler(Common.ConvertToGuid(spitId[1])); ActionService service = new ActionService(UserLogin); var result = service.DeleteOrRemove <Sys_AutoBackupEntity, Sys_AutoBackupModel>(id); return(model); }
public ActionResult Edit(Sys_AutoBackupModel model) { var isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Cat_ExportItem); if (!isAccess) { return(PartialView("AccessDenied")); } var service = new RestServiceClient <Sys_AutoBackupModel>(); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Post(_hrm_Sys_Service, "api/Sys_AutoBackup/", model); return(Json(result)); }
/// <summary> /// [Tin.Nguyen] - Lấy dữ liệu Dân Tộc(Cat_ExportItem) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Sys_AutoBackupModel GetById(Guid id) { string status = string.Empty; var model = new Sys_AutoBackupModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetById <Sys_AutoBackupEntity>(id, ref status); if (entity != null) { model = entity.CopyData <Sys_AutoBackupModel>(); } model.ActionStatus = status; return(model); }
public Sys_AutoBackupModel Post([Bind] Sys_AutoBackupModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Sys_AutoBackupModel>(model, "Sys_AutoBackup", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Sys_AutoBackupEntity, Sys_AutoBackupModel>(model)); }