Example #1
0
    void OnDelAttachmentClicked(GameObject g)
    {
        string fpath         = g.transform.parent.name;
        string newAttachment = "";

        foreach (var a in SelectFilePath.Split('|'))
        {
            if (a != fpath)
            {
                newAttachment += "|" + a;
            }
        }
        SelectFilePath = newAttachment.TrimStart('|');
        if (TheTask != null)
        {
            TheTask.Attachment = SelectFilePath;
            BaseOperation_Service.Change <ETask>(TheTask, t =>
            {
                App.Instance.HintBox.Show("操作成功!");
                BindAttachment();
            });
        }
        else
        {
            BindAttachment();
        }
    }
Example #2
0
 void OnSubmit(GameObject g)
 {
     User.Name = NickName.text;
     BaseOperation_Service.Change <EUser>(User, t =>
     {
         App.Instance.HintBox.Show("修改成功!");
         App.Instance.PageGroup.ClosePage();
     });
 }
Example #3
0
 void SaveProject(GameObject g)
 {
     EProject.Name     = IptName.text;
     EProject.Progress = int.Parse(Project_Process.text);
     BaseOperation_Service.Change <EProject>(EProject, t =>
     {
         App.Instance.HintBox.Show("修改成功!");
         App.Instance.PageGroup.ClosePage();
     });
 }
Example #4
0
    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();
        });
    }
Example #5
0
    void ChangeTaskStep(GameObject g)
    {
        int stepid = int.Parse(g.transform.parent.gameObject.name.Split('_')[1]);
        EProjectTaskStep stepObj = StepList.FirstOrDefault(c => c.ID == stepid);

        stepObj.Name = g.transform.parent.Find("Name").GetComponent <InputField>().text;
        BaseOperation_Service.Change <EProjectTaskStep>(stepObj, t =>
        {
            App.Instance.HintBox.Show("修改成功!");
            BindTaskStep();
        });
    }
Example #6
0
 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();
     });
 }
Example #7
0
    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);
    }
Example #8
0
    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);
    }
Example #9
0
 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("设置成功!");
         });
     });
 }
Example #10
0
    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();
        });
    }
Example #11
0
    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);
    }