Beispiel #1
0
        void btnSave_Click(object sender, EventArgs e)
        {
            if (_user == null)
            {
                return;
            }
            if (dateEditStart.EditValue == null || dateEditEnd.EditValue == null)
            {
                DXMessageBox.ShowWarning2("管理时间未填写完整!");
                xtraTabControlMain.SelectedTabPageIndex = 0;
            }

            if (DXMessageBox.ShowQuestion("确定要保存吗?\r\n保存后将无法修改", this) == DialogResult.OK)
            {
                string jsonData = GetDataJsonString();

                UCActionPlan uap = new UCActionPlan(_user, jsonData, true);
                uap.ShowDialog(this);
                if (uap.SaveSucess)
                {
                    CloseForm();
                }
                uap.Dispose();
            }
        }
Beispiel #2
0
        void btnView_Click(object sender, EventArgs e)
        {
            string jsonData     = GetDataJsonString();
            var    ucActionPlan = new UCActionPlan(_user, jsonData);

            ucActionPlan.ShowDialog(this);
            ucActionPlan.Dispose();
        }
Beispiel #3
0
        protected override void OnRowCellClick(DataRow dr, RowCellClickEventArgs e)
        {
            base.OnRowCellClick(dr, e);
            if (e.Column.Name == "gc_actionplan")
            {
                //健康计划
                int status = dr.GetDataRowIntValue("questionnare_status");

                string   apid = dr.GetDataRowStringValue("apid");
                Userinfo user = ModelConvertHelper <Userinfo> .ConvertToOneModel(dr);

                if (string.IsNullOrWhiteSpace(apid))
                {
                    var ucActionPlanEditor = new UCActionPlanEditor(user);
                    ucActionPlanEditor.ShowDialog(this);
                    ucActionPlanEditor.Dispose();
                    GetData();
                }
                else
                {
                    DataTable dt = TmoServiceClient.InvokeServerMethodT <DataTable>(funCode.GetActionPlan, apid);
                    if (TmoShare.DataTableIsEmpty(dt))
                    {
                        DXMessageBox.ShowWarning2("数据加载失败,请稍后再试!");
                        return;
                    }
                    string content = dt.Rows[0].GetDataRowStringValue("content");
                    if (status <= 3)
                    {
                        var ucActionPlanEditor = new UCActionPlanEditor(user, content);
                        ucActionPlanEditor.ShowDialog(this);
                        ucActionPlanEditor.Dispose();
                        GetData();
                    }
                    else
                    {
                        var ucActionPlan = new UCActionPlan(user, content);
                        ucActionPlan.ShowDialog(this);
                        ucActionPlan.Dispose();
                    }
                }
            }
        }