Пример #1
0
 public SalesTransactionCreditViewModel()
 {
     AddSalesTranCreditLineDTO     = new AddSalesTranCreditLineDTO();
     UpdatedSalesCreditQuantityDTO = new UpdatedSalesCreditQuantityDTO();
     DeleteSalesCreditLineDTO      = new DeleteSalesCreditLineDTO();
     SalesOrderCreditDTO           = new SalesOrderCreditDTO();
 }
Пример #2
0
        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 }));
        }