コード例 #1
0
 public ActionResult DoLogin()
 {
     try
     {
         Session["ogrenciNo"] = Request.Form["OgrenciNo"];
         Session["sifre"]     = Request.Form["Sifre"];
         Obisis.Ogrenci ogr = new Obisis.Ogrenci(Session["ogrenciNo"].ToString(), Session["sifre"].ToString());
         Session["student"] = ogr;
         Obisis.AddLoginLog(DateTime.Now + " - " + ogr.AdSoyad + " - " + ogr.Fakulte + " " + ogr.Bolum + " " + ogr.Sinif);
     }
     catch (Exception)
     {
         Session["ogrenciNo"] = Session["sifre"] = Session["student"] = null;
         return(Content("error"));
     }
     return(Content("success"));
 }