public static Sastoglfetch BuildSastoglfetchFromRow(DataRow row) { Sastoglfetch entity = new Sastoglfetch(); entity.codeval = row.IsNull("codeval") ? 0 : row.Field <int>("codeval"); entity.sastoglacct = row.IsNull("sastoglacct") ? string.Empty : row.Field <string>("sastoglacct"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSastoglfetch(ref DataRow row, Sastoglfetch entity) { row.SetField("codeval", entity.codeval); row.SetField("sastoglacct", entity.sastoglacct); row.SetField("userfield", entity.userfield); }