protected void Button4_Click(object sender, EventArgs e) { objp.emp_code = objb.getemployee_code(); objp.employee_code = objb.getemployee_code(); objp.title = DropDownList15.SelectedValue; objp.fullname = TextBox56.Text; objp.department = DropDownList16.SelectedValue; objp.role = DropDownList17.SelectedValue; if (DropDownList17.SelectedValue == "doctor") { objp.consulting_fees = Convert.ToInt32(TextBox65.Text); objb.doctorreg(objp); } objp.mobile = TextBox57.Text; objp.emp_code = objb.getemployee_code(); objp.dateofbirth = Convert.ToDateTime(TextBox59.Text + " 00:00:00"); objp.gender = DropDownList18.SelectedValue; objp.civilstatus = DropDownList19.SelectedValue; objp.telephone = TextBox60.Text; objp.email_id = TextBox58.Text; objb.employeereg(objp); objp.present_houseno = TextBox22.Text; objp.present_build_societty = TextBox33.Text; objp.present_area = TextBox62.Text; objp.present_locality = TextBox35.Text; objp.present_town = TextBox36.Text; objp.present_country_code = Convert.ToInt32(DropDownList9.SelectedValue); objp.present_state_id = Convert.ToInt32(DropDownList10.Text); objp.present_district_id = TextBox63.Text; objp.present_city = TextBox40.Text; objp.present_tal = TextBox55.Text; objp.present_pin_code = TextBox32.Text; if (CheckBox1.Checked == true) { objp.houseno = TextBox22.Text; objp.build_societty = TextBox33.Text; objp.locality = TextBox35.Text; objp.town = TextBox36.Text; objp.area = TextBox62.Text; objp.country_code = Convert.ToInt32(DropDownList9.SelectedValue); objp.state_id = Convert.ToInt32(DropDownList10.Text); objp.district_id = TextBox63.Text; objp.city = TextBox40.Text; objp.tal = TextBox55.Text; objp.pin_code = TextBox32.Text; } else { objp.houseno = TextBox45.Text; objp.build_societty = TextBox46.Text; objp.area = TextBox47.Text; objp.locality = TextBox48.Text; objp.town = TextBox49.Text; objp.country_code = Convert.ToInt32(DropDownList12.SelectedValue); objp.state_id = Convert.ToInt32(DropDownList13.Text); objp.district_id = TextBox64.Text; objp.city = TextBox50.Text; objp.tal = TextBox61.Text; objp.pin_code = TextBox54.Text; } objb.emp_address(objp); Response.Write("<SCRIPT>alert('User Added Succesfully')</SCRIPT>"); }