public ActionResult studentlogin(studlog ob)
 {
     if (ModelState.IsValid)
     {
         registrationEntities std = new registrationEntities();
         ObjectParameter      obj = new ObjectParameter("status", typeof(int));
         std.sp_loginstu(ob.username, ob.password, obj);
         int value = Convert.ToInt32(obj.Value);
         if (value == 1)
         {
             Session["log"] = ob.username;
             return(RedirectToAction("home"));
         }
         else
         {
             ob = new studlog();
             ModelState.Clear();
             ob.msg = "login failed";
             return(View("studentlogin", ob));
         }
     }
     else
     {
         return(View("studentlogin", ob));
     }
 }
        public ActionResult Applyjob1(studlog ob)
        {
            if (ModelState.IsValid)
            {
                registrationEntities std = new registrationEntities();
                ObjectParameter      obj = new ObjectParameter("status", typeof(int));
                std.sp_loginstu(ob.username, ob.password, obj);
                int value = Convert.ToInt32(obj.Value);
                if (value == 1)
                {
                    std.sp_appljob1(ob.username, ob.password, obj);
                    ob = new studlog();
                    ModelState.Clear();

                    ob.msg = "Job Apply Succesfull";
                    return(View("Applyjob1", ob));
                }
                else
                {
                    ob = new studlog();
                    ModelState.Clear();
                    ob.msg = "Please Register first";
                    return(View("Applyjob1", ob));
                }
            }
            else
            {
                return(View("Applyjob1", ob));
            }
        }