Esempio n. 1
0
 public Hre_MPModel Post([Bind] Hre_MPModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Hre_MPModel>(model, "Hre_MP", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Hre_MPEntity, Hre_MPModel>(model));
 }
Esempio n. 2
0
        /// <summary>
        /// [Chuc.Nguyen] - Lấy dữ liệu Ngân Hàng(Cat_Bank) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Hre_MPModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Hre_MPModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Hre_MPEntity>(id, ConstantSql.hrm_hr_sp_get_MPById, ref status);

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