Exemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (ListView1.Items.Count == 0)
     {
         Interaction.MsgBox("Please select record to update", MsgBoxStyle.Exclamation, "Update");
         return;
     }
     try
     {
         if (String.IsNullOrEmpty(ListView1.FocusedItem.Text))
         {
         }
         else
         {
             SQLConn.adding   = false;
             SQLConn.updating = true;
             staffID          = Convert.ToInt32(ListView1.FocusedItem.Text);
             ListView1.FocusedItem.Focused = false;
             frmAddEditC_Account f2 = new frmAddEditC_Account(staffID);
             f2.ShowDialog();
         }
     }
     catch
     {
         Interaction.MsgBox("Please select record to update", MsgBoxStyle.Exclamation, "Update");
         return;
     }
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            SQLConn.adding   = true;
            SQLConn.updating = false;
            int init = 0;
            frmAddEditC_Account f2 = new frmAddEditC_Account(init);

            f2.ShowDialog();
        }