예제 #1
0
        /// <summary>
        /// 設定を編集する
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditButton_Click(object sender, EventArgs e)
        {
            if (this.TaskList.SelectedRows == null || this.TaskList.SelectedRows.Count == 0)
            {
                return;
            }
            var seleRow = this.TaskList.SelectedRows[0];
            var item    = seleRow.DataBoundItem as DataRowView;

            if (item == null)
            {
                return;
            }
            string      taskId   = item["TASK_ID"] as string;
            MigrateTask taskInfo = null;

            using (SqlAccessor accessor = Accessor.AccessorFactory.GetSqlAccessor())
            {
                taskInfo = accessor.GetMigrateTaskById(taskId, SqlAccessor.DataKind.All);
            }
            if (taskInfo == null)
            {
                return;
            }
            using (DataBaseSeting dbSetting = new DataBaseSeting())
            {
                dbSetting.TaskInfo = taskInfo;
                dbSetting.ShowDialog(this.Owner);
            }
            InitNotesSettingList();
        }
예제 #2
0
        /// <summary>
        /// 新規作成
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NewButton_Click(object sender, EventArgs e)
        {
            MigrateTask taskInfo = new MigrateTask();

            using (DataBaseSeting dbSetting = new DataBaseSeting())
            {
                dbSetting.TaskInfo = taskInfo;
                dbSetting.ShowDialog(this.Owner);
            }
            InitNotesSettingList();
        }