예제 #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     lblResultU.Text = "";
     lblResultC.Text = "";
     SCParams scParams = new SCParams() { CarNumber = txtCarNumber.Text.Trim(), CarFrame = txtCarFrame.Text.Trim() };
     SCDA da = new SCDA();
     List<ViolationModel> listU = da.GetUnProcessedWebShow(scParams);
     List<ViolationModel> listC = da.GetCompletedWebShow(scParams);
     string stringU = "<font color=\"red\">未处理:</font><br />";
     string stringC = "<br /><font color=\"red\">已处理:</font><br />";
     int i = 1;
     int j = 1;
     foreach (ViolationModel u in listU)
     {
         stringU += i.ToString() + "<br />" + string.Format(strFormat, u.ViolationAddress, u.ViolationDateTime, u.ViolationContent, u.ViolationAmount, u.ViolationScore) + "<br /><br />";
         i++;
     }
     foreach (ViolationModel c in listC)
     {
         stringC += j.ToString() + "<br />" + string.Format(strFormat, c.ViolationAddress, c.ViolationDateTime, c.ViolationContent, c.ViolationAmount, c.ViolationScore) + "<br /><br />";
         j++;
     }
     if (stringU == "<font color=\"red\">未处理:</font><br />")
         lblResultU.Text = stringU + "恭喜,木有违章<br />";
     else
         lblResultU.Text = stringU;
     if (stringC == "<br /><font color=\"red\">已处理:</font><br />")
         lblResultC.Text = stringC + "恭喜,木有违章";
     else
         lblResultC.Text = stringC;
 }
예제 #2
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     if (txtPass.Text.Trim().Equals("123123"))
     {
         SCDA da = new SCDA();
         GridView1.DataSource = da.GetAllCarInfo();
         GridView1.DataBind();
     }
 }
예제 #3
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     try
     {
         Label1.Text = "";
         SCDA da = new SCDA();
         int i = da.UpdateRefreshDateToDefault();
         if (i > 0)
         {
             Label1.Text = "Success";
         }
         else
         {
             Label1.Text = "Failed";
         }
     }
     catch (Exception ex)
     {
         Label1.Text = ex.Message;
     }
 }