Beispiel #1
0
        public List <UtilityData> SelectByIds(string _idList)
        {
            List <UtilityData> list = new List <UtilityData>();

            AddParameter("@p_IDList", _idList);

            using (MySqlDataReader reader = ExecuteReader("Util_SelByIds"))
            {
                while (reader.Read())
                {
                    UtilityData utl = new UtilityData();
                    utl.ID     = reader.GetInt32(0);
                    utl.NameID = reader.GetInt32(1);
                    utl.Value  = reader.GetString(2);

                    list.Add(utl);
                }
            }

            return(list);
        }
Beispiel #2
0
        private void SetFields(MySqlDataReader reader)
        {
            NIC                            = reader.GetString(0);
            SamaneraNumber                 = reader.GetString(1);
            PassportNumber                 = reader.GetString(2);
            PlaceOfBirth                   = reader.GetString(3);
            LayNameInFull                  = reader.GetString(4);
            DateOfBirth                    = reader.GetDateTime(5);
            NameOfFatherInFull             = reader.GetString(6);
            DateOfRobing                   = reader.GetDateTime(7);
            NameAssumedAtRobing            = reader.GetString(8);
            NameOfRobingTutor              = reader.GetInt32(9);
            TempleRobing                   = reader.GetInt32(10);
            TempleOfResidence              = reader.GetInt32(11);
            NameOfViharadhipathi           = reader.GetInt32(12);
            IsUpasampanna                  = reader.GetBoolean(13);
            PlaceOfHigherOrdination        = reader.GetInt32(14);
            DateOfHigherOrdination         = reader.GetDateTime(15);
            NameOfUpadyaAtHigherOrdination = reader.GetInt32(16);
            IsUpadyaThero                  = reader.GetBoolean(17);
            Post                           = (BhikkuPost)reader.GetInt32(18);
            District                       = reader.GetInt32(19);
            DateOfCame                     = reader.GetDateTime(20);
            ImageData                      = reader.IsDBNull(21) ? null : reader.GetString(21);
            BloodGroup                     = reader.GetString(22);

            Dharmadeshanaa = reader.GetBoolean(23);
            Vandanaa       = reader.GetBoolean(24);
            Sajjayana      = reader.GetBoolean(25);
            Sinhala        = reader.GetBoolean(26);
            Tamil          = reader.GetBoolean(27);
            English        = reader.GetBoolean(28);
            Hindhi         = reader.GetBoolean(29);

            OtheLanguage      = reader.GetString(30);;
            UpasampadaNumber  = reader.GetString(31);;
            UpasampadaRegDate = reader.GetDateTime(32);

            KarmacharyaHimi1      = reader.GetInt32(33);
            KarmacharyaHimi2      = reader.GetInt32(34);
            KarmacharyaHimi3      = reader.GetInt32(35);
            MahaNayakaHimidetails = reader.GetInt32(36);
            AcharyaHimiDetails    = reader.GetInt32(37);
            UpadyaTheroName       = reader.GetInt32(38);
            Nikaya = reader.GetInt32(39);

            HomeTP      = reader.GetString(40);
            HomeAddress = reader.GetString(41);

            UpasampadaMahaNayakaHimidetails = reader.GetInt32(42);
            UpasampadaAcharyaHimiDetails    = reader.GetInt32(43);
            UpasampadaNikaya = reader.GetInt32(44);

            Country              = reader.GetInt32(45);
            OrderNumber          = reader.GetInt32(46);
            Number               = reader.GetInt32(47);
            CurrentStatus        = (CurrenStatus)reader.GetInt32(48);
            CurrentStatusComment = reader.GetString(49);
            HomeTP2              = reader.GetString(50);

            using (UtilityData ud = new UtilityData(true))
            {
                OtherLanguages = ud.SelectByIds(OtheLanguage);
            }
        }