示例#1
0
 public IActionResult CreateSaleTransaction([FromBody] TrxTransaction trxTransaction)
 {
     if (ModelState.IsValid)
     {
         var result = _repository.CreateSaleTransaction(trxTransaction);
         return(result);
     }
     else
     {
         return(new HttpStatusCodeResult((int)HttpStatusCode.BadRequest));
     }
 }
示例#2
0
 public IActionResult CreateSaleTransaction(TrxTransaction trxTransaction)
 {
     try
     {
         _dbContext.TrxTransaction.Add(trxTransaction);
         _dbContext.SaveChanges();
         return(new HttpStatusCodeResult((int)HttpStatusCode.Created));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#3
0
 public string CreateSaleTransaction(TrxTransaction trxTransaction)
 {
     try
     {
         _dbContext.TrxTransaction.Add(trxTransaction);
         _dbContext.SaveChanges();
         return(HttpStatusCode.Created.ToString());
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#4
0
 public string CreateSaleTransaction(TrxTransaction trxTransaction)
 {
     throw new NotImplementedException();
 }