コード例 #1
0
 public NguoiDung(NGUOIDUNG nd)
     : this()
 {
     MaSoNguoiDung = nd.masonguoidung;
     TenNguoiDung = nd.tennguoidung;
     MatKhau = nd.matkhau;
     TenDayDu = nd.tendaydu;
     Email = nd.email;
     PhanQuyen = nd.phanquyen;
     TrangThai = nd.trangthai;
 }
コード例 #2
0
 public static int add(NguoiDung nguoidung)
 {
     try
     {
         using (EntitiesDataContext db = new EntitiesDataContext())
         {
             var s = new NGUOIDUNG();
             s.tennguoidung = nguoidung.TenNguoiDung;
             s.matkhau = nguoidung.MatKhau;
             s.tendaydu = nguoidung.TenDayDu;
             s.email = nguoidung.Email;
             s.phanquyen = nguoidung.PhanQuyen;
             s.trangthai = nguoidung.TrangThai;
             db.NGUOIDUNGs.InsertOnSubmit(s);
             db.SubmitChanges();
             return s.masonguoidung;
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         return 0;
     }
 }
コード例 #3
0
 partial void DeleteNGUOIDUNG(NGUOIDUNG instance);
コード例 #4
0
 partial void UpdateNGUOIDUNG(NGUOIDUNG instance);
コード例 #5
0
 partial void InsertNGUOIDUNG(NGUOIDUNG instance);
コード例 #6
0
 public NguoiDung(NGUOIDUNG nd, DAILY dl)
     : this(nd)
 {
     MaSoDaiLy = dl.masodaily;
     DaiLy = new DaiLy(dl);
 }