Example #1
0
        public List <CpAndDeptTableModel> CpAndDeptGridViewForDp(string deptName)
        {
            List <CpAndDeptTableModel> cadtList = new List <CpAndDeptTableModel>();
            var                 q    = from x in context.Departments where x.Dept_Name == deptName select x;
            Department          d    = q.First();
            CpAndDeptTableModel cadt = new CpAndDeptTableModel();

            cadt.Dept_ID         = d.Dept_ID;
            cadt.Collection_ID   = d.Collection_ID;
            cadt.Collection_Desc = d.CollectionPoint.Collection_Desc;
            cadtList.Add(cadt);

            return(cadtList);
        }
Example #2
0
        public List <CpAndDeptTableModel> CpAndDeptGridViewAll()
        {
            List <CpAndDeptTableModel> cadtList = new List <CpAndDeptTableModel>();
            var q = from x in context.Departments where x.Dept_ID != "STAT" && x.Dept_ID != "SUPP" select x;

            foreach (Department d in q.ToList())
            {
                CpAndDeptTableModel cadt = new CpAndDeptTableModel();
                cadt.Dept_ID         = d.Dept_ID;
                cadt.Collection_ID   = d.Collection_ID;
                cadt.Collection_Desc = GetCollectionDescByID(d.Collection_ID);
                cadtList.Add(cadt);
            }
            return(cadtList);
        }
Example #3
0
        public List <CpAndDeptTableModel> CpAndDeptGridViewForCp(string cpID)
        {
            List <CpAndDeptTableModel> cadtList = new List <CpAndDeptTableModel>();
            var q = from x in context.Departments where x.Collection_ID == cpID select x;

            foreach (Department d in q.ToList())
            {
                CpAndDeptTableModel cadt = new CpAndDeptTableModel();
                cadt.Dept_ID         = d.Dept_ID;
                cadt.Collection_ID   = d.Collection_ID;
                cadt.Collection_Desc = d.CollectionPoint.Collection_Desc;
                cadtList.Add(cadt);
            }
            return(cadtList);
        }