/// <summary> /// [Quoc.Do] - Lấy dữ liệu Thông Tin Tài Khoản(Sal_SalaryInformation) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Sal_SalaryInformationModel GetById(Guid id) { string status = string.Empty; var model = new Sal_SalaryInformationModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Sal_SalaryInformationEntity>(id, ConstantSql.hrm_sal_sp_get_Sal_SalaryInformationById, ref status); if (entity != null) { model = entity.CopyData <Sal_SalaryInformationModel>(); } model.ActionStatus = status; return(model); }
public Sal_SalaryInformationModel Post([Bind] Sal_SalaryInformationModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Sal_SalaryInformationModel>(model, "Sal_SalaryInformation", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Sal_SalaryInformationEntity, Sal_SalaryInformationModel>(model)); }
public ActionResult SalaryInfo(string userLogin) { if (!CheckPermission()) { return(RedirectToAction("Denied", "Portal")); } var id = Session[SessionObjects.ProfileID]; var service = new Hre_ProfileServices(); string status = string.Empty; Sal_SalaryInformationModel listModel1 = null; var listModel = service.GetData <Sal_SalaryInformationModel>(HRM.Infrastructure.Utilities.Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_sal_sp_get_Sal_SalaryInfomationByProfileId, userLogin, ref status); if (listModel != null && listModel.Count > 0) { listModel1 = listModel.FirstOrDefault(); listModel1.ActionStatus = status; } return(GetOnlyView(listModel1)); }