Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        {
            clsregister        obj    = new clsregister();
            clsregistrationprp objprp = new clsregistrationprp();
            objprp.regid         = Convert.ToInt32(Session["regid"]);
            objprp.email         = emailaddress.Text;
            objprp.father        = father_name.Text;
            objprp.f_name        = firstname.Text;
            objprp.l_name        = lastname.Text;
            objprp.mother        = mother_name.Text;
            objprp.dob           = dob.Text;
            objprp.bus           = bus.Text;
            objprp.hostel        = hostel.Text;
            objprp.rollno        = rollno.Text;
            objprp.sem           = Sem.SelectedItem.Text;
            objprp.address       = address.Text;
            objprp.dept          = DropDownList4.SelectedItem.Text;
            objprp.acc_type      = DropDownList3.SelectedItem.Text;
            objprp.password      = Password.Text;
            objprp.parentcontact = parentcontact.Text;
            objprp.parentemail   = parentemail.Text;
            objprp.parent        = father_name.Text;
            objprp.contact       = contact.Text;
            objprp.lastupd       = Convert.ToString(Session["cod"]) + "||" + "Admin" + "||" + Convert.ToString(DateTime.Now);
            obj.update_rec(objprp);
            try
            {
                success.Visible = true;
                obj.update_rec(objprp);
                obj.update_parent(objprp);
                success.Text = "Student " + firstname.Text + "-" + lastname.Text + " Added Successfully";
            }
            catch (Exception exp)
            {
                success.Visible = true;

                success.Text = exp + "ERROR!!!";
            }


            firstname.Text    = string.Empty;
            lastname.Text     = string.Empty;
            rollno.Text       = string.Empty;
            emailaddress.Text = string.Empty;
            rollno.Text       = string.Empty;
            contact.Text      = string.Empty;
            Password.Text     = string.Empty;
            father_name.Text  = string.Empty;
            mother_name.Text  = string.Empty;
            address.Text      = string.Empty;
            bus.Text          = string.Empty;
            hostel.Text       = string.Empty;
            dob.Text          = string.Empty;
            DropDownList3.Items.Clear();
            DropDownList4.Items.Clear();
        }
    }
Esempio n. 2
0
    protected void submit_Click(object sender, EventArgs e)
    {
        clsregister        obj    = new clsregister();
        clsregistrationprp objprp = new clsregistrationprp();

        objprp.regid    = Convert.ToInt32(Session["regid"]);
        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.update_rec(objprp);
            Response.Redirect("view.aspx");
            success.Text = "CC " + fname.Text + "-" + lname.Text + " Added Successfully";
        }
        catch (Exception exp)
        {
            nsuccess.Visible = true;
            nsuccess.Text    = "ERROR!!!";
        }
    }
Esempio n. 3
0
    protected void submit_Click(object sender, EventArgs e)
    {
        clsregister        obj    = new clsregister();
        clsregistrationprp objprp = new clsregistrationprp();

        objprp.regid    = Convert.ToInt32(Session["regid"]);
        objprp.f_name   = fname.Text;
        objprp.l_name   = lname.Text;
        objprp.email    = email.Text;
        objprp.dob      = dob.Text;
        objprp.rollno   = rollno.Text;
        objprp.sem      = semester.Text;
        objprp.hostel   = hostel.Text;
        objprp.bus      = bus.Text;
        objprp.acc_type = "Cc";
        objprp.contact  = contact.Text;
        objprp.dept     = department.Text;
        objprp.father   = father.Text;
        objprp.mother   = mother.Text;
        objprp.address  = address.Text;
        objprp.password = password.Text;
        objprp.lastupd  = Convert.ToString("Principal " + Session["name_principle"]) + " " + Convert.ToString(DateTime.Now);
        obj.update_rec(objprp);
        success.Visible = true;
        success.Text    = "   Changes have been updated.";
        read();
    }
Esempio n. 4
0
    protected void submit_Click(object sender, EventArgs e)
    {
        clsregister        obj    = new clsregister();
        clsregistrationprp objprp = new clsregistrationprp();

        objprp.regid    = Convert.ToInt32(Session["cod"]);
        objprp.f_name   = fname.Text;
        objprp.l_name   = lname.Text;
        objprp.email    = email.Text;
        objprp.dob      = dob.Text;
        objprp.rollno   = "NA";
        objprp.sem      = "NA";
        objprp.hostel   = "NA";
        objprp.bus      = "NA";
        objprp.acc_type = "HOD";
        objprp.contact  = contact.Text;
        objprp.dept     = department.Text;
        objprp.father   = father.Text;
        objprp.mother   = mother.Text;
        objprp.address  = address.Text;
        objprp.password = password.Text;
        objprp.lastupd  = Convert.ToString("HOD " + Session["name_hod"]) + " " + Session["dept_hod"] + " " + Convert.ToString(DateTime.Now);
        obj.update_rec(objprp);
        success.Visible = true;
        Response.Redirect("profileh.aspx");
        success.Text = "   Changes have been updated.";
    }
Esempio n. 5
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        clsregister        obj    = new clsregister();
        clsregistrationprp objprp = new clsregistrationprp();

        objprp.regid    = Convert.ToInt32(Session["cod"]);
        objprp.f_name   = txtf_name.Text;
        objprp.l_name   = txtl_name.Text;
        objprp.contact  = contact.Text;
        objprp.address  = txtaddress.Text;
        objprp.email    = txtemail.Text;
        objprp.password = txtpassword.Text;
        obj.update_rec(objprp);
        success.Visible = true;
        success.Text    = "Changes have been updated.";
    }