void OnAddTask(GameObject g) { if (string.IsNullOrEmpty(TaskName.text)) { return; } ETask p = new ETask(); p.Title = TaskName.text; p.Content = TaskContent.text; p.ProjectID = ProjectID; p.PlanID = PlanID; p.CreaterID = Session.UserID; p.CreateTime = System.DateTime.Now; p.BeginTime = TaskBeginTime.GetTime(); p.EndTime = TaskEndTime.GetTime(); p.State = ProjectStepList.FirstOrDefault(c => c.Name == TaskState.captionText.text).Value; p.Priority = (TaskPriority)EnumMapping.GetValue <TaskPriority>(TaskPriority.captionText.text); p.TaskHeadID = HeadPersonID; p.ExecutorID = ExcuterID; p.Attachment = SelectFilePath; BaseOperation_Service.Create <ETask>(p, t => { App.Instance.HintBox.Show("操作成功!"); App.Instance.PageGroup.ClosePage(); }); }
void OnSaveTask(GameObject g) { if (string.IsNullOrEmpty(TaskName.text)) { return; } TheTask.Title = TaskName.text; TheTask.Content = TaskContent.text; TheTask.ProjectID = ProjectID; TheTask.PlanID = PlanID; TheTask.CreaterID = Session.UserID; TheTask.CreateTime = System.DateTime.Now; TheTask.BeginTime = TaskBeginTime.GetTime(); TheTask.EndTime = TaskEndTime.GetTime(); TheTask.State = ProjectStepList.FirstOrDefault(c => c.Name == TaskState.captionText.text).Value; TheTask.Priority = (TaskPriority)EnumMapping.GetValue <TaskPriority>(TaskPriority.captionText.text); TheTask.TaskHeadID = HeadPersonID; TheTask.ExecutorID = ExcuterID; string fz = ""; switch (RemindTime.captionText.text) { case "不提醒": fz = ""; break; case "早上9点": fz = "9"; break; case "中午12点": fz = "12"; break; case "下午3点": fz = "15"; break; case "下午6点": fz = "18"; break; case "晚上9点": fz = "21"; break; } TheTask.Remind = fz; TheTask.IsReminded = false; BaseOperation_Service.Change <ETask>(TheTask, t => { App.Instance.HintBox.Show("操作成功!"); App.Instance.PageGroup.ClosePage(); }); }
void YXJItem_OnClicked(GameObject g) { SubmitBtn.interactable = true; string str = g.name.Split('_')[1]; if (str == "全部") { NewSearch.TaskPriority = 0; } else { NewSearch.TaskPriority = EnumMapping.GetValue <TaskPriority>(str); } }