Exemple #1
0
 /// <summary>
 /// 获取第一次全取出来的数据。再过滤。 在GetBase函数中 循环。。。 paraId+_el_B再循环得到实际值.....
 /// </summary>
 /// <param name="unitId"></param>
 /// <param name="errMsg"></param>
 /// <returns></returns>
 public List<FirstInfo> GetFirstInfo(string companyId, string plantId, string unitId, int TargetType, int ConsumeType, out string errMsg)
 {
     DataTable dt = di.GetTableName(companyId,plantId,unitId,TargetType,ConsumeType, out errMsg);
     List<FirstInfo> infoList = new List<FirstInfo>();
     if (dt != null)
     {
         foreach (DataRow dr in dt.Rows)
         {
             if (!string.IsNullOrEmpty(dr["T_OUTTABLE"].ToString()))
             {
                 FirstInfo tmp = new FirstInfo();
                 tmp.TableName = dr["T_OUTTABLE"].ToString();
                 tmp.UnitId = dr["T_UNITID"].ToString();
                 tmp.ParaId = dr["T_PARAID"].ToString();
                 tmp.Unit = dr["T_UNIT"].ToString();
                 tmp.TargetType = dr["I_TARGETTYPE"] == DBNull.Value ? -1 : Convert.ToInt32(dr["I_TARGETTYPE"].ToString());
                 tmp.ConsumeType = dr["I_CONSUMETYPE"] == DBNull.Value ? -1 : Convert.ToInt32(dr["I_CONSUMETYPE"].ToString());
                 tmp.Order = dr["I_ORDER"] == DBNull.Value ? -1 : Convert.ToInt32(dr["I_ORDER"].ToString());
                 infoList.Add(tmp);
             }
             else
             {
                 continue;
             }
         }
     }
     return infoList;
 }
Exemple #2
0
        /// <summary>
        /// 获取第一次全取出来的数据。再过滤。 在GetBase函数中 循环。。。 paraId+_el_B再循环得到实际值.....
        /// </summary>
        /// <param name="unitId"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public List <FirstInfo> GetFirstInfo(string companyId, string plantId, string unitId, int TargetType, int ConsumeType, out string errMsg)
        {
            DataTable        dt       = di.GetTableName(companyId, plantId, unitId, TargetType, ConsumeType, out errMsg);
            List <FirstInfo> infoList = new List <FirstInfo>();

            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!string.IsNullOrEmpty(dr["T_OUTTABLE"].ToString()))
                    {
                        FirstInfo tmp = new FirstInfo();
                        tmp.TableName   = dr["T_OUTTABLE"].ToString();
                        tmp.UnitId      = dr["T_UNITID"].ToString();
                        tmp.ParaId      = dr["T_PARAID"].ToString();
                        tmp.Unit        = dr["T_UNIT"].ToString();
                        tmp.TargetType  = dr["I_TARGETTYPE"] == DBNull.Value ? -1 : Convert.ToInt32(dr["I_TARGETTYPE"].ToString());
                        tmp.ConsumeType = dr["I_CONSUMETYPE"] == DBNull.Value ? -1 : Convert.ToInt32(dr["I_CONSUMETYPE"].ToString());
                        tmp.Order       = dr["I_ORDER"] == DBNull.Value ? -1 : Convert.ToInt32(dr["I_ORDER"].ToString());
                        infoList.Add(tmp);
                    }
                    else
                    {
                        continue;
                    }
                }
            }
            return(infoList);
        }