예제 #1
0
파일: Form1.cs 프로젝트: KnightNine/ManorDB
 private void newRowToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DatabaseFunct.selectedTable != "")
     {
         if (Program.mainForm.TableMainGridView.Columns.Count > 0)
         {
             DatabaseFunct.AddRow(Program.mainForm.TableMainGridView, false, 0);
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("add a column first");
         }
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("no table selected");
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: KnightNine/ManorDB
        public void subTableNewRowButton_Click(object sender, EventArgs e)
        {
            Button       senderButton = sender as Button;
            DataGridView senderDGV    = senderButton.Parent as DataGridView;

            if (DatabaseFunct.selectedTable != "")
            {
                if (senderDGV.Columns.Count > 0)
                {
                    DatabaseFunct.AddRow(senderDGV, false, 0);
                }
                else
                {
                    System.Windows.Forms.MessageBox.Show("add a column first");
                }
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("no table selected");
            }
        }
예제 #3
0
 private static void insertRow(object sender, System.EventArgs e)
 {
     DatabaseFunct.AddRow(DGV, true, rowIndex);
     Program.mainForm.RecenterSubTables();
     cMenu.Dispose();
 }