Exemplo n.º 1
0
        /// <summary>
        /// 获取第一次全取出来的数据。再过滤。 在GetBase函数中 循环。。。 paraId+_el_B再循环得到实际值.....
        /// </summary>
        /// <param name="unitId"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public List <TmpInfoE> GetFirstInfo(string unitId, out string errMsg)
        {
            DataTable       dt       = el.GetTableName(unitId, out errMsg);
            List <TmpInfoE> infoList = new List <TmpInfoE>();

            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!string.IsNullOrEmpty(dr["T_OUTTABLE"].ToString()))
                    {
                        TmpInfoE tmp = new TmpInfoE();
                        tmp.TableName   = dr["T_OUTTABLE"].ToString();
                        tmp.UnitId      = dr["T_UNITID"].ToString();
                        tmp.ParaId      = dr["T_PARAID"].ToString();
                        tmp.Desc        = dr["T_DESC"].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 : Int32.Parse(dr["I_CONSUMETYPE"].ToString());

                        tmp.Order = Convert.ToInt32(dr["I_ORDER"].ToString());
                        infoList.Add(tmp);
                    }
                    else
                    {
                        continue;
                    }
                }
            }
            return(infoList);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取第一次全取出来的数据。再过滤。 在GetBase函数中 循环。。。 paraId+_el_B再循环得到实际值.....
        /// </summary>
        /// <param name="unitId"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public List<TmpInfoE> GetFirstInfo(string unitId, out string errMsg)
        {
            DataTable dt = el.GetTableName(unitId, out errMsg);
            List<TmpInfoE> infoList = new List<TmpInfoE>();
            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!string.IsNullOrEmpty(dr["T_OUTTABLE"].ToString()))
                    {
                        TmpInfoE tmp = new TmpInfoE();
                        tmp.TableName = dr["T_OUTTABLE"].ToString();
                        tmp.UnitId = dr["T_UNITID"].ToString();
                        tmp.ParaId = dr["T_PARAID"].ToString();
                        tmp.Desc = dr["T_DESC"].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 : Int32.Parse(dr["I_CONSUMETYPE"].ToString());

                        tmp.Order = Convert.ToInt32(dr["I_ORDER"].ToString());
                        infoList.Add(tmp);
                    }
                    else
                    {
                        continue;
                    }
                }
            }
            return infoList;
        }