示例#1
0
        public List <district_tb> get_districtdata()
        {
            List <district_tb> aTbs = new List <district_tb>();
            var highScores          = db.district_tb;

            foreach (var VAR1 in highScores)
            {
                district_tb aTb = new district_tb();
                aTb.districtID   = VAR1.districtID;
                aTb.districtName = VAR1.districtName;

                aTbs.Add(aTb);
            }

            return(aTbs);
        }
示例#2
0
        public string getdisNamebydisId(int ias)
        {
            district_tb aTb        = new district_tb();
            string      name       = "";
            var         highScores = from oTb in db.district_tb
                                     where oTb.districtID == ias
                                     select oTb;

            if (highScores.Count() == 1)
            {
                foreach (var VAR1 in highScores)
                {
                    name = VAR1.districtName;
                }
            }
            return(name);
        }