Пример #1
0
        public static List <LocationEntity> GetByUserID(string userid, string programcode)
        {
            List <ProductLineEntity> _plines = ProductLineFactory.GetByUserID(userid, programcode);
            List <string>            _ps     = (from s in _plines select s.RMES_ID).ToList <string>();

            return(new LocationDal().FindBySql <LocationEntity>("where pline_code in (@plines)", new { plines = _ps }));
        }
Пример #2
0
        public static List <PlanTempEntity> GetCurrentUnfinishedPlanByUserID(string userID, string programcode)
        {
            UserEntity user = UserFactory.GetByID(userID);
            List <ProductLineEntity> plines = ProductLineFactory.GetByUserID(userID, programcode);

            if (plines == null || plines.Count < 1)
            {
                return(null);
            }
            else
            {
                List <string> plineCodes = new List <string>();
                foreach (var p in plines)
                {
                    plineCodes.Add(p.RMES_ID);
                }
                return(new PlanTempDal().GetCurrentUnfinishedPlanByPlines(plineCodes.ToArray()));
            }
        }