public ActionResult TimeLogEvt(int[] TimeLogId, string Action) { // You have your books IDs on the deleteInputs array switch (Action.ToLower()) { case "delete": if (TimeLogId != null && TimeLogId.Length > 0) { int length = TimeLogId.Length; TimeLog objItem; for (int i = 0; i <= length - 1; i++) { objItem = TimeLogManager.GetById(TimeLogId[i]); if (objItem != null) { TimeLogManager.Delete(objItem); } } return(View(ViewFolder + "list.cshtml", TimeLogManager.GetAll())); } break; } return(View("PostFrm")); }
/// <summary> /// use for setting up default value /// </summary> /// <returns></returns> public ActionResult Update(int TimeLogId, string TargetID = "TimeLoglist") { TimeLog objItem = TimeLogManager.GetById(TimeLogId); objItem.TargetDisplayID = TargetID; return(View(ViewFolder + "Create.cshtml", objItem)); }
public ActionResult Get(int TimeLogId, string action) { TimeLog objItem = TimeLogManager.GetById(TimeLogId); return(Content(JsonConvert.SerializeObject(objItem), "application/json")); }
public ActionResult Get(int TimeLogId) { TimeLog objItem = TimeLogManager.GetById(TimeLogId); return(View(objItem)); }