/// <summary> /// データ保存する /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { if (!this.ValidateInputs()) { return; } //入力値を設定する this._taskInfo.TaskName = this.txtTaskName.Text; this._taskInfo.DisplayName = this.txtDisplayName.Text; this._taskInfo.ListName = this.txtListName.Text; this._taskInfo.Description = this.txtDescription.Text; this._taskInfo.IsUseDefaultIcon = this.rdoDefaultIcon.Checked; string strType = Convert.ToString(this.cmbSPType.SelectedValue); SPListType sptype = SPListType.GenericList; if (Enum.TryParse(strType, true, out sptype)) { this._taskInfo.ListType = sptype; } using (SqlAccessor sqlAccessor = Accessor.AccessorFactory.GetSqlAccessor()) { sqlAccessor.InsertMigrate(this._taskInfo); } this.DialogResult = System.Windows.Forms.DialogResult.OK; Log.Write(this._taskInfo.TaskId, RSM.GetMessage(RS.Informations.DataBaseSetted, this._taskInfo.TaskName, this._taskInfo.TaskId)); this.Close(); } catch (Exception ex) { Log.Write(ex); RSM.ShowMessage(this, ex); } }