예제 #1
0
 private void btnedit_Click(object sender, EventArgs e)
 {
     if (selected_user == null)
     {
         MessageBox.Show("Please select an Activity", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         dataGridView1.ClearSelection();
     }
     else
     {
         form_borrow form_borrow = new form_borrow(selected_user, username, "", "", "", "", "", "edit");
         form_borrow.Show();
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         validate();
         if (error == 0)
         {
             this.Hide();
             form_borrow form_borrow = new form_borrow(borrow_form_id_format, date_now, username, dept, txtb_avtivity.Text, dateTimePicker1.Text, txtb_purpose.Text, "add");
             form_borrow.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }