Ejemplo n.º 1
0
        public static List <QuyenSD> GetListQuyen(int Id_Tk)
        {
            List <QuyenSD> listQuyen = new List <QuyenSD>();
            string         querry    = "exec 	GetListQuyenByid1 '"+ Id_Tk + "'";
            DataTable      check     = DataProvider.instanse.Executequerry(querry);

            if (check == null)
            {
                return(null);
            }
            foreach (DataRow item in check.Rows)
            {
                QuyenSD ac = new QuyenSD(item);
                listQuyen.Add(ac);
            }
            return(listQuyen);
        }
Ejemplo n.º 2
0
        public static List <QuyenSD> GetListQuyen_LoaiTV(int Id_LoaiTV)
        {
            string         querry = "select * from QuyenSD where Id_QuyenSD in ( select Id_QuyenSD from Quyen_LoaiTV where Id_LoaiTV =" + Id_LoaiTV + ")";
            List <QuyenSD> List   = new List <QuyenSD>();

            DataTable Table = new DataTable();

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