コード例 #1
0
        public ActionResult Index()
        {
            if (Session["U_id"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                Merge_Ads_images MAI = new Merge_Ads_images();

                AP_Menu menu    = new AP_Menu();
                var     r       = Convert.ToInt32(Session["U_id"]);
                var     user_id = r;

                var            Menulist    = db.user_rights(user_id);
                List <AP_Menu> menudisplay = menu.Menutree(Menulist, null);

                List <Ads> ads = db.fetchdetail(r);
                ViewBag.data = ads;
                //MAI.Menu = menudisplay;
                //MAI.images = ads;

                return(View(menudisplay));
            }
        }
コード例 #2
0
        public ActionResult Index()
        {
            if (Session["U_id"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                Merge_Ads_images MAI = new Merge_Ads_images();

                AP_Menu menu    = new AP_Menu();
                var     r       = Convert.ToInt32(Session["U_id"]);
                var     user_id = r;

                var            Menulist    = db.user_rights(user_id);
                List <AP_Menu> menudisplay = menu.Menutree(Menulist, null);



                Ads emp = db.AutoGenerate();
                ViewBag.state    = new SelectList(model.States, "S_id", "S_name");
                ViewBag.category = new SelectList(model.Categories, "C_id", "C_Name");

                MAI.Menu = menudisplay;
                MAI.ads  = emp;

                return(View(MAI));
            }
        }
コード例 #3
0
        public ActionResult Index(int id)
        {
            Ads        master = db.promstrdata(id);
            List <Ads> detail = db.prodtldata(id);

            Merge_Ads_images pass = new Merge_Ads_images();

            pass.ads    = master;
            pass.images = detail;

            return(View(pass));
        }
コード例 #4
0
        public ActionResult Index(int id)
        {
            Ads        master = db.promstrdata(id);
            List <Ads> detail = db.prodtldata(id);

            List <Category> cat = db.NavMenu();

            ViewBag.category = cat;

            Merge_Ads_images pass = new Merge_Ads_images();

            pass.ads    = master;
            pass.images = detail;

            return(View(pass));
        }
コード例 #5
0
        public ActionResult Index()
        {
            if (Session["U_id"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                AP_Menu          menu = new AP_Menu();
                Merge_Ads_images MAI  = new Merge_Ads_images();

                var            user        = Convert.ToInt32(Session["U_id"]);
                var            Menulist    = db.user_rights(user);
                List <AP_Menu> menudisplay = menu.Menutree(Menulist, null);


                var r     = Session["U_id"].ToString();
                var graph = db.adscount(r).ToArray();

                List <Ads> ads = db.fetchdetail(Convert.ToInt16(r));
                ViewBag.table_list = ads;

                ViewBag.grap = graph;

                var bid_count = db.count_bid(Convert.ToInt16(r));
                ViewBag.bid_count = bid_count.id;

                var bid_prod = db.count_prod(Convert.ToInt16(r));
                ViewBag.bid_prod = bid_prod.id;

                var earn = db.earntotal(Convert.ToInt16(r));
                ViewBag.earn = earn.Price;

                var bid_saleprod = db.count_saleprod(Convert.ToInt16(r));
                ViewBag.bid_saleprod = bid_saleprod.id;


                var count_bid = db.count_bidperprod(Convert.ToInt16(r));
                ViewBag.count_bid = count_bid.id;



                return(View(menudisplay));
            }
        }