public ActionResult Click(FormCollection f)
        {
            int   i = Convert.ToInt32(f["formID"]);
            Buyer b = buyerRepository.GetBuyer(i);

            return(View("Details", b));
        }
Exemplo n.º 2
0
        public ActionResult LogOn(FormCollection f)
        {
            try
            {
                int          id   = Convert.ToInt32(f["formID"]);
                string       pass = f["formPass"];
                Merchandiser m    = merchRepository.GetMerch(id, pass);

                if (m == null)
                {
                    Buyer b = buyerRepository.GetBuyer(id, pass);
                    if (b == null)
                    {
                        return(View("~/Views/Home/NotFound.aspx"));
                    }
                    else
                    {
                        if (b.Valid == 1)
                        {
                            Session["buyerID"] = f["formID"];
                            return(View("Buyer", b));
                        }
                        return(View("~/Views/Home/NotFound.aspx"));
                    }
                }
                else
                {
                    Session["merchID"] = f["formID"];
                    return(View("Merch", m));
                }
            }
            catch (Exception e)
            {
                return(View("~/Views/Home/NotFound.aspx"));
            }
        }
Exemplo n.º 3
0
        public ActionResult BuyerDetails(int id)
        {
            Buyer b = buyerRepository.GetBuyer(id);

            return(View("BuyerDetails", b));
        }