Exemplo n.º 1
0
 //新增
 private void tSBtnNew_Click(object sender, EventArgs e)
 {
     if (CurrentStatus != HIS.MZDoc_BLL.Public.CurrentStatus.查询状态)
     {
         if (MessageBox.Show("有未保存的数据,是否继续?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             Controller.LoadData();
         }
         else
         {
             return;
         }
     }
     CurrentStatus = HIS.MZDoc_BLL.Public.CurrentStatus.新建状态;
     dGVEMain.Focus();
     Controller.AddRow <HIS.MZDoc_BLL.CommonItem>();
     dGVEMain.CurrentCell = this.dGVEMain[_firstInputColumnIndex, _rowIndex];
 }
Exemplo n.º 2
0
 //修改
 private void tSBtnUpdate_Click(object sender, EventArgs e)
 {
     if (CurrentStatus != HIS.MZDoc_BLL.Public.CurrentStatus.查询状态)
     {
         if (MessageBox.Show("有未保存的数据,是否继续?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             Controller.LoadData();
         }
         else
         {
             return;
         }
     }
     if (dGVEMain.CurrentCell != null)
     {
         _rowIndex     = dGVEMain.CurrentRow.Index;
         CurrentStatus = HIS.MZDoc_BLL.Public.CurrentStatus.修改状态;
     }
 }
Exemplo n.º 3
0
 //取消
 private void tSBtnCancel_Click(object sender, EventArgs e)
 {
     CurrentStatus = HIS.MZDoc_BLL.Public.CurrentStatus.查询状态;
     Controller.LoadData();
 }