diff --git a/Backend/Areas/Admin/Controllers/ChequesController.cs b/Backend/Areas/Admin/Controllers/ChequesController.cs index 409de2a..5d046fd 100644 --- a/Backend/Areas/Admin/Controllers/ChequesController.cs +++ b/Backend/Areas/Admin/Controllers/ChequesController.cs @@ -641,7 +641,7 @@ private List CreateNotification(Cheques cheque, string message) Content = message, Status = (int) NotificationStatus.Unread, PkType = (int) NotificationType.Cheque, - PkId = cheque.ChequeBookId, + PkId = cheque.ChequeId, } }; diff --git a/Backend/Controllers/ChequesController.cs b/Backend/Controllers/ChequesController.cs index 5725046..d276e4d 100644 --- a/Backend/Controllers/ChequesController.cs +++ b/Backend/Controllers/ChequesController.cs @@ -54,15 +54,13 @@ public ActionResult Detail(int id) var account = accounts.Get(user.AccountId); var cheque = cheques.Get(id); - if (chequebooks.CheckDuplicate(x => x.ChequeBookId == cheque.ChequeBookId && x.AccountId == account.AccountId)) - { - var chequeDetail = new ChequesViewModel(cheque); - return View(chequeDetail); - } - else - { + if (!chequebooks.CheckDuplicate(x => + x.ChequeBookId == cheque.ChequeBookId && x.AccountId == account.AccountId)) return RedirectToAction("NotFound", "Error"); - } + + var chequeDetail = new ChequesViewModel(cheque); + return View(chequeDetail); + } public ActionResult GetData(int chequeBookId) @@ -450,7 +448,7 @@ private List CreateNotification(Cheques cheque, string message) Content = message, Status = (int) NotificationStatus.Unread, PkType = (int) NotificationType.Cheque, - PkId = cheque.ChequeBookId, + PkId = cheque.ChequeId, } }; diff --git a/Backend/Hubs/ChatHub.cs b/Backend/Hubs/ChatHub.cs index af8ab5e..b3e33ee 100644 --- a/Backend/Hubs/ChatHub.cs +++ b/Backend/Hubs/ChatHub.cs @@ -173,7 +173,7 @@ public string ReadNotification(int notificationId) return "/Transactions/TransactionsDetails/" + notification.PkId; case (int) NotificationType.Cheque: - return "/Cheques/?ChequeBookId=" + notification.PkId; + return "/Cheques/Detail/" + notification.PkId; } } catch (Exception ex)