public static Loadpoheaderaddlwhseresults BuildLoadpoheaderaddlwhseresultsFromRow(DataRow row) { Loadpoheaderaddlwhseresults entity = new Loadpoheaderaddlwhseresults(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.billtowhse = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse"); entity.shiptonm = row.IsNull("shiptonm") ? string.Empty : row.Field <string>("shiptonm"); entity.billtoname = row.IsNull("billtoname") ? string.Empty : row.Field <string>("billtoname"); entity.shiptoaddr1 = row.IsNull("shiptoaddr1") ? string.Empty : row.Field <string>("shiptoaddr1"); entity.billtoaddr1 = row.IsNull("billtoaddr1") ? string.Empty : row.Field <string>("billtoaddr1"); entity.shiptoaddr2 = row.IsNull("shiptoaddr2") ? string.Empty : row.Field <string>("shiptoaddr2"); entity.billtoaddr2 = row.IsNull("billtoaddr2") ? string.Empty : row.Field <string>("billtoaddr2"); entity.shiptoaddr3 = row.IsNull("shiptoaddr3") ? string.Empty : row.Field <string>("shiptoaddr3"); entity.billtoaddr3 = row.IsNull("billtoaddr3") ? string.Empty : row.Field <string>("billtoaddr3"); entity.shiptocity = row.IsNull("shiptocity") ? string.Empty : row.Field <string>("shiptocity"); entity.billtocity = row.IsNull("billtocity") ? string.Empty : row.Field <string>("billtocity"); entity.shiptost = row.IsNull("shiptost") ? string.Empty : row.Field <string>("shiptost"); entity.shiptozip = row.IsNull("shiptozip") ? string.Empty : row.Field <string>("shiptozip"); entity.billtost = row.IsNull("billtost") ? string.Empty : row.Field <string>("billtost"); entity.billtozip = row.IsNull("billtozip") ? string.Empty : row.Field <string>("billtozip"); entity.billtophoneno = row.IsNull("billtophoneno") ? string.Empty : row.Field <string>("billtophoneno"); entity.shiptophone = row.IsNull("shiptophone") ? string.Empty : row.Field <string>("shiptophone"); entity.countrycd = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd"); entity.billtocountrycd = row.IsNull("billtocountrycd") ? string.Empty : row.Field <string>("billtocountrycd"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromLoadpoheaderaddlwhseresults(ref DataRow row, Loadpoheaderaddlwhseresults entity) { row.SetField("whse", entity.whse); row.SetField("billtowhse", entity.billtowhse); row.SetField("shiptonm", entity.shiptonm); row.SetField("billtoname", entity.billtoname); row.SetField("shiptoaddr1", entity.shiptoaddr1); row.SetField("billtoaddr1", entity.billtoaddr1); row.SetField("shiptoaddr2", entity.shiptoaddr2); row.SetField("billtoaddr2", entity.billtoaddr2); row.SetField("shiptoaddr3", entity.shiptoaddr3); row.SetField("billtoaddr3", entity.billtoaddr3); row.SetField("shiptocity", entity.shiptocity); row.SetField("billtocity", entity.billtocity); row.SetField("shiptost", entity.shiptost); row.SetField("shiptozip", entity.shiptozip); row.SetField("billtost", entity.billtost); row.SetField("billtozip", entity.billtozip); row.SetField("billtophoneno", entity.billtophoneno); row.SetField("shiptophone", entity.shiptophone); row.SetField("countrycd", entity.countrycd); row.SetField("billtocountrycd", entity.billtocountrycd); }