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 OnSubmitBtnClicked(GameObject g) { App.Instance.DialogBox.ShowImportBox("创建查询", 350, 200, s => { NewSearch.Name = App.Instance.DialogBox.Field.text; BaseOperation_Service.Create <EUserSearch>(NewSearch, t => { App.Instance.PageGroup.ShowPage("Page_Task", true, NewSearch); }); }, c => { App.Instance.PageGroup.ShowPage("Page_Task", true, NewSearch); }); }
void AddTaskStep(GameObject g) { EProjectTaskStep step = new EProjectTaskStep() { ProjectID = EProject.ID, Name = "新阶段", Value = MaxStepValue + 1 }; BaseOperation_Service.Create <EProjectTaskStep>(step, t => { App.Instance.HintBox.Show("添加成功!"); BindTaskStep(); }); }
void OnSubmit(GameObject g) { EFeedback feedback = new EFeedback() { SendUserID = Session.UserID, Content = Content.text, CrateTime = System.DateTime.Now }; BaseOperation_Service.Create <EFeedback>(feedback, t => { App.Instance.HintBox.Show("反馈成功!"); App.Instance.PageGroup.ClosePage(); }); }
void AddPlan(GameObject g) { App.Instance.DialogBox.Show("添加计划", "Page_AddPlan", "", 350, 200, btn => { EPlan p = new EPlan(); p.Name = App.Instance.DialogBox.Content.GetComponentInChildren <InputField>().text; p.ProjectID = EProject.ID; p.BeginTime = System.DateTime.Now; p.EndTime = System.DateTime.Now; BaseOperation_Service.Create <EPlan>(p, t => { BindData(); App.Instance.DialogBox.Hide(); App.Instance.HintBox.Show("操作成功!"); }); }, null); }
void OnAddClicked(GameObject g) { People_Service.ListMyPeople(p => { List <EKeyName> userList = new List <EKeyName>(); List <EPeople> plist = p.GetData() as List <EPeople>; plist = plist.Where(c => c.State == PeopleState.Normal).ToList(); plist.ForEach(u => { userList.Add(new EKeyName() { ID = u.PeopleID, Name = u.PeopleName, Other = u.PeopleFace }); }); EUser myself = Session.CurrentUser; userList.Add(new EKeyName() { ID = myself.ID, Name = myself.Name, Other = myself.Face }); App.Instance.DialogBox.Show("选择成员", "Page_UserSelected", "", 300, 500, gg => { DialogPage dpg = App.Instance.DialogBox.ContentPage.GetComponent <DialogPage>(); string uid = dpg.SelectedData; if (!string.IsNullOrEmpty(uid)) { ProjectTeam_Service.ListByProjectID(EProject.ID, tm => { List <EProjectTeam> teamList = tm.GetData() as List <EProjectTeam>; if (!teamList.Any(c => c.UserID == int.Parse(uid))) { EProjectTeam teamItem = new EProjectTeam(); teamItem.ProjectID = EProject.ID; teamItem.UserID = int.Parse(uid); BaseOperation_Service.Create <EProjectTeam>(teamItem, t => { BindData(); }); } }); } }, null, userList); }); }
void OnQuickTaskAdd(GameObject g) { if (string.IsNullOrEmpty(IptQuickTaskContent.text)) { return; } ETask p = new ETask(); p.Title = IptQuickTaskContent.text; p.ProjectID = UserSearch == null ? 0 : UserSearch.ProjectID; p.PlanID = UserSearch == null ? 0 : UserSearch.PlanID; p.ExecutorID = Session.UserID; p.TaskHeadID = Session.UserID; p.CreaterID = Session.UserID; p.CreateTime = System.DateTime.Now; p.State = 1; BaseOperation_Service.Create <ETask>(p, t => { BindData(); IptQuickTaskContent.text = ""; App.Instance.HintBox.Show("操作成功!"); }); }