protected void Button1_Click(object sender, EventArgs e) { if ((TextBox1.Text =="" ) || (TextBox3.Text == "") || (TextBox4.Text == "") || (TextBox5.Text == "") || (TextBox6.Text == "") || (TextBox7.Text == "") || (DropDownList1.SelectedItem.ToString() == "Select") || (DropDownList2.SelectedItem.ToString() == "Select") || (DropDownList3.SelectedItem.ToString() == "Select")) { Label13.Text = "Error in submitting application! Please resubmit!"; } else { customer_keeper ck = new customer_keeper(); int id = ck.get_id(); customer_class cc = new customer_class(); cc._id = id; cc._name = TextBox1.Text; cc._father = TextBox4.Text; cc._address = TextBox3.Text; cc._email = TextBox2.Text; cc._contact = TextBox6.Text; cc._dist = DropDownList3.SelectedItem.ToString(); cc._pin = TextBox5.Text; cc._dob = TextBox7.Text; dealer_keeper dk = new dealer_keeper(); int dealer = dk.GetDealerID(cc._dist); cc._dealer_id = dealer; ck.insert(cc); Label12.Text = "Your New connection request has been submitted for Validation."; Label13.Text = "Customer ID " + id.ToString(); } }
protected void Button1_Click(object sender, EventArgs e) { if (DropDownList3.SelectedItem.ToString() == TextBox2.Text) { Label8.Text = "you cannot change to the same dealer!"; } else { dealer_keeper dk = new dealer_keeper(); int id = dk.GetDealerID(DropDownList3.SelectedItem.ToString()); port_keeper pk = new port_keeper(); int id1 = pk.get_id(); pk.insert(id1, int.Parse(TextBox1.Text), id,TextBox3.Text ); Label8.Text = "Porting id generated = " + id1; } }