/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromDbconnectdtl(ref DataRow row, Dbconnectdtl entity) { row.SetField("connectId", entity.connectId); row.SetField("connectUser", entity.connectUser); row.SetField("connectType", entity.connectType); row.SetField("connectName", entity.connectName); row.SetField("connectDevice", entity.connectDevice); row.SetField("connectTime", entity.connectTime); row.SetField("connectPid", entity.connectPid); row.SetField("connectServer", entity.connectServer); row.SetField("connectTransid", entity.connectTransid); row.SetField("connectBatch", entity.connectBatch); row.SetField("connectIpaddress", entity.connectIpaddress); row.SetField("cGUID", entity.cGUID); row.SetField("dbconnectdtluserfield", entity.dbconnectdtluserfield); row.SetField("userfield", entity.userfield); }
public static Dbconnectdtl BuildDbconnectdtlFromRow(DataRow row) { Dbconnectdtl entity = new Dbconnectdtl(); entity.connectId = row.IsNull("connectId") ? 0 : row.Field <long>("connectId"); entity.connectUser = row.IsNull("connectUser") ? 0 : row.Field <int>("connectUser"); entity.connectType = row.IsNull("connectType") ? string.Empty : row.Field <string>("connectType"); entity.connectName = row.IsNull("connectName") ? string.Empty : row.Field <string>("connectName"); entity.connectDevice = row.IsNull("connectDevice") ? string.Empty : row.Field <string>("connectDevice"); entity.connectTime = row.IsNull("connectTime") ? string.Empty : row.Field <string>("connectTime"); entity.connectPid = row.IsNull("connectPid") ? 0 : row.Field <int>("connectPid"); entity.connectServer = row.IsNull("connectServer") ? 0 : row.Field <int>("connectServer"); entity.connectTransid = row.IsNull("connectTransid") ? 0 : row.Field <int>("connectTransid"); entity.connectBatch = row.IsNull("connectBatch") ? string.Empty : row.Field <string>("connectBatch"); entity.connectIpaddress = row.IsNull("connectIpaddress") ? string.Empty : row.Field <string>("connectIpaddress"); entity.cGUID = row.IsNull("cGUID") ? string.Empty : row.Field <string>("cGUID"); entity.dbconnectdtluserfield = row.IsNull("dbconnectdtluserfield") ? string.Empty : row.Field <string>("dbconnectdtluserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }