예제 #1
0
        public void DangKy(NguoiDungBO nguoidungBO)
        {
            //Tạo mới một NguoiDung

            hoctuvungLINQDataContext db = new hoctuvungLINQDataContext();
            NguoiDung InsNguoiDung = new NguoiDung();
            //Thêm thụôc tính cần Insert
            InsNguoiDung.taikhoan = nguoidungBO.TaiKhoan;
            InsNguoiDung.matkhau = nguoidungBO.MatKhau;
            InsNguoiDung.email = nguoidungBO.Email;
            InsNguoiDung.dt = nguoidungBO.DT;
            InsNguoiDung.banned = false;
            InsNguoiDung.quyen = "User";   
            //thực hiện Insert
            db.NguoiDungs.InsertOnSubmit(InsNguoiDung);
            db.SubmitChanges();           
        }
 partial void UpdateNguoiDung(NguoiDung instance);
 partial void DeleteNguoiDung(NguoiDung instance);
 partial void InsertNguoiDung(NguoiDung instance);