Exemplo n.º 1
0
 public void xoa1nhomnd(string mand)
 {
     using (QLBanHangDataContext data = new QLBanHangDataContext())
     {
         Nhomnguoidung2 ndn = new Nhomnguoidung2();
         ndn = data.Nhomnguoidung2s.Where(t => t.Manhomnguoidung == mand).FirstOrDefault();
         if (ndn != null)
         {
             data.Nhomnguoidung2s.DeleteOnSubmit(ndn);
             data.SubmitChanges();
         }
     }
 }
Exemplo n.º 2
0
        public void  them1nhomnd(string manhonnd, string tennhomnguoidung, string mota)
        {
            using (QLBanHangDataContext data = new QLBanHangDataContext())
            {
                Nhomnguoidung2 ndn = new Nhomnguoidung2();
                ndn.Manhomnguoidung  = manhonnd;
                ndn.Tennhomnguoidung = tennhomnguoidung;
                ndn.Mota             = mota;

                data.Nhomnguoidung2s.InsertOnSubmit(ndn);
                data.SubmitChanges();
            }
        }
Exemplo n.º 3
0
 public void sua1nhomnd(string mand, string tennhomnd, string mota)
 {
     using (QLBanHangDataContext data = new QLBanHangDataContext())
     {
         Nhomnguoidung2 ndn = new Nhomnguoidung2();
         ndn = data.Nhomnguoidung2s.Where(t => t.Manhomnguoidung == mand).FirstOrDefault();
         if (ndn != null)
         {
             ndn.Tennhomnguoidung = tennhomnd;
             ndn.Mota             = mota;
             data.SubmitChanges();
         }
     }
 }