예제 #1
0
        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"));
        }
예제 #2
0
        /// <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));
        }
예제 #3
0
        public ActionResult Get(int TimeLogId, string action)
        {
            TimeLog objItem = TimeLogManager.GetById(TimeLogId);

            return(Content(JsonConvert.SerializeObject(objItem), "application/json"));
        }
예제 #4
0
        public ActionResult Get(int TimeLogId)
        {
            TimeLog objItem = TimeLogManager.GetById(TimeLogId);

            return(View(objItem));
        }