public ActionResult UpdateTask(TaskDA oTask)
        {
            try
            {
                var memId = RDN.Library.Classes.Account.User.GetMemberId();
                oTask.TaskAddByMember =(Guid) memId;
                bool execute = RDN.Library.Classes.League.TaskList.TaskDA.UpdateTaskInfo(oTask);

                ViewBag.ListTitle = oTask.TaskListTitle;
                return Redirect(Url.Content("~/tasks/league/list/view/" + oTask.TaskListId + "/" + oTask.TaskListTitle +  "?u=" + SiteMessagesEnum.s));
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            return Redirect(Url.Content("~/?u=" + SiteMessagesEnum.sww));

        }
        public ActionResult Task(long id,string listTitle)
        {
            TaskDA oDA = null;
            try
            {

                IEnumerable<TaskStatusEnum> status = Enum.GetValues(typeof(TaskStatusEnum))
                                                          .Cast<TaskStatusEnum>();
                 var list = (from a in status
                             select new SelectListItem
                             {
                                 Text = RDN.Portable.Util.Enums.EnumExt.ToFreindlyName(a),
                                 Value = ((int)a).ToString()
                             });

                 ViewBag.status = new SelectList(list, "Value", "Text");

                     
                    oDA = new TaskDA();
                    oDA.TaskListId = id;
                    oDA.TaskListTitle = listTitle;
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }

            return View(oDA);
        }
        public ActionResult Task(TaskDA oTask)
        {

            try
            {
                var memId = RDN.Library.Classes.Account.User.GetMemberId();
                oTask.TaskAddByMember = memId;
                

                bool execute = RDN.Library.Classes.League.TaskList.TaskDA.Add_New_Task(oTask);

            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            //tasks/league/list/view/7/TK
            return Redirect(Url.Content("~/tasks/league/list/view/" + oTask.TaskListId + "/" + oTask.TaskListTitle + "?u=" + SiteMessagesEnum.sac));
        }
Esempio n. 4
0
 private static TaskDA DisplayTask(DataModels.League.Task.Task oTask)
 {
     TaskDA bl = new TaskDA();
     bl.Completed = oTask.Completed;
     bl.Title = oTask.Title;
     bl.DeadLine = oTask.DeadLine;
     bl.EndDate = oTask.EndDate;
     bl.Notes = oTask.Notes;
     bl.StartDate = oTask.StartDate;
     bl.StatusId = oTask.StatusId;
     bl.TaskAddByMember = oTask.TaskAddByMember.MemberId;
     bl.TaskId = oTask.TaskId;
     bl.TaskListId = oTask.TaskBelongsTo.ListId;
     bl.TaskListTitle = oTask.TaskBelongsTo.ListName;
     return bl;
 }