/// <summary>
 /// 更新t_Sys_MainRealTimeSet
 /// </summary>
 public virtual bool Update(SysMainRealTimeSetOR sysMainRealTimeSet)
 {
     string sql = "update t_Sys_MainRealTimeSet set  StationID = @StationID,  DeviceID = @DeviceID,  ChannelNO = @ChannelNO,   YmaxValue = @YmaxValue,  YminValue = @YminValue,  Yupper = @Yupper,  Ylower = @Ylower,  GridHeight = @GridHeight";
     SqlParameter[] parameters = new SqlParameter[]
     {
         new SqlParameter("@StationID", SqlDbType.Int, 4, ParameterDirection.Input, false, 0, 0, "StationID", DataRowVersion.Default, sysMainRealTimeSet.Stationid),
         new SqlParameter("@DeviceID", SqlDbType.Int, 4, ParameterDirection.Input, false, 0, 0, "DeviceID", DataRowVersion.Default, sysMainRealTimeSet.Deviceid),
         new SqlParameter("@ChannelNO", SqlDbType.Int, 4, ParameterDirection.Input, false, 0, 0, "ChannelNO", DataRowVersion.Default, sysMainRealTimeSet.Channelno),
         new SqlParameter("@YmaxValue", SqlDbType.Float, 8, ParameterDirection.Input, false, 0, 0, "YmaxValue", DataRowVersion.Default, sysMainRealTimeSet.Ymaxvalue),
         new SqlParameter("@YminValue", SqlDbType.Float, 8, ParameterDirection.Input, false, 0, 0, "YminValue", DataRowVersion.Default, sysMainRealTimeSet.Yminvalue),
         new SqlParameter("@Yupper", SqlDbType.Float, 8, ParameterDirection.Input, false, 0, 0, "Yupper", DataRowVersion.Default, sysMainRealTimeSet.Yupper),
         new SqlParameter("@Ylower", SqlDbType.Float, 8, ParameterDirection.Input, false, 0, 0, "Ylower", DataRowVersion.Default, sysMainRealTimeSet.Ylower),
         new SqlParameter("@GridHeight", SqlDbType.Float, 8, ParameterDirection.Input, false, 0, 0, "GridHeight", DataRowVersion.Default, sysMainRealTimeSet.Gridheight)
     };
     return db.ExecuteNoQuery(sql, parameters) > -1;
 }
 public SysMainRealTimeSetOR selectARowDate()
 {
     string sql = string.Format("select * from t_Sys_MainRealTimeSet");
     DataTable dt = null;
     try
     {
         dt = db.ExecuteQueryDataSet(sql).Tables[0];
     }
     catch (Exception ex)
     {
         throw ex;
     }
     if (dt == null)
         return null;
     if (dt.Rows.Count == 0)
         return null;
     DataRow dr = dt.Rows[0];
     SysMainRealTimeSetOR m_SysM = new SysMainRealTimeSetOR(dr);
     return m_SysM;
 }