示例#1
0
        public ActionResult Myprofile(int id)
        {
            connectioncontext d = new connectioncontext();

            Response.Write(Session["pathge"]);
            return(View(d.employess.Single(x => x.id == id)));
        }
示例#2
0
        public ActionResult log(registration k)
        {
            if (ModelState.IsValid)
            {
                connectioncontext hjx = new connectioncontext();
                var kk = hjx.employess.Where(x => x.email.Equals(k.email) && x.password.Equals(k.password)).FirstOrDefault();

                if (kk != null)
                {
                    Session["io"] = kk.id.ToString();
                    Session["st"] = kk.status.ToString();
                    Session["na"] = kk.name.ToString();

                    Session["em"] = kk.email.ToString();
                    string val = Session["em"].ToString();
                    Session["vallllue"] = kk.filenames.ToString();
                    //if (kk.filenames != null)
                    //{
                    //    Session["vallllue"] = kk.filenames.ToString();

                    //}
                    //else
                    //{
                    //    Session["vallllue"] = null;
                    //}
                    return(RedirectToAction("Home"));
                }
                else
                {
                    Response.Write("Please enter the Correct Credentionals please");
                }
            }
            return(View(k));
        }
示例#3
0
        //
        // GET: /Home/


        public ActionResult Index()
        {
            connectioncontext k = new connectioncontext();

            ViewBag.country = new SelectList(k.allcountry, "id", "country");
            ViewBag.city    = new SelectList(k.allcities, "city", "city");
            return(View());
        }
示例#4
0
        public ActionResult Indexs(registration r) //
        {
            connectioncontext k = new connectioncontext();

            ViewBag.country = new SelectList(k.allcountry, "id", "country");
            ViewBag.city    = new SelectList(k.allcities, "city", "city");
            bussinesclass l = new bussinesclass();

            l.create(r);
            return(View());
        }
示例#5
0
        public ActionResult get(int stid)  //retriving r
        {
            connectioncontext hj = new connectioncontext();
            retriving         k  = new retriving();

            hj.Configuration.ProxyCreationEnabled = false;

            ViewBag.uid = new SelectList(k.conx, "id", "city");

            List <SelectListItem> districtNames = new List <SelectListItem>();

            retriving r = new retriving();

            List <string> o = r.conx.Where(x => x.countryid.Equals(stid)).Select(d => d.city).ToList();

            return(Json(r.conx.Where(x => x.countryid.Equals(stid)).Select(d => d.city).ToList(), JsonRequestBehavior.AllowGet));  //r.conx.Where(x => x.countryid == r.stid)
        }
示例#6
0
        public ActionResult Message(int id)  //retriving r
        {
            if (Session["em"] != null)
            {
                connectioncontext c = new connectioncontext();

                var MessageHomeView = new MessageHomeViewModel
                {
                    Employes = c.employess.Single(x => x.id == id)
                };

                return(View(MessageHomeView));
            }
            else
            {
                return(RedirectToAction("popup"));
            }
        }
示例#7
0
        public ActionResult Home(string stid, string uid)  //retriving r  string stid, string uid
        {
            retriving h = new retriving();

            ViewBag.stid = new SelectList(h.con, "id", "country");
            ViewBag.uid  = new SelectList(h.conx, "id", "city");
            connectioncontext p = new connectioncontext();



            string hj = "Donner";

            var values = new HomeViewModel
            {
                registration = p.employess
                               .Where(x => x.country.Equals(stid) && x.city.Equals(uid) && x.status.Equals(hj))
            };



            return(View(values));
        }
示例#8
0
        //public ActionResult logout()
        //{
        //    //string path = System.IO.Path.Combine(
        //    //                        Server.MapPath("~/images/profile"), pic);
        //    //// file is uploaded
        //    //file.SaveAs(path);
        //    Session.Remove("na");
        //    Session.Remove("em");
        //    Session.Remove("ff");
        //    Session.Remove("vallllue");
        //    return RedirectToAction("log");
        //}


        public ActionResult Home()
        {
            // Response.Write( Session["vallllue"]);



            //if (Session["em"] != null) {



            retriving         h   = new retriving();
            connectioncontext emp = new connectioncontext();

            ViewBag.stid = new SelectList(h.con, "id", "country");
            ViewBag.uid  = new SelectList(h.conx, "id", "city");
            HomeViewModel HomeViewModel = new HomeViewModel
            {
                Country      = h.con,
                Cities       = h.conx,
                registration = emp.employess.ToList()
            };

            return(View(HomeViewModel));
        }
示例#9
0
        public JsonResult checkcnic(string cnic)
        {
            connectioncontext d = new connectioncontext();

            return(Json(!d.employess.Any(x => x.cnic == cnic), JsonRequestBehavior.AllowGet));
        }
示例#10
0
        public JsonResult checkemail(string email)
        {
            connectioncontext d = new connectioncontext();

            return(Json(!d.employess.Any(x => x.email == email), JsonRequestBehavior.AllowGet));
        }
示例#11
0
        public ActionResult mail(int id)  //retriving r
        {
            connectioncontext c = new connectioncontext();

            return(View(c.employess.Single(x => x.id == id)));
        }