public ActionResult Index(int id) { if (Session["U_id"] == null) { return(RedirectToAction("Index", "Home")); } else { MV db = new MV(); 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); //Merge_Ads_images MAI = new Merge_Ads_images(); //MAI.ads = db.adsdetail(id); //MAI.images = db.adsdetailimages(id); //MAI.Menu = menudisplay; Ads ad = db.adsdetail(id); ViewBag.ads = ad; List <Ads> img_list = db.adsdetailimages(id); ViewBag.imglst = img_list; ViewBag.state = new SelectList(model.States, "S_id", "S_name"); ViewBag.category = new SelectList(model.Categories, "C_id", "C_Name"); return(View(menudisplay)); } }
public ActionResult Index(int getid) { Ads bid = db.adsdetail(getid); List <Category> cat = db.NavMenu(); ViewBag.category = cat; if (bid.sold_product == 'Y'.ToString()) { return(RedirectToAction("Index", "main")); } else { ViewBag.bid_user = db.Bid_user_details(getid); return(View(bid)); } }