/// <summary> /// 获取数据 /// </summary> /// <param name="MotorID"></param> /// <param name="scheme"></param> /// <param name="startttime"></param> /// <param name="endtime"></param> /// <returns></returns> public DataSet GetDataFromDatabase(string MotorID, string scheme, string startttime, string endtime, out string sInfo) { sInfo = string.Empty; Framework.Data.IDA ida = new Framework.Data.DASQLServer(); string sql = string.Format("select * from dbo.Motor{0} where Scheme = '{1}' and DateTime >= '{2}' and DateTime <= '{3}'", MotorID, scheme, startttime, endtime); DataSet ds = new DataSet(); string tableName = string.Format("dbo.Motor{0}", MotorID); ds = ida.GetData(tableName, sql, out sInfo); return(ds); }
/// <summary> /// 获取数据 /// </summary> /// <param name="MotorID"></param> /// <param name="scheme"></param> /// <param name="startttime"></param> /// <param name="endtime"></param> /// <returns></returns> public DataSet GetDataFromDatabaseAutoTorque(string TableID, string scheme, string name, string memeber, string product, out string sInfo) { sInfo = string.Empty; Framework.Data.IDA ida = new Framework.Data.DASQLServer(); string sql = string.Format("select * from dbo.Motor{0} where Scheme = '{1}' and backup2 = '{2}' and backup3 = '{3}' and backup4 = '{4}'", TableID, scheme, name, memeber, product); DataSet ds = new DataSet(); string tableName = string.Format("dbo.Motor{0}", TableID); ds = ida.GetData(tableName, sql, out sInfo); return(ds); }