예제 #1
0
 protected void GridResult_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         if (e.Row.Cells[3].Text == "PartI")
         {
             if (e.Row.Cells[5].Text == "Pass")
             {
                 PI += 1;
             }
             e.Row.BackColor = System.Drawing.Color.AntiqueWhite;
         }
         else if (e.Row.Cells[3].Text == "PartII")
         {
             if (e.Row.Cells[5].Text == "Pass")
             {
                 PII += 1;
             }
             e.Row.BackColor = System.Drawing.Color.Aquamarine;
         }
         else if (e.Row.Cells[3].Text == "SectionA")
         {
             if (e.Row.Cells[5].Text == "Pass")
             {
                 SA += 1;
             }
             e.Row.BackColor = System.Drawing.Color.AliceBlue;
         }
         else if (e.Row.Cells[3].Text == "SectionB")
         {
             if (e.Row.Cells[5].Text == "Pass")
             {
                 SB += 1;
             }
             e.Row.BackColor = System.Drawing.Color.LightCoral;
         }
     }
     lblPartICount.Text    = PI.ToString();
     lblPartIICount.Text   = PII.ToString();
     lblSectionACount.Text = SA.ToString();
     lblSectionBCount.Text = SB.ToString();
 }
예제 #2
0
        public void ToString_should_return_the_redacted_message()
        {
            var valueObject = new PII(testValue);

            valueObject.ToString().Should().Be("[Redacted]");
        }