private void btnComplete_Click(object sender, EventArgs e) { if (GlobalVariable.HASH_BEGIN_DOING_DAILY.ContainsKey(_strID)) { GlobalVariable.HASH_BEGIN_DOING_DAILY.Remove(_strID); if (GlobalVariable.HASH_DOING_DAILY_LAST_TIME.ContainsKey(_strID)) { GlobalVariable.HASH_DOING_DAILY_LAST_TIME.Remove(_strID); } } BusAdminDaily.UpdateDaliyState(_strID, "0"); this.Close(); DialogResult = DialogResult.OK; }
private void btnCancelAll_Click(object sender, EventArgs e) { if (dgvAll.SelectedRows.Count > 0) { DataGridViewSelectedRowCollection selectedRows = dgvAll.SelectedRows; if (selectedRows[0].Cells["colRemindFlag_ALL"].Value.ToString() == "未处理" && MessageHandle.MessageAsk("确定要取消该日程事务?", "确定取消") == DialogResult.OK) { if (BusAdminDaily.UpdateDaliyState(selectedRows[0].Cells[0].Value.ToString(), "0")) { selectedRows[0].Cells["colRemindFlag_ALL"].Value = "已处理"; MessageHandle.MessageInfo("恭喜,取消成功!", "提示信息"); } } } }
private void btnCancelToday_Click(object sender, EventArgs e) { if (dgvToday.SelectedRows.Count > 0 && MessageHandle.MessageAsk("确定要取消该日程事务?", "确定取消") == DialogResult.OK) { DataGridViewSelectedRowCollection selectedRows = dgvToday.SelectedRows; if (BusAdminDaily.UpdateDaliyState(selectedRows[0].Cells[0].Value.ToString(), "0")) { selectedRows[0].Cells["colRemindFlag_Today"].Value = "已处理"; DataRow dr = ((DataRowView)selectedRows[0].DataBoundItem).Row; _dsDidToday.Tables[0].Rows.Add(dr.ItemArray); dgvDidToday.CurrentCell = dgvDidToday.Rows[dgvDidToday.Rows.Count - 1].Cells[1]; if (_dailyEntity != null && _dailyEntity.ID == selectedRows[0].Cells[0].Value.ToString()) { _dailyEntity.D_REMIND_FLAG = "0"; } dgvToday.Rows.Remove(selectedRows[0]); MessageHandle.MessageInfo("恭喜,取消成功!", "提示信息"); } } }