public PurchaseSetting Create(PurchaseSettingCreateApiModel created, int departmentId, int userId)
        {
            var setting = new PurchaseSetting
            {
                HospitalDepartmentId = departmentId,
                CreateUserId         = userId,
                CreateTime           = DateTime.Now,
                Name   = created.Name,
                Remark = created.Remark,
            };

            _context.PurchaseSetting.Add(setting);
            _context.SaveChanges();

            return(setting);
        }
Example #2
0
        public JsonResult Post(PurchaseSettingCreateApiModel created)
        {
            var data = _purchaseSettingService.Create(created, HospitalDepartment.Id, Profile.Id);

            return(Json(data));
        }
Example #3
0
 public PurchaseSetting Create(PurchaseSettingCreateApiModel created, int departmentId, int userId)
 {
     return(_purchaseSettingRespository.Create(created, departmentId, userId));
 }