/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSasgesingle(ref DataRow row, Sasgesingle entity) { row.SetField("custnohidden", entity.custnohidden); row.SetField("shiptohidden", entity.shiptohidden); row.SetField("certificatehidden", entity.certificatehidden); row.SetField("taxdatehidden", entity.taxdatehidden); row.SetField("statecolumnlabel", entity.statecolumnlabel); row.SetField("statecriterialabel", entity.statecriterialabel); row.SetField("taxmethodty", entity.taxmethodty); row.SetField("userfield", entity.userfield); }
public static Sasgesingle BuildSasgesingleFromRow(DataRow row) { Sasgesingle entity = new Sasgesingle(); entity.custnohidden = row.Field <bool>("custnohidden"); entity.shiptohidden = row.Field <bool>("shiptohidden"); entity.certificatehidden = row.Field <bool>("certificatehidden"); entity.taxdatehidden = row.Field <bool>("taxdatehidden"); entity.statecolumnlabel = row.IsNull("statecolumnlabel") ? string.Empty : row.Field <string>("statecolumnlabel"); entity.statecriterialabel = row.IsNull("statecriterialabel") ? string.Empty : row.Field <string>("statecriterialabel"); entity.taxmethodty = row.IsNull("taxmethodty") ? string.Empty : row.Field <string>("taxmethodty"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }