예제 #1
0
        public void save()
        {
            string query = string.Format(@"
			insert into Product 
			  (Name, Description, Price, IdProductType)
			values 
			  ('{0}', '{1}', '{2}', 1);
			"            ,
                                         this.Name,
                                         this.Description,
                                         this.Price
                                         );

            BangazonConnection conn = new BangazonConnection();

            conn.insert(query);
        }
        public void save()
        {
            string query = string.Format(@"
			insert into PaymentOption 
			  (IdCustomer, Name, AccountNumber)
			values 
			  ('{0}', '{1}', '{2}');
			"            ,
                                         this.IdCustomer,
                                         this.Name,
                                         this.AccountNumber
                                         );

            BangazonConnection conn = new BangazonConnection();

            conn.insert(query);
        }
예제 #3
0
        public void save()
        {
            string query = string.Format(@"
			insert into CustomerOrder
			  (OrderNumber, DateCreated, IdCustomer, IdPaymentOption, ShippingMethod, Complete)
			values 
			  ('{0}', '{1}', {2}, {3}, '{4}', {5});
			"            ,
                                         this.OrderNumber,
                                         this.DateCreated,
                                         this.IdCustomer,
                                         this.IdPaymentOption,
                                         this.ShippingMethod,
                                         this.Complete
                                         );

            BangazonConnection conn = new BangazonConnection();

            conn.insert(query);
        }
예제 #4
0
        public void save()
        {
            string query = string.Format(@"
			insert into Customer 
			  (FirstName, LastName, StreetAddress, City, StateProvince, PostalCode, PhoneNumber)
			values 
			  ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}');
			"            ,
                                         this.FirstName,
                                         this.LastName,
                                         this.StreetAddress,
                                         this.City,
                                         this.StateProvince,
                                         this.PostalCode,
                                         this.PhoneNumber
                                         );

            BangazonConnection conn = new BangazonConnection();

            conn.insert(query);
        }