コード例 #1
0
 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"]));
         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;
             // semester.Text = k[0].sem;
             acc_type.Text = k[0].acc_type;
             // hostel.Text = k[0].hostel;
             // bus.Text = k[0].bus;
             lastupd.Text  = k[0].lastupd;
             password.Text = k[0].password;
             // lastupd.Text = k[0].lastupd;
         }
     }
 }
コード例 #2
0
ファイル: hod_profile.aspx.cs プロジェクト: test2251/kanha
    protected void Page_Load(object sender, EventArgs e)
    {
        success.Visible = false;

        if (!IsPostBack)
        {
            read();
        }
        fname.Focus();
        if (Page.IsPostBack == false)
        {
            clsregister obj             = new clsregister();
            List <clsregistrationprp> k = obj.find_rec(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;
                email.Text         = k[0].email;
                dob.Text           = k[0].dob;
                contact.Text       = k[0].contact;
                department.Text    = k[0].dept;
                father.Text        = k[0].father;
                mother.Text        = k[0].mother;
                address.Text       = k[0].address;
                password.Text      = k[0].password;
                lastupd.Text       = k[0].lastupd;
                //Button1.Text = "update";
            }
        }
    }
コード例 #3
0
ファイル: update.aspx.cs プロジェクト: test2251/kanha
    protected void Page_Load(object sender, EventArgs e)
    {
        firstname.Focus();
        if (Page.IsPostBack == false)
        {
            string pID = Convert.ToString(Session["regid"]);

            clsregister obj             = new clsregister();
            List <clsregistrationprp> k = obj.find_rec(Convert.ToInt32(pID));
            List <clsregistrationprp> p = obj.find_parent(Convert.ToInt32(pID));

            if (k.Count > 0)
            {
                ViewState["regid"] = k[0].regid;
                firstname.Text     = k[0].f_name;
                lastname.Text      = k[0].l_name;
                rollno.Text        = k[0].rollno;
                emailaddress.Text  = k[0].email;
                dob.Text           = k[0].dob;
                contact.Text       = k[0].contact;
                father_name.Text   = k[0].father;
                mother_name.Text   = k[0].mother;
                address.Text       = k[0].address;
                parentcontact.Text = p[0].parentcontact;
                parentemail.Text   = p[0].parentemail;
                DropDownList4.SelectedItem.Text = k[0].dept;
                Sem.SelectedItem.Text           = k[0].sem;
                DropDownList3.SelectedItem.Text = k[0].acc_type;
                hostel.Text   = k[0].hostel;
                bus.Text      = k[0].bus;
                Password.Text = k[0].password;
                lstupd.Text   = k[0].lastupd;
            }
        }
        if (Convert.ToInt32(DropDownList3.SelectedItem.Value) == 2 || Convert.ToInt32(DropDownList3.SelectedItem.Value) == 3)
        {
            rollno.ReadOnly = false;
            Sem.Enabled     = true;
            // parent.ReadOnly = false
            parentcontact.ReadOnly = false;
            parentemail.ReadOnly   = false;
        }

        else
        {
            rollno.ReadOnly = true;
            Sem.Enabled     = false;
            //parent.ReadOnly = true;
            parentcontact.ReadOnly = true;
            parentemail.ReadOnly   = true;
        }
    }
コード例 #4
0
ファイル: profile.aspx.cs プロジェクト: parulgarg123/MY_AD
 protected void Page_Load(object sender, EventArgs e)
 {
     success.Visible = false;
     txtf_name.Focus();
     if (Page.IsPostBack == false)
     {
         clsregister obj             = new clsregister();
         List <clsregistrationprp> k = obj.find_rec(Convert.ToInt32(Session["cod"]));
         if (k.Count > 0)
         {
             ViewState["regid"] = k[0].regid;
             txtf_name.Text     = k[0].f_name;
             txtl_name.Text     = k[0].l_name;
             contact.Text       = k[0].contact;
             txtaddress.Text    = k[0].address;
             txtemail.Text      = k[0].email;
             txtpassword.Text   = k[0].password;
             //Button1.Text = "update";
         }
     }
 }