コード例 #1
0
 private void gunaButton1_Click(object sender, EventArgs e)
 {
     if (selected_user == null)
     {
         MessageBox.Show("please select an Activity");
     }
     else
     {
         form_borrow form_borrow = new form_borrow(selected_user, "", "", "", "", "", "", "view");
         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, txtb_date.Text, txtb_purpose.Text, "add");
             form_borrow.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
コード例 #3
0
 private void Edit_Click(object sender, EventArgs e)
 {
     try
     {
         validate();
         if (error == 0)
         {
             this.Hide();
             Account.executeSQL(" UPDATE tblactivity SET activity_name = '" + txtb_avtivity.Text + "', activity_date = '" + txtb_date.Text + "', activity_purpose = '" + txtb_purpose.Text + "' WHERE id = '" + bform_id + "' ");
             form_borrow form_borrow = new form_borrow(bform_id, "", username, "", "", "", "", "edit");
             form_borrow.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }