Example #1
0
        public int XoaTuyenXe(string a)
        {
            int         kq  = 0;
            DAO_TuyenXe txe = new DAO_TuyenXe();

            kq = txe.XoaTuyenXe(a);
            return(kq);
        }
        public DataTable getTuyenXe()
        {
            DAO_TuyenXe daoTuyenXe = new DAO_TuyenXe();
            DataTable   dt         = new DataTable();

            dt = daoTuyenXe.GetTuyenXe();
            return(dt);
        }
Example #3
0
        public int SuaTuyenXe(TuyenXe a)
        {
            int         kq  = 0;
            DAO_TuyenXe txe = new DAO_TuyenXe();

            kq = txe.SuaTuyenXe(a);
            return(kq);
        }
Example #4
0
        public DataTable LoadTuyenXe()
        {
            DAO_TuyenXe txe = new DAO_TuyenXe();
            DataTable   dt  = new DataTable();

            dt = txe.LoadTuyenXe();

            return(dt);
        }
Example #5
0
        List <string> IDTuyenFromGiaVe()
        {
            List <string> list = new List <string>();
            DAO_TuyenXe   tx   = new DAO_TuyenXe();
            DataTable     dt   = tx.IDTuyenFromGiaVe();

            foreach (DataRow row in dt.Rows)
            {
                list.Add(row[0].ToString());
            }
            return(list);
        }
Example #6
0
        public List <string> LoadIDTram()
        {
            List <string> list = new List <string>();
            DAO_TuyenXe   txe  = new DAO_TuyenXe();
            DataTable     dt   = new DataTable();

            dt = txe.IDTram();
            foreach (DataRow row in dt.Rows)
            {
                list.Add(row[0].ToString());
            }
            return(list);
        }
Example #7
0
        public int ThemTuyenXe(TuyenXe a)
        {
            int         kq  = 0;
            DAO_TuyenXe txe = new DAO_TuyenXe();
            DataTable   dt  = txe.IDTuyen();

            foreach (DataRow row in dt.Rows)
            {
                if (a.id_tuyen == row[0].ToString())
                {
                    return(-1);
                }
            }
            kq = txe.ThemTuyenXe(a);
            return(kq);
        }
        public bool DeleteTuyenXe(int id)
        {
            DAO_TuyenXe daotuyenxe = new DAO_TuyenXe();

            return(daotuyenxe.DeleteTuyenXe(id));
        }
        public bool UpdateTuyenXe(TuyenXe tx)
        {
            DAO_TuyenXe daotuyenxe = new DAO_TuyenXe();

            return(daotuyenxe.UpdateTuyenXe(tx));
        }
        public bool InsertTuyenXe(TuyenXe tx)
        {
            DAO_TuyenXe daotuyenxe = new DAO_TuyenXe();

            return(daotuyenxe.InsertTuyenXe(tx));
        }
        public TuyenXe getTuyenXeByID(int id)
        {
            DAO_TuyenXe daoTuyenXe = new DAO_TuyenXe();

            return(daoTuyenXe.GetTuyenXeByID(id));
        }
        public List <TuyenXe> GetTuyenXeCbb()
        {
            DAO_TuyenXe daotuyen = new DAO_TuyenXe();

            return(daotuyen.GetTuyenXeCbb());
        }