Exemple #1
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     Info             = dbEntity.tbl_userInfo.ToList().Where(x => x.E_id == Convert.ToInt32(Session["Eid"].ToString())).FirstOrDefault();
     Info.fname       = txtFname.Text;
     Info.lname       = txtLname.Text;
     Info.designation = txtDeg.Text;
     Info.password    = txtPWord.Text;
     dbEntity.AddTotbl_userInfo(Info);
     dbEntity.SaveChanges();
 }
        protected void btnSubmitProfile_Click(object sender, EventArgs e)
        {
            DinningManagementEntities2 db = new DinningManagementEntities2();
            tbl_userInfo ufoObj           = new tbl_userInfo();

            ufoObj.fname       = txtFname.Text.ToString();
            ufoObj.lname       = txtLname.Text.ToString();
            ufoObj.designation = txtDeg.Text.ToString();
            ufoObj.username    = txtUname.Text.ToString();
            ufoObj.password    = txtPWord.Text.ToString();

            db.AddTotbl_userInfo(ufoObj);

            db.SaveChanges();
            clean();
        }