Beispiel #1
0
        public override void EditCmd()
        {
            RemindForm remindForm = new RemindForm();

            remindForm.Context = remindDGV.CurrentRow.Cells["comContent"].Value.ToString();
            if (remindForm.ShowDialog() == DialogResult.OK)
            {
                DataRow newRow = _remindTable.Rows[remindDGV.CurrentRow.Index];
                newRow["remind_time"] = DateTime.Now;
                newRow["description"] = remindForm.Context;
                int i = OMWorkBench.DataAgent.UpdateManagerRemind(_remindTable.GetChanges());
                _remindTable.AcceptChanges();
                _remindBDS.DataSource = _remindTable;
            }
        }
Beispiel #2
0
        public override void NewCmd()
        {
            RemindForm remindForm = new RemindForm();

            if (remindForm.ShowDialog() == DialogResult.OK)
            {
                DataRow newRow = _remindTable.NewRow();
                newRow["manager_id"]  = _managerId;
                newRow["remind_time"] = DateTime.Now;
                newRow["description"] = remindForm.Context;
                _remindTable.LoadDataRow(newRow.ItemArray, false);
                int i = OMWorkBench.DataAgent.UpdateManagerRemind(_remindTable.GetChanges());
                _remindTable.AcceptChanges();
                _remindTable = OMWorkBench.DataAgent.GetManagerRemind(_managerId);
            }
        }