Exemplo n.º 1
0
        public static int GetTonKho(int maChiTietSanPham)
        {
            List <KHO_HANG> khs      = KHO_HANG.select(" where MA_CHI_TIET_SAN_PHAM = " + maChiTietSanPham + " ");
            int             tongCong = 0;

            for (int i = 0; i < khs.Count; i++)
            {
                tongCong += khs[i].CON_LAI;
            }
            return(tongCong);
        }
Exemplo n.º 2
0
 public static KHO_HANG LayKhoHang(int maKho)
 {
     try
     {
         return(KHO_HANG.select(" where MA_KHO = " + maKho + " ")[0]);
     }
     catch (Exception)
     {
         return(null);
     }
 }