Exemplo n.º 1
0
 private void btnDel_All_Click(object sender, EventArgs e)
 {
     if (dgvAll.SelectedRows.Count > 0)
     {
         DataGridViewSelectedRowCollection selectedRows = dgvAll.SelectedRows;
         if (selectedRows[0].Cells["colRemindFlag_ALL"].Value.ToString() == "未处理" && MessageHandle.MessageAsk("注意:该日程还没执行!\n确定要删除该日程事务?", "确定删除") == DialogResult.OK)
         {
             BusAdminDaily.DeleteDailyById(selectedRows[0].Cells[0].Value.ToString());
             if (_dailyEntity != null && _dailyEntity.ID == selectedRows[0].Cells[0].Value.ToString())
             {
                 _dailyEntity = null;
                 ClearForm();
             }
             dgvAll.Rows.Remove(selectedRows[0]);
             MessageHandle.MessageInfo("恭喜,删除成功!", "提示信息");
         }
         else if (selectedRows[0].Cells["colRemindFlag_ALL"].Value.ToString() == "已处理" && MessageHandle.MessageAsk("确定要删除该日程事务?", "确定删除") == DialogResult.OK)
         {
             BusAdminDaily.DeleteDailyById(selectedRows[0].Cells[0].Value.ToString());
             if (_dailyEntity != null && _dailyEntity.ID == selectedRows[0].Cells[0].Value.ToString())
             {
                 _dailyEntity = null;
                 ClearForm();
             }
             dgvAll.Rows.Remove(selectedRows[0]);
             MessageHandle.MessageInfo("恭喜,删除成功!", "提示信息");
         }
     }
 }
Exemplo n.º 2
0
 private void btnDelDidToday_Click(object sender, EventArgs e)
 {
     if (dgvDidToday.SelectedRows.Count > 0 && MessageHandle.MessageAsk("确定要删除该日程事务?", "确定删除") == DialogResult.OK)
     {
         DataGridViewSelectedRowCollection selectedRows = dgvDidToday.SelectedRows;
         if (BusAdminDaily.DeleteDailyById(selectedRows[0].Cells[0].Value.ToString()))
         {
             if (_dailyEntity != null && _dailyEntity.ID == selectedRows[0].Cells[0].Value.ToString())
             {
                 _dailyEntity = null;
                 ClearForm();
             }
             dgvDidToday.Rows.Remove(selectedRows[0]);
             MessageHandle.MessageInfo("恭喜,删除成功!", "提示信息");
         }
     }
 }
Exemplo n.º 3
0
 private void btnDeleteDaily_Click(object sender, EventArgs e)
 {
     if (_dailyEntity.D_REMIND_FLAG == "1" && MessageHandle.MessageAsk("注意:该日程事务还没处理!\n确定要删除该日程事务?", "确定删除") == DialogResult.OK)
     {
         BusAdminDaily.DeleteDailyById(_dailyEntity.ID);
         ClearForm();
         _dailyEntity = null;
         MessageHandle.MessageInfo("恭喜,删除成功!", "提示信息");
         if (mFromWhere == 1)
         {
             tbcContainer.SelectedTab = tabPageToday;
             mFromWhere = 0;
         }
         else
         {
             BindAll();
             dgvAll.Select();
         }
     }
     else if (_dailyEntity.D_REMIND_FLAG == "0" && MessageHandle.MessageAsk("你确定要删除该日程事务?", "确定删除") == DialogResult.OK)
     {
         BusAdminDaily.DeleteDailyById(_dailyEntity.ID);
         ClearForm();
         _dailyEntity = null;
         MessageHandle.MessageInfo("恭喜,删除成功!", "提示信息");
         if (mFromWhere == 1)
         {
             tbcContainer.SelectedTab = tabPageToday;
             mFromWhere = 0;
         }
         else
         {
             BindAll();
             dgvAll.Select();
         }
     }
 }