Exemple #1
0
        public ActionResult SoftDownList()
        {
            int           UserID     = int.Parse(TakeCookie.GetCookie("userId"));
            Tb_ApplyTable modelTable = (Tb_ApplyTable)mHelp.GetModelBy <Tb_ApplyTable>(m => m.UserID == UserID);

            if (modelTable != null)
            {
                List <Tb_ApplySoftList> list = mHelp.GetListBy <Tb_ApplySoftList>(m => m.ApplyID == modelTable.ApplyID);
                if (list != null)
                {
                    List <Tb_SoftList> listSoft = new List <Tb_SoftList>();
                    foreach (Tb_ApplySoftList item in list)
                    {
                        Tb_SoftList soft = (Tb_SoftList)mHelp.GetModelBy <Tb_SoftList>(m => m.SoftID == item.SoftID);
                        if (soft != null)
                        {
                            listSoft.Add(soft);
                        }
                    }
                    if (listSoft != null)
                    {
                        ViewBag.listSoft = listSoft;
                        return(View());
                    }
                }
            }
            return(View("index"));
            //List<Tb_SoftList> listSoft = mHelp.GetAll<Tb_SoftList>();
        }