public SalesTransactionCreditViewModel() { AddSalesTranCreditLineDTO = new AddSalesTranCreditLineDTO(); UpdatedSalesCreditQuantityDTO = new UpdatedSalesCreditQuantityDTO(); DeleteSalesCreditLineDTO = new DeleteSalesCreditLineDTO(); SalesOrderCreditDTO = new SalesOrderCreditDTO(); }
public IActionResult DeleteLine(DeleteSalesCreditLineDTO line) { string username = this.HttpContext.Session.GetString(SessionConstant.UserNameSession); if (string.IsNullOrEmpty(username)) { return(RedirectToAction("Login", "Account")); } string errorMessage = ""; this._salesTranService.DeleteLine(line.TransTempId, out errorMessage); if (!string.IsNullOrEmpty(errorMessage)) { TempData["Fail"] = errorMessage; return(RedirectToAction("Index", "SalesTransactionCredit", new { customerId = line.CustomerId })); } return(RedirectToAction("Index", "SalesTransactionCredit", new { customerId = line.CustomerId })); }