private void FillRecordCustomers(object rec, object[] fields)
        {
            CustomersVerticalBar record = (CustomersVerticalBar)rec;

            record.CustomerID   = (string)fields[0];
            record.CompanyName  = (string)fields[1];
            record.ContactName  = (string)fields[2];
            record.ContactTitle = (string)fields[3];
            record.Address      = (string)fields[4];
            record.City         = (string)fields[5];
            record.Country      = (string)fields[6];
        }
        private object FillRecord(object[] fields)
        {
            var record = new CustomersVerticalBar();

            record.CustomerID   = (string)fields[0];
            record.CompanyName  = (string)fields[1];
            record.ContactName  = (string)fields[2];
            record.ContactTitle = (string)fields[3];
            record.Address      = (string)fields[4];
            record.City         = (string)fields[5];
            record.Country      = (string)fields[6];

            return(record);
        }
Exemple #3
0
        protected string GetInsertSqlCust(object record)
        {
            CustomersVerticalBar obj = (CustomersVerticalBar)record;

            return(String.Format("INSERT INTO CustomersTemp (Address, City, CompanyName, ContactName, ContactTitle, Country, CustomerID) " +
                                 " VALUES ( '{0}' , '{1}' , '{2}' , '{3}' , '{4}' , '{5}' , '{6}'  ); ",
                                 obj.Address.Replace("'", "\""),
                                 obj.City.Replace("'", "\""),
                                 obj.CompanyName.Replace("'", "\""),
                                 obj.ContactName.Replace("'", "\""),
                                 obj.ContactTitle.Replace("'", "\""),
                                 obj.Country.Replace("'", "\""),
                                 obj.CustomerID
                                 ));
        }
        protected string GetInsertSqlCust(object record)
        {
            CustomersVerticalBar obj = (CustomersVerticalBar)record;

            return(String.Format("INSERT INTO CustomersTemp (Address, City, CompanyName, ContactName, ContactTitle, Country, CustomerID) " +
                                 " VALUES ( \"{0}\" , \"{1}\" , \"{2}\" , \"{3}\" , \"{4}\" , \"{5}\" , \"{6}\"  ); ",
                                 obj.Address,
                                 obj.City,
                                 obj.CompanyName,
                                 obj.ContactName,
                                 obj.ContactTitle,
                                 obj.Country,
                                 obj.CustomerID
                                 ));
        }
Exemple #5
0
    private static string GetInsertSqlCust(object record)
    {
        CustomersVerticalBar obj = (CustomersVerticalBar)record;

        return(String.Format("INSERT INTO Customers (Address, City, CompanyName, ContactName, ContactTitle, Country, CustomerID) " +
                             " VALUES ( '{0}' , '{1}' , '{2}' , '{3}' , '{4}' , '{5}' , '{6}'  ); ",
                             obj.Address,
                             obj.City,
                             obj.CompanyName,
                             obj.ContactName,
                             obj.ContactTitle,
                             obj.Country,
                             obj.CustomerID
                             ));
    }
Exemple #6
0
        private object FillRecord(object[] fields)
        {
            var record = new CustomersVerticalBar();

            record.CustomerID = (string) fields[0];
            record.CompanyName = (string) fields[1];
            record.ContactName = (string) fields[2];
            record.ContactTitle = (string) fields[3];
            record.Address = (string) fields[4];
            record.City = (string) fields[5];
            record.Country = (string) fields[6];

            return record;
        }