/// <summary> /// Get the details of the current DashboardDisplayOrder in the view model by ID /// </summary> /// <param name="id">The identifier.</param> /// <returns></returns> public JsonResult GetDashboardDisplayOrderDetails(int id) { using (var bal = new DashboardDisplayOrderBal()) { //Call the AddDashboardDisplayOrder Method to Add / Update current DashboardDisplayOrder var current = bal.GetDashboardDisplayOrderByID(id); //Pass the ActionResult with the current DashboardDisplayOrderViewModel object as model to PartialView DashboardDisplayOrderAddEdit return(Json(current)); } }
/// <summary> /// Delete the current DashboardDisplayOrder based on the DashboardDisplayOrder ID passed in the DashboardDisplayOrderModel /// </summary> /// <param name="id">The identifier.</param> /// <returns></returns> public ActionResult DeleteDashboardDisplayOrder(int id) { using (var bal = new DashboardDisplayOrderBal()) { //Get DashboardDisplayOrder model object by current DashboardDisplayOrder ID var model = bal.GetDashboardDisplayOrderByID(id); var userId = Helpers.GetLoggedInUserId(); var list = new List <DashboardDisplayOrderCustomModel>(); var currentDate = Helpers.GetInvariantCultureDateTime(); //Check If DashboardDisplayOrder model is not null if (model != null) { model.IsDeleted = true; //Update Operation of current DashboardDisplayOrder list = bal.SaveDashboardDisplayOrder(model); //return deleted ID of current DashboardDisplayOrder as Json Result to the Ajax Call. } //Pass the ActionResult with List of DashboardDisplayOrderViewModel object to Partial View DashboardDisplayOrderList return(PartialView(PartialViews.DashboardDisplayOrderList, list)); } }