Esempio n. 1
0
 public ActionResult MyResult(DASSResultModel model)
 {
     if (test1.Models.UserTest.IsValidUser == false)
     {
         return(RedirectToAction("Index", "Home"));
     }
     if (model.Name == null)
     {
         Connection.Connection con = new Connection.Connection();
         DataSet ds = new DataSet();
         ds = con.MyResultData(test1.Models.UserTest.ValidUser, "1");
         if (ds.Tables[0].Rows.Count > 0)
         {
             DataRow dr = ds.Tables[0].Rows[0];
             model.ID           = Convert.ToInt64(dr["id"]);
             model.AnxResult    = Convert.ToInt32(dr["AnxResult"]);
             model.AnxStatus    = Convert.ToInt32(dr["AnxStatus"]);
             model.DepResult    = Convert.ToInt32(dr["DepResult"]);
             model.DepStatus    = Convert.ToInt32(dr["DepStatus"]);
             model.EndTime      = dr["EndTime"].ToString();
             model.LastName     = dr["LastName"].ToString();
             model.Name         = dr["Name"].ToString();
             model.StartTime    = dr["StartTime"].ToString();
             model.TestDate     = dr["TestDate"].ToString();
             model.StressResult = Convert.ToInt32(dr["StressResult"]);
             model.StressStatus = Convert.ToInt32(dr["StressStatus"]);
         }
     }
     return(View(model));
 }