/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAuthpointsecurityupdate(ref DataRow row, Authpointsecurityupdate 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("tosecurcd", entity.tosecurcd); row.SetField("updatestatus", entity.updatestatus); row.SetField("userfield", entity.userfield); }
public static Authpointsecurityupdate BuildAuthpointsecurityupdateFromRow(DataRow row) { Authpointsecurityupdate entity = new Authpointsecurityupdate(); 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.tosecurcd = row.IsNull("tosecurcd") ? 0 : row.Field <int>("tosecurcd"); entity.updatestatus = row.IsNull("updatestatus") ? string.Empty : row.Field <string>("updatestatus"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }