Exemple #1
0
        public static int Get_IdDoc()
        {
            int          id     = 0;
            List <BTDoc> List   = new List <BTDoc>();
            string       querry = "select * from BTDoc";
            DataTable    Table  = new DataTable();

            Table = DataProvider.instanse.Executequerry(querry);
            if (Table.Rows.Count > 0)
            {
                foreach (DataRow item in Table.Rows)
                {
                    BTDoc BTDoc = new BTDoc(item);
                    id = BTDoc.Id_Doc;
                    List.Add(BTDoc);
                }
            }
            return(id);
        }
Exemple #2
0
        public static List <BTDoc> LoadDSCauHoi_TheoMaDe(int MaDe)
        {
            List <BTDoc> List   = new List <BTDoc>();
            string       querry = "select * from BTDoc where Id_Doc in (select Id_Doc from ChiTiet_Doc  where Id_MaDe =" + MaDe + ")";
            DataTable    Table  = new DataTable();

            Table = DataProvider.instanse.Executequerry(querry);
            if (Table.Rows.Count > 0)
            {
                foreach (DataRow item in Table.Rows)
                {
                    BTDoc BTDoc = new BTDoc(item);
                    List.Add(BTDoc);
                }
            }
            else
            {
                return(null);
            }
            return(List);
        }
Exemple #3
0
        public static List <BTDoc> LoadDSCauHoi()
        {
            List <BTDoc> List   = new List <BTDoc>();
            string       querry = "select * from BTDoc";
            DataTable    Table  = new DataTable();

            Table = DataProvider.instanse.Executequerry(querry);
            if (Table.Rows.Count > 0)
            {
                foreach (DataRow item in Table.Rows)
                {
                    BTDoc BTDoc = new BTDoc(item);
                    List.Add(BTDoc);
                }
            }
            else
            {
                return(null);
            }
            return(List);
        }