예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //State manaegment with Session object
            if (Session["staff2LoggedIn"] == null)
            {
                Response.Redirect("Default.aspx", false);
            }
            else
            {
                //asp table to show customer/user data for level 2 staff
                Account account = new Account();
                EncryptionService.Service1Client proxy = new EncryptionService.Service1Client();
                string[] emails = account.getallEmails();

                int rowCt = emails.Length;
                int row;
                int colCt = 6;
                int col;
                for (row = 1; row <= rowCt; row++)
                {
                    TableRow tableRow = new TableRow();
                    Table1.Rows.Add(tableRow);
                    for (col = 1; col <= colCt; col++)
                    {
                        TableCell cell = new TableCell();
                        if (col <= 4)
                        {
                            cell.Text = proxy.decrypt(account.getStaff2Data(emails[row - 1])[col - 1]);
                        }
                        else
                        {
                            cell.Text = account.getStaff2Data(emails[row - 1])[col - 1];
                        }
                        tableRow.Cells.Add(cell);
                    }
                }
            }
        }
예제 #2
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     EncryptionService.Service1Client proxy = new EncryptionService.Service1Client();
     TextBox4.Text = proxy.decrypt(TextBox3.Text);
 }