Exemplo n.º 1
0
        public List <PlinePlanMDL> GetPlanInfos(DateTime datetime)
        {
            List <PlinePlanMDL> list = null;

            try
            {
                DataSet dataSet = null;

                string strSql = "SELECT * FROM tlb_product_plan WHERE PLANID LIKE '{0}%'";

                strSql = string.Format(strSql, datetime.ToString("yyyyMMdd"));


                dataSet = MySqlDBHelper.ExecuteDataSet(MySqlDBHelper.Conn, CommandType.Text, strSql);

                if (dataSet == null || dataSet.Tables[0].Rows.Count <= 0)
                {
                    return(null);
                }

                list = new List <PlinePlanMDL>();

                foreach (DataRow row in dataSet.Tables[0].Rows)
                {
                    list.Add(PlinePlanMDL.PraseDataRow(row));
                }


                return(list);
            }
            catch
            {
                throw;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取记录
        /// </summary>
        /// <param name="lineID"></param>
        /// <param name="range"></param>
        /// <returns>minutes</returns>
        public PlinePlanMDL GetPlanInfo(string lineID)
        {
            PlinePlanMDL mdl = null;

            try
            {
                DataSet dataSet = null;

                string strSql = "SELECT * FROM tlb_product_plan WHERE PLANID='{0}'";

                strSql = string.Format(strSql, lineID);


                dataSet = MySqlDBHelper.ExecuteDataSet(MySqlDBHelper.Conn, CommandType.Text, strSql);

                if (dataSet == null || dataSet.Tables[0].Rows.Count <= 0)
                {
                    return(null);
                }

                mdl = PlinePlanMDL.PraseDataRow(dataSet.Tables[0].Rows[0]);

                return(mdl);
            }
            catch
            {
                throw;
            }
        }