protected void submit_Click(object sender, EventArgs e) { clsregister obj = new clsregister(); clsregistrationprp objprp = new clsregistrationprp(); objprp.email = email.Text; objprp.f_name = fname.Text; objprp.l_name = lname.Text; objprp.rollno = rollno.Text; objprp.sem = semester.Text; objprp.dept = department.Text; objprp.dob = dob.Text; objprp.father = father.Text; objprp.mother = mother.Text; objprp.parentemail = parent_email.Text; objprp.parentcontact = parent_contact.Text; objprp.parentpassword = CreateRandomPassword(); objprp.parent = father.Text; objprp.hostel = hostel.Text; objprp.bus = bus.Text; objprp.address = address.Text; objprp.acc_type = acc_type.Text; objprp.password = password.Text; objprp.contact = contact.Text; objprp.lastupd = Convert.ToString(Session["cod"]) + "||" + "Cc" + "||" + Convert.ToString(DateTime.Now); try { success.Visible = true; obj.save_rec(objprp); objprp.studentid = obj.findid(objprp); obj.join_family(objprp); success.Text = " Student " + fname.Text + " " + lname.Text + " Added Successfully"; msgtoparent(); msgtostudent(); button_clear(); } catch (Exception exp) { success.Visible = true; success.Text = "ERROR!!!"; } }
protected void submit_Click(object sender, EventArgs e) { clsregister obj = new clsregister(); clsregistrationprp objprp = new clsregistrationprp(); objprp.email = email.Text; objprp.f_name = fname.Text; objprp.l_name = lname.Text; objprp.rollno = "NA"; objprp.sem = "NA"; objprp.dept = department.Text; objprp.dob = dob.Text; objprp.father = father.Text; objprp.mother = mother.Text; objprp.hostel = "NA"; objprp.bus = "NA"; objprp.address = address.Text; objprp.acc_type = acc_type.Text; objprp.password = password.Text; objprp.contact = contact.Text; objprp.lastupd = Convert.ToString("HOD " + Session["name_hod"]) + " " + Session["dept_hod"] + " " + Convert.ToString(DateTime.Now); try { success.Visible = true; obj.save_rec(objprp); success.Text = " Class Counsellor " + fname.Text + " " + lname.Text + " Added Successfully"; msgtocc(); button_clear(); } catch (Exception exp) { success.Visible = true; success.Text = "ERROR!!!"; } }