Exemplo n.º 1
0
        public static MemberDTO DataSetToMember(DataSet set, int rowIndex)
        {
            AddressMySQLContext a;
            string connectionString = "Server=84.31.134.4;Database=barboekmain;User Id=newuser;Password=test;";

            a = new AddressMySQLContext(connectionString); //Zorgt ervoor dat er een daadwerkelijk adres wordt opgeslagen in MemberDTO
            return(new MemberDTO()
            {
                ID = (int)set.Tables[0].Rows[rowIndex][0],
                Name = set.Tables[0].Rows[rowIndex][1].ToString(),
                Address = (AddressDTO)a.FindAddressById((int)set.Tables[0].Rows[rowIndex][2]),
                BirthDate = (DateTime)set.Tables[0].Rows[rowIndex][3],
                Email = set.Tables[0].Rows[rowIndex][4].ToString(),
                Password = set.Tables[0].Rows[rowIndex][5].ToString(),
                Access = (MemberDTO.AccessLevel)set.Tables[0].Rows[rowIndex][6],
                BondNummer = (int)set.Tables[0].Rows[rowIndex][7],
                LastName = set.Tables[0].Rows[rowIndex][8].ToString(),
                Initials = set.Tables[0].Rows[rowIndex][9].ToString(),
                Insertion = set.Tables[0].Rows[rowIndex][10].ToString(),
                PhoneNumber = set.Tables[0].Rows[rowIndex][9].ToString(),
                Gender = set.Tables[0].Rows[rowIndex][10].ToString(),
                PhoneWork = set.Tables[0].Rows[rowIndex][11].ToString(),
                PhoneMobile = set.Tables[0].Rows[rowIndex][12].ToString()
            });
        }
Exemplo n.º 2
0
        public static MemberDTO DataSetToMember(DataSet set, int rowIndex)
        {
            AddressMySQLContext a;
            string connectionString = "Server=84.31.134.4;Database=barboekmain;User Id=newuser;Password=test;";

            a = new AddressMySQLContext(connectionString); //Zorgt ervoor dat er een daadwerkelijk adres wordt opgeslagen in MemberDTO
            return(new MemberDTO()
            {
                ID = (int)set.Tables[0].Rows[rowIndex][0],
                Name = set.Tables[0].Rows[rowIndex][1].ToString(),
                Address = (AddressDTO)a.FindAddressById((int)set.Tables[0].Rows[rowIndex][2])
            });
        }
Exemplo n.º 3
0
        public static MemberDTO DataSetToMember(DataSet set, int rowIndex)
        {
            AddressMySQLContext a;
            string connectionString = "Server=192.168.15.51;Database=dbi428513;User Id=dbi428513;Password=Udkingtrug4!;";

            a = new AddressMySQLContext(connectionString); //Zorgt ervoor dat er een daadwerkelijk adres wordt opgeslagen in MemberDTO
            return(new MemberDTO()
            {
                ID = (int)set.Tables[0].Rows[rowIndex][0],
                Name = set.Tables[0].Rows[rowIndex][1].ToString(),
                Address = (AddressDTO)a.FindAddressById((int)set.Tables[0].Rows[rowIndex][2])
            });
        }