Exemple #1
0
 /// <summary>
 /// 新增刀模資料
 /// </summary>
 private void addDaomuMenuItem_Click(object sender, EventArgs e)
 {
     if (this.connect == null)
     {
         MessageBox.Show("請先連線至資料庫!!");
     }
     else
     {
         df             = new DaomuForm();
         df.Connect     = this.connect;
         df.Daomus      = this.daomus;
         df.FormClosed += new FormClosedEventHandler(df_FormClosed);
         df.Show();
     }
 }
Exemple #2
0
 /// <summary>
 /// 修改刀模資料
 /// </summary>
 private void editDaomuMenuItem_Click(object sender, EventArgs e)
 {
     if (this.connect == null)
     {
         MessageBox.Show("請先連線至資料庫!!");
     }
     else
     {
         int index = daomuView.SelectedRows[daomuView.Rows.GetRowCount(DataGridViewElementStates.Selected) - 1].Index;
         if (index < daomus.Count)
         {
             df         = new DaomuForm();
             df.Connect = this.connect;
             df.Daomus  = this.daomus;
             df.setIndex(index);
             df.FormClosed += new FormClosedEventHandler(df_FormClosed);
             df.Show();
         }
     }
 }