コード例 #1
0
    protected void submit_Click(object sender, EventArgs e)
    {
        clsregister        obj    = new clsregister();
        clsregistrationprp objprp = new clsregistrationprp();

        objprp.email    = username.Text;
        objprp.password = password.Text;
        Label1.Visible  = true;
        try {
            Int32 b = obj.logincheck(objprp);
            Int32 a = obj.logincheck1(objprp);

            if (b == -4)
            {
                Session["cod"] = a;
                Response.Redirect("next/principal/homepr.aspx");
            }
            else if (b == -3)
            {
                Session["cod"] = a;
                Response.Redirect("next/hod/homeh.aspx");
            }
            else if (b == -2)
            {
                Session["cod"] = a;
                Response.Redirect("next/cc/homecc.aspx");
            }
            else
            {
                Label1.Text = "error";
            }
        }
        catch (Exception exp)
        {
            Label1.Text = "INVALID USERNAME PASSWORD";
        }
    }
コード例 #2
0
ファイル: add_cc.aspx.cs プロジェクト: test2251/kanha
    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!!!";
        }
    }
コード例 #3
0
ファイル: update.aspx.cs プロジェクト: test2251/kanha
    protected void Page_Load(object sender, EventArgs e)
    {
        success.Visible  = false;
        nsuccess.Visible = false;

        fname.Focus();
        if (Page.IsPostBack == false)
        {
            clsregister obj             = new clsregister();
            List <clsregistrationprp> k = obj.find_rec(Convert.ToInt32(Session["regid"]));
            List <clsregistrationprp> p = obj.find_parent(Convert.ToInt32(Session["regid"]));

            if (k.Count > 0)
            {
                ViewState["regid"]  = k[0].regid;
                fname.Text          = k[0].f_name;
                lname.Text          = k[0].l_name;
                rollno.Text         = k[0].rollno;
                email.Text          = k[0].email;
                dob.Text            = k[0].dob;
                contact.Text        = k[0].contact;
                father.Text         = k[0].father;
                mother.Text         = k[0].mother;
                address.Text        = k[0].address;
                department.Text     = k[0].dept;
                parent_contact.Text = p[0].parentcontact;
                parent_email.Text   = p[0].parentemail;
                semester.Text       = k[0].sem;
                acc_type.Text       = k[0].acc_type;
                hostel.Text         = k[0].hostel;
                bus.Text            = k[0].bus;
                password.Text       = k[0].password;
                lastupd.Text        = k[0].lastupd;
            }
        }
    }
コード例 #4
0
ファイル: profilechild.aspx.cs プロジェクト: test2251/kanha
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            clsregister obj             = new clsregister();
            List <clsregistrationprp> k = obj.find_rec(Convert.ToInt32(Session["stu"]));
            if (k.Count > 0)
            {
                ViewState["regid"] = k[0].regid;
                firstname.Text     = k[0].f_name;
                lastname.Text      = k[0].l_name;
                email.Text         = k[0].email;
                dob.Text           = k[0].dob;
                contact.Text       = k[0].contact;
                department.Text    = k[0].dept;
                fathername.Text    = k[0].father;
                mothername.Text    = k[0].mother;
                address.Text       = k[0].address;

                lastupdate.Text = k[0].lastupd;
                //Button1.Text = "update";
            }
        }
    }