Example #1
0
        protected override void OnEditClick(DataRow selectedRow)
        {
            int inte_status = selectedRow.GetDataRowIntValue("inte_status");

            if (inte_status != 1)
            {
                DXMessageBox.ShowInfo("只能修改未执行的干预!");
                GetData();
                return;
            }

            string            pkVal = selectedRow[PrimaryKey].ToString();
            UCInterveneEditor edit  = new UCInterveneEditor()
            {
                DbOperaType = DBOperateType.Update, PrimaryKeyValue = pkVal, Title = "修改健康干预"
            };
            DialogResult dr = edit.ShowDialog();

            if (dr == DialogResult.OK)
            {
                GetData();
                DXMessageBox.Show("修改干预成功!", true);
            }
            edit.Dispose();
        }
Example #2
0
        protected override void OnAddClick(EventArgs e)
        {
            UCInterveneEditor edit = new UCInterveneEditor()
            {
                DbOperaType = DBOperateType.Add, Title = "新建健康干预"
            };
            DialogResult dr = edit.ShowDialog();

            if (dr == DialogResult.OK)
            {
                GetData();
                DXMessageBox.Show("新建健康干预成功!", true);
            }
            edit.Dispose();
        }