/// <summary> /// Delete the current Tabs based on the Tabs ID passed in the TabsModel /// </summary> /// <param name="tabId"></param> /// <returns></returns> public ActionResult DeleteTabs(string tabId) { using (var tabsBal = new TabsBal()) { //Get Tabs model object by current Tabs ID var model = tabsBal.GetTabByTabId(Convert.ToInt32(tabId)); //Check If Tabs model is not null if (model != null) { model.IsDeleted = true; model.DeletedBy = Helpers.GetLoggedInUserId(); model.DeletedDate = Helpers.GetInvariantCultureDateTime(); //Update Operation of current Tabs var result = tabsBal.AddUpdateTab(model); //Rebind the Session of Menu Tabs List ReBindTabsMenu(); //return deleted ID of current Tabs as Json Result to the Ajax Call. return(Json(result)); } } //Return the Json result as Action Result back JSON Call Success return(Json(null)); }
/// <summary> /// Deletes the tab. /// </summary> /// <param name="TabID">The tab identifier.</param> /// <returns></returns> public ActionResult DeleteTab(int TabID) { TabsBal objTabsBal = new TabsBal(); Tabs objTab = objTabsBal.GetTabByTabId(TabID); objTab.IsDeleted = true; objTab.DeletedBy = Helpers.GetLoggedInUserId(); objTab.DeletedDate = Helpers.GetInvariantCultureDateTime(); //To Do change it to server datetime var i = objTabsBal.AddUpdateTab(objTab); List <Tabs> tabsList = objTabsBal.GetAllTabs(); return(PartialView(PartialViews.TabsList, tabsList)); }
public ActionResult AddTab(Tabs objTab) { TabsBal objTabsBal = new TabsBal(); if (objTab.TabId > 0) { objTab.ModifiedBy = Helpers.GetLoggedInUserId(); objTab.ModifiedDate = Helpers.GetInvariantCultureDateTime(); objTab.CreatedBy = Helpers.GetLoggedInUserId(); objTab.CreatedDate = Helpers.GetInvariantCultureDateTime(); } else { objTab.CreatedBy = Helpers.GetLoggedInUserId(); objTab.CreatedDate = Helpers.GetInvariantCultureDateTime(); } var i = objTabsBal.AddUpdateTab(objTab); List <Tabs> tabsList = objTabsBal.GetAllTabs(); return(PartialView(PartialViews.TabsList, tabsList)); }