private void button2_Click(object sender, EventArgs e) { if (dba.updateCustomer(cusIDlabel.Text, Nic.Text, name.Text, richAddress.Text, ContNumber.Text, Email.Text)) { MessageBox.Show("Successfully Updated"); Form4 f4 = new Form4(); this.Visible = false; f4.Visible = true; f4.FillGrid(); } else { MessageBox.Show("Error occured"); } }
//Add orders private void button2_Click(object sender, EventArgs e) { if (cusIDtextBox.Text == "" || Convert.ToString(ortypecomboBox.SelectedItem) == "" || QuantytextBox.Text == "" || ordateTimePicker.Value.Date.ToString("MM/dd/yyyy") == "" || duedateTimePicker.Value.Date.ToString("MM/dd/yyyy") == "" || Convert.ToString(comstatecomboBox.SelectedItem) == "" || fullpaytextBox.Text == "" || advancetextBox.Text == "" || labelarrear.Text == "" || Convert.ToString(substatuscomboBox.SelectedItem) == "") { MessageBox.Show("please enter the all details "); } else if (dba.addOrders(cusIDtextBox.Text, Convert.ToString(typecomboBox.SelectedItem), Convert.ToString(sizecomboBox.SelectedItem), ColortextBox.Text, DesigntextBox.Text, (float)Convert.ToDouble(QuantytextBox.Text), Convert.ToString(ortypecomboBox.SelectedItem), ordateTimePicker.Value.Date.ToString("MM/dd/yyyy"), duedateTimePicker.Value.Date.ToString("MM/dd/yyyy"), Convert.ToString(comstatecomboBox.SelectedItem), fullpaytextBox.Text, advancetextBox.Text, labelarrear.Text, Convert.ToString(substatuscomboBox.SelectedItem), subdatetextBox.Text)) { MessageBox.Show("Successfully Added"); Form4 f4 = new Form4(); f4.Visible = true; this.Visible = false; f4.FillGridO(); } else { MessageBox.Show("Error occured"); } this.Dispose(); f4.FillGrid(); }
//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(); }
private void button1_Click(object sender, EventArgs e) { if (Nic.Text == "" || name.Text == "" || richAddress.Text == "" || ContNumber.Text == "" || Email.Text == "") { MessageBox.Show("please enter the all details "); } else if (dba.addCustomer(Nic.Text, name.Text, richAddress.Text, ContNumber.Text, Email.Text)) { MessageBox.Show("Successfully Added"); Form4 f4 = new Form4(); f4.Visible = true; this.Visible = false; f4.FillGrid(); } else { MessageBox.Show("Error occured"); } this.Dispose(); f4.FillGrid(); }