Exemplo n.º 1
0
        public List <DTO_BAN> LoadTableList(string IDKhuVuc)
        {
            List <DTO_BAN> tablelist = new List <DTO_BAN>();
            string         sTruyVan  = string.Format(@"SELECT * FROM [CF_Ban] WHERE IDKhuVuc = {0} ", IDKhuVuc);
            DataTable      data      = new DataTable();

            data = DataProvider.TruyVanLayDuLieu(sTruyVan);
            foreach (DataRow item in data.Rows)
            {
                DTO_BAN table = new DTO_BAN(item);
                tablelist.Add(table);
            }
            return(tablelist);
        }
Exemplo n.º 2
0
        public static List <DTO_BAN> DanhSachBanTheoKhuVuc(int IDKhuVuc, int TrangThai, int IDBan)
        {
            List <DTO_BAN> tablelist = new List <DTO_BAN>();
            string         sTruyVan  = string.Format(@"SELECT * FROM [CF_Ban] WHERE IDKhuVuc = {0} AND ('" + TrangThai + "' = -1 OR [TrangThai] = {1}) AND [ID] != {2} ", IDKhuVuc, TrangThai, IDBan);
            DataTable      data      = new DataTable();

            data = DataProvider.TruyVanLayDuLieu(sTruyVan);
            foreach (DataRow item in data.Rows)
            {
                DTO_BAN table = new DTO_BAN(item);
                tablelist.Add(table);
            }
            return(tablelist);
        }