Exemplo n.º 1
0
 public Cat_LineItemModel Post([Bind] Cat_LineItemModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_LineItemModel>(model, "Cat_LineItem", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Cat_LineItemEntity, Cat_LineItemModel>(model));
 }
Exemplo 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 Cat_LineItemModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Cat_LineItemModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Cat_LineItemEntity>(id, ConstantSql.hrm_cat_sp_get_LineItemById, ref status);

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