/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAuthpointtrans(ref DataRow row, Authpointtrans entity) { row.SetField("oper2", entity.oper2); row.SetField("functionname", entity.functionname); row.SetField("sectionname", entity.sectionname); row.SetField("pointname", entity.pointname); row.SetField("modename", entity.modename); row.SetField("transtype", entity.transtype); row.SetField("descrip", entity.descrip); row.SetField("attemptdt", entity.attemptdt); row.SetField("attempttm", entity.attempttm); row.SetField("activefl", entity.activefl); row.SetField("authstatdesc", entity.authstatdesc); row.SetField("updatestatus", entity.updatestatus); row.SetField("userfield", entity.userfield); }
public static Authpointtrans BuildAuthpointtransFromRow(DataRow row) { Authpointtrans entity = new Authpointtrans(); entity.oper2 = row.IsNull("oper2") ? string.Empty : row.Field <string>("oper2"); entity.functionname = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname"); entity.sectionname = row.IsNull("sectionname") ? string.Empty : row.Field <string>("sectionname"); entity.pointname = row.IsNull("pointname") ? string.Empty : row.Field <string>("pointname"); entity.modename = row.IsNull("modename") ? string.Empty : row.Field <string>("modename"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.attemptdt = row.Field <DateTime?>("attemptdt"); entity.attempttm = row.IsNull("attempttm") ? string.Empty : row.Field <string>("attempttm"); entity.activefl = row.Field <bool>("activefl"); entity.authstatdesc = row.IsNull("authstatdesc") ? string.Empty : row.Field <string>("authstatdesc"); entity.updatestatus = row.IsNull("updatestatus") ? string.Empty : row.Field <string>("updatestatus"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }