示例#1
0
        public static object Maplist()
        {
            List <CSMAP> MAP = new List <CSMAP>();

            using (NabayubakDBEntities db = new NabayubakDBEntities())
            {
                var obj = db.Class_section_MAP.Join(db.Classname, x => x.ClassId, y => y.ClassId, (x, y) => new
                {
                    x.ClassId,
                    y.Class,
                    x.Id,
                    x.Section,
                    x.SectionId,
                }).ToList();

                foreach (var item in obj)
                {
                    CSMAP ad = new CSMAP();
                    ad.Classid   = item.ClassId;
                    ad.Class     = item.Class;
                    ad.Id        = item.Id;
                    ad.Section   = item.Section;
                    ad.Sectionid = item.SectionId;

                    MAP.Add(ad);
                }
            }
            return(MAP);
        }
示例#2
0
        public static object Section()
        {
            List <CSMAP> MAP = new List <CSMAP>();

            using (NabayubakDBEntities db = new NabayubakDBEntities())
            {
                var obj = db.Sectionname.ToList();

                foreach (var item in obj)
                {
                    CSMAP ad = new CSMAP();
                    ad.Sectionid = item.SectionId;
                    ad.Section   = item.Section;

                    MAP.Add(ad);
                }
            }
            return(MAP);
        }
示例#3
0
        public static object Cascadedropdownclasslist()
        {
            List <CSMAP> MAP = new List <CSMAP>();

            using (NabayubakDBEntities db = new NabayubakDBEntities())
            {
                var obj = db.Classname.ToList();

                foreach (var item in obj)
                {
                    CSMAP ad = new CSMAP();
                    ad.Classid = item.ClassId;
                    ad.Class   = item.Class;

                    MAP.Add(ad);
                }
            }
            return(MAP);
        }
示例#4
0
        public static object Cascadedropdownsectionlist(int Classid)
        {
            List <CSMAP> MAP = new List <CSMAP>();

            using (NabayubakDBEntities db = new NabayubakDBEntities())
            {
                var obj = db.Class_section_MAP.Where(x => x.ClassId == Classid).ToList();

                foreach (var item in obj)
                {
                    CSMAP ad = new CSMAP();
                    ad.Id        = item.Id;
                    ad.Classid   = item.ClassId;
                    ad.Section   = item.Section;
                    ad.Sectionid = item.SectionId;


                    MAP.Add(ad);
                }
            }
            return(MAP);
        }