示例#1
0
 public ActionResult TestListReport()
 {
     if (test1.Models.UserTest.IsValidUser == true && test1.Models.UserTest.UserType == true)
     {
         List <DASSResultModel> lmd = new List <DASSResultModel>();
         Connection.Connection  con = new Connection.Connection();
         DataSet ds = new DataSet();
         ds = con.TheResultListData("1");
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             lmd.Add(new DASSResultModel
             {
                 ID           = Convert.ToInt64(dr["id"]),
                 AnxResult    = Convert.ToInt32(dr["AnxResult"]),
                 AnxStatus    = Convert.ToInt32(dr["AnxStatus"]),
                 DepResult    = Convert.ToInt32(dr["DepResult"]),
                 DepStatus    = Convert.ToInt32(dr["DepStatus"]),
                 EndTime      = dr["EndTime"].ToString(),
                 LastName     = dr["LastName"].ToString(),
                 Name         = dr["Name"].ToString(),
                 StartTime    = dr["StartTime"].ToString(),
                 TestDate     = dr["TestDate"].ToString(),
                 StressResult = Convert.ToInt32(dr["StressResult"]),
                 ClassNo      = Convert.ToInt32(dr["ClassNo"]),
                 StressStatus = Convert.ToInt32(dr["StressStatus"])
             });
         }
         return(View(lmd));
     }
     else
     {
         return(RedirectToAction("Index", "Home"));
     }
 }