Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGetaddrcontactresults(ref DataRow row, Getaddrcontactresults entity)
 {
     row.SetField("city", entity.city);
     row.SetField("citylabel", entity.citylabel);
     row.SetField("state", entity.state);
     row.SetField("zip", entity.zip);
     row.SetField("typetxt", entity.typetxt);
     row.SetField("name", entity.name);
     row.SetField("addr1", entity.addr1);
     row.SetField("countrycd", entity.countrycd);
     row.SetField("currsymbol", entity.currsymbol);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("phone", entity.phone);
     row.SetField("faxphone", entity.faxphone);
     row.SetField("contact1", entity.contact1);
     row.SetField("contact2", entity.contact2);
     row.SetField("contactphone1", entity.contactphone1);
     row.SetField("contactphone2", entity.contactphone2);
     row.SetField("addr2", entity.addr2);
     row.SetField("addr3", entity.addr3);
     row.SetField("typetxtlbl", entity.typetxtlbl);
     row.SetField("contact1lbl", entity.contact1lbl);
     row.SetField("contact2lbl", entity.contact2lbl);
     row.SetField("citylabelhidden", entity.citylabelhidden);
     row.SetField("statehidden", entity.statehidden);
     row.SetField("countrycdhidden", entity.countrycdhidden);
     row.SetField("currsymbolhidden", entity.currsymbolhidden);
     row.SetField("currencytyhidden", entity.currencytyhidden);
     row.SetField("contact1hidden", entity.contact1hidden);
     row.SetField("contact2hidden", entity.contact2hidden);
     row.SetField("contactphone1hidden", entity.contactphone1hidden);
     row.SetField("contactphone2hidden", entity.contactphone2hidden);
 }
Beispiel #2
0
        public static Getaddrcontactresults BuildGetaddrcontactresultsFromRow(DataRow row)
        {
            Getaddrcontactresults entity = new Getaddrcontactresults();

            entity.city                = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.citylabel           = row.IsNull("citylabel") ? string.Empty : row.Field <string>("citylabel");
            entity.state               = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zip                 = row.IsNull("zip") ? string.Empty : row.Field <string>("zip");
            entity.typetxt             = row.IsNull("typetxt") ? string.Empty : row.Field <string>("typetxt");
            entity.name                = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.addr1               = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1");
            entity.countrycd           = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd");
            entity.currsymbol          = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol");
            entity.currencyty          = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.phone               = row.IsNull("phone") ? string.Empty : row.Field <string>("phone");
            entity.faxphone            = row.IsNull("faxphone") ? string.Empty : row.Field <string>("faxphone");
            entity.contact1            = row.IsNull("contact1") ? string.Empty : row.Field <string>("contact1");
            entity.contact2            = row.IsNull("contact2") ? string.Empty : row.Field <string>("contact2");
            entity.contactphone1       = row.IsNull("contactphone1") ? string.Empty : row.Field <string>("contactphone1");
            entity.contactphone2       = row.IsNull("contactphone2") ? string.Empty : row.Field <string>("contactphone2");
            entity.addr2               = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2");
            entity.addr3               = row.IsNull("addr3") ? string.Empty : row.Field <string>("addr3");
            entity.typetxtlbl          = row.IsNull("typetxtlbl") ? string.Empty : row.Field <string>("typetxtlbl");
            entity.contact1lbl         = row.IsNull("contact1lbl") ? string.Empty : row.Field <string>("contact1lbl");
            entity.contact2lbl         = row.IsNull("contact2lbl") ? string.Empty : row.Field <string>("contact2lbl");
            entity.citylabelhidden     = row.Field <bool>("citylabelhidden");
            entity.statehidden         = row.Field <bool>("statehidden");
            entity.countrycdhidden     = row.Field <bool>("countrycdhidden");
            entity.currsymbolhidden    = row.Field <bool>("currsymbolhidden");
            entity.currencytyhidden    = row.Field <bool>("currencytyhidden");
            entity.contact1hidden      = row.Field <bool>("contact1hidden");
            entity.contact2hidden      = row.Field <bool>("contact2hidden");
            entity.contactphone1hidden = row.Field <bool>("contactphone1hidden");
            entity.contactphone2hidden = row.Field <bool>("contactphone2hidden");
            return(entity);
        }