/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSaeefldsdate(ref DataRow row, Saeefldsdate entity) { row.SetField("allowblankfl", entity.allowblankfl); row.SetField("arraypos", entity.arraypos); row.SetField("dataty", entity.dataty); row.SetField("eventname", entity.eventname); row.SetField("fieldlabel", entity.fieldlabel); row.SetField("fieldlength", entity.fieldlength); row.SetField("fieldname", entity.fieldname); row.SetField("keyindex", entity.keyindex); row.SetField("operinit", entity.operinit); row.SetField("pricecostty", entity.pricecostty); row.SetField("transdt", entity.transdt); row.SetField("transproc", entity.transproc); row.SetField("transtm", entity.transtm); row.SetField("validatelist", entity.validatelist); row.SetField("datefield", entity.datefield); row.SetField("userfield", entity.userfield); }
public static Saeefldsdate BuildSaeefldsdateFromRow(DataRow row) { Saeefldsdate entity = new Saeefldsdate(); entity.allowblankfl = row.Field <bool>("allowblankfl"); entity.arraypos = row.IsNull("arraypos") ? 0 : row.Field <int>("arraypos"); entity.dataty = row.IsNull("dataty") ? string.Empty : row.Field <string>("dataty"); entity.eventname = row.IsNull("eventname") ? string.Empty : row.Field <string>("eventname"); entity.fieldlabel = row.IsNull("fieldlabel") ? string.Empty : row.Field <string>("fieldlabel"); entity.fieldlength = row.IsNull("fieldlength") ? 0 : row.Field <int>("fieldlength"); entity.fieldname = row.IsNull("fieldname") ? string.Empty : row.Field <string>("fieldname"); entity.keyindex = row.IsNull("keyindex") ? string.Empty : row.Field <string>("keyindex"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.pricecostty = row.IsNull("pricecostty") ? string.Empty : row.Field <string>("pricecostty"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.validatelist = row.IsNull("validatelist") ? string.Empty : row.Field <string>("validatelist"); entity.datefield = row.Field <DateTime?>("datefield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }