void OnDelClicked(GameObject g) { string idstr = g.transform.parent.name.Split('_')[1]; App.Instance.DialogBox.Show("提示信息", "", "你确定要删除该成员吗?", 300, 150, c => { BaseOperation_Service.Delete <EUserSearch>(int.Parse(idstr), gg => { BindData(); }); }, null); }
protected override void Init() { base.Init(); EventListener.Get(QQYQ.gameObject).onClick = onQQYQ; BaseOperation_Service.Get <EProject>(GetPar <int>(0), t => { EProject = t.GetData() as EProject; PageTitle.Init("项目团队", App.Instance.Theme.TitleBgColor, App.Instance.Theme.TitleFontColor, BtnBack); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[1], OnAddClicked); ProjectList.OnItemClicked = OnItemClicked; BindData(); }); }
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 OnSavePlan(GameObject g) { if (string.IsNullOrEmpty(PalnName.text)) { return; } ThePlan.Name = PalnName.text; ThePlan.BeginTime = PalnBeginTime.GetTime(); ThePlan.EndTime = PalnEndTime.GetTime(); BaseOperation_Service.Change <EPlan>(ThePlan, t => { App.Instance.HintBox.Show("操作成功!"); App.Instance.PageGroup.ClosePage(); }); }
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 OnUploadComplated(string filename, byte[] filedata) { App.Instance.UploadFile <string>(t => { App.Instance.HintBox.Show("文件上传成功!"); string path = t.GetData().ToString(); App.Instance.ShowImage(ImgFace, path, 11); EProject.Face = path; BaseOperation_Service.Change <EProject>(EProject, ct => { App.Instance.HintBox.Show("修改成功!"); }); }, "UploadFiles/ProjectFace", EProject.ID + ".png", filedata); }
void OnUploadComplated(string filename, byte[] filedata) { App.Instance.UploadFile <string>(t => { App.Instance.HintBox.Show("文件上传成功!"); string path = t.GetData().ToString(); App.Instance.ShowImage(FaceImage, path, 11); User.Face = path; BaseOperation_Service.Change <EUser>(User, ct => { App.Instance.HintBox.Show("修改成功!"); }); }, "UploadFiles/UserFace", Session.UserID + ".png", filedata); }
protected override void Init() { base.Init(); BaseOperation_Service.Get <EPlan>(GetPar <int>(0), t => { EPlan = t.GetData() as EPlan; PageTitle.Init(EPlan.Name, App.Instance.Theme.TitleBgColor, App.Instance.Theme.TitleFontColor, BtnBack); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[1], AddTask); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[2], DeletePlan); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[10], GoToChart); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[8], GoToSet); Tab.Init(OnTabClicked, App.Instance.Theme.SelectedItemBgColor); selectPeopleID = -1; BindPeopleSelect(); BindTaskListView(); }); }
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); }
protected override void Init() { base.Init(); int panid = GetPar <int>(0); Debug.Log("panid:" + panid); BaseOperation_Service.Get <EProject>(panid, t => { EProject = t.GetData() as EProject; PageTitle.Init(EProject.Name, App.Instance.Theme.TitleBgColor, App.Instance.Theme.TitleFontColor, BtnBack); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[1], AddPlan); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[9], GoToTeam); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[2], DeleteProject); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[8], GoToSet); PlanListView.OnItemClicked = OnItemClicked; BindData(); }); }
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); }); }
protected override void Init() { base.Init(); PageTitle.Init("项目详情", App.Instance.Theme.TitleBgColor, App.Instance.Theme.TitleFontColor, BtnBack); PageTitle.AddButton("", App.Instance.ImageManger.ImageList[5], SaveProject); EventListener.Get(BtnUploadFace.gameObject).onClick = UploadProjectFace; EventListener.Get(BtnAddStep.gameObject).onClick = AddTaskStep; BaseOperation_Service.Get <EProject>(GetPar <int>(0), t => { EProject = t.GetData() as EProject; IptName.text = EProject.Name; Project_Process.text = EProject.Progress.ToString(); App.Instance.ShowImage(ImgFace, EProject.Face, 12); BindTaskStep(); }); PlatformCallBackListener.Instance.OnUploadComplated = OnUploadComplated; }
void OnBtnIsSendNoticClicked(GameObject g) { Configure_Service.GetValue("IsSendNotic", c => { EConfigure config = c.GetData() as EConfigure; if (BtnIsSendNotic.isOn) { config.Value = "True"; } else { config.Value = "False"; } BaseOperation_Service.Change <EConfigure>(config, t => { App.Instance.HintBox.Show("设置成功!"); }); }); }
void OnSubmit(GameObject g) { EUser user = Session.CurrentUser; if (user.Password != OldPsw.text) { App.Instance.HintBox.Show("原密码不正确!"); return; } if (NewPsw.text != NewPswCheck.text) { App.Instance.HintBox.Show("新密码和确认密码不同!"); return; } user.Password = NewPsw.text; BaseOperation_Service.Change <EUser>(user, t => { App.Instance.HintBox.Show("修改密码成功!"); App.Instance.PageGroup.ClosePage(); }); }
void OnUploadComplated(string filename, byte[] filedata) { App.Instance.UploadFile <string>(t => { App.Instance.HintBox.Show("文件上传成功!"); SelectFilePath += "|" + t.GetData().ToString(); SelectFilePath = SelectFilePath.TrimStart('|'); if (TheTask != null) { TheTask.Attachment = SelectFilePath; BaseOperation_Service.Change <ETask>(TheTask, ct => { App.Instance.HintBox.Show("修改成功!"); BindAttachment(); }); } else { BindAttachment(); } }, "UploadFiles/TaskAttach", filename, filedata); }
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("操作成功!"); }); }
void DeletePeople(GameObject g) { App.Instance.DialogBox.Show("提示信息", "", "你确定要删除该成员吗?", 300, 150, c => { if (IsPeopleOrTeam) { People_Service.DisConnect(EPeople.PeopleID, t => { App.Instance.PageGroup.ClosePage(); App.Instance.DialogBox.Hide(); App.Instance.HintBox.Show("联系移除成功!"); }); } else { BaseOperation_Service.Delete <EProjectTeam>(ETeamOne, t => { App.Instance.PageGroup.ClosePage(); App.Instance.DialogBox.Hide(); App.Instance.HintBox.Show("操作成功!"); }); } }, null); }