Exemple #1
0
 public static int GetMaNVNext()
 {
     using (var db = new SieuThiDBDataContext())
     {
         int?manv = 0;
         var nv   = db.NhanViens.FirstOrDefault();
         db.ManvNext(ref manv);
         if (nv == null)
         {
             return(1);
         }
         else
         {
             db.ManvNext(ref manv);
             return(manv + 1 ?? 1);
         }
     }
 }
Exemple #2
0
 public static int GetMaNhaCCNext()
 {
     using (var db = new SieuThiDBDataContext())
     {
         int?ma = 0;
         var nv = db.nhacungcaps.FirstOrDefault();
         if (nv == null)
         {
             return(1);
         }
         else
         {
             db.ManvNext(ref ma);
             return(ma + 1 ?? 1);
         }
     }
 }