示例#1
0
        /// <summary>
        /// 新建schedule
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolStripMenuItem_schedule_new_Click(object sender, EventArgs e)
        {
            frmSchedule dlg = new frmSchedule(SyncService.Current, null);

            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog();
            if (dlg.DialogResult == DialogResult.OK)
            {
                // 刷新界面Schedule列表
                this.InitialScheduleList();
            }
        }
示例#2
0
        private void dgv_schedule_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dgv_schedule.SelectedRows.Count == 0)
            {
                return;
            }

            DataGridViewRow row        = this.dgv_schedule.SelectedRows[0];
            string          scheduleID = row.Cells[0].Value.ToString();

            ScheduleEntity scheduleEntity = SyncService.Current.ScheduleManager.GetScheduleEntityByID(scheduleID);
            frmSchedule    dlg            = new frmSchedule(SyncService.Current, scheduleEntity);

            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog();
            if (dlg.DialogResult == DialogResult.OK)
            {
                // 刷新界面Schedule列表
                this.InitialScheduleList();
            }
        }
示例#3
0
        /// <summary>
        /// 修改Schedule
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolStripMenuItem_schedule_edit_Click(object sender, EventArgs e)
        {
            if (this.dgv_schedule.SelectedRows.Count == 0)
            {
                MessageBox.Show(this, "尚未选择要编辑的事项", "数据同步");
                return;
            }

            DataGridViewRow row            = this.dgv_schedule.SelectedRows[0];
            string          scheduleID     = row.Cells[0].Value.ToString();
            ScheduleEntity  scheduleEntity = SyncService.Current.ScheduleManager.GetScheduleEntityByID(scheduleID);

            frmSchedule dlg = new frmSchedule(SyncService.Current, scheduleEntity);

            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog();
            if (dlg.DialogResult == DialogResult.OK)
            {
                // 刷新界面Schedule列表
                this.InitialScheduleList();
            }
        }