private void button2_Click(object sender, EventArgs e) { if (dba.updatepoint(newpointlabel.Text, ortextBox.Text)) { MessageBox.Show("Successfully Updated "); Form4 f4 = new Form4(); this.Visible = false; f4.Visible = true; f4.FillGridh(); } else { MessageBox.Show("Error occured"); } }
//update button pay history private void button3_Click(object sender, EventArgs e) { if (dba.updatePayHistory(ortextBox.Text, dateTimePicker1.Value.Date.ToString("MM/dd/yyyy"), paymethodtextBox.Text, rentallabel.Text, Convert.ToString(donecomboBox.SelectedItem), Convert.ToString(fullpaystatuscomboBox.SelectedItem))) { MessageBox.Show("Successfully Updated"); Form4 f4 = new Form4(); this.Visible = false; f4.Visible = true; f4.FillGridh(); } else { MessageBox.Show("Error occured"); } }
//add button payHistory private void button1_Click(object sender, EventArgs e) { if (ortextBox.Text == "" || cidlabel.Text == "" || tpaylabel.Text == "" || advalabel.Text == "" || dateTimePicker1.Value.Date.ToString("MM/dd/yyyy") == "" || Convert.ToString(fullpaystatuscomboBox.SelectedItem) == "") { MessageBox.Show("please enter the all details "); } else if (dba.addPayHistory(ortextBox.Text, cidlabel.Text, Convert.ToDouble(tpaylabel.Text), advalabel.Text, labelArear.Text, dateTimePicker1.Value.Date.ToString("MM/dd/yyyy"), Convert.ToString(fullpaystatuscomboBox.SelectedItem), paymethodtextBox.Text, Convert.ToString(donecomboBox.SelectedItem), rentallabel.Text)) { MessageBox.Show("Successfully Added"); Form4 f4 = new Form4(); f4.Visible = true; this.Visible = false; f4.FillGridh(); } else { MessageBox.Show("Error occured"); } this.Dispose(); f4.FillGrid(); }