Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (accountsFacade.userIsBindPasswordCard(Fetch.GetUserCookie( ).UserID))
                {
                    Panel1.Visible = false;
                    return;
                }
                else
                {
                    Panel2.Visible = false;
                }
                PasswordCard pc = new PasswordCard( );
                pc.CreateSerialNumber( );
                lbSerialNumber.Text = pc.AddSpace( );
                lbA1.Text           = pc.GetNumberByCoordinate("A1");
                lbA2.Text           = pc.GetNumberByCoordinate("A2");
                lbA3.Text           = pc.GetNumberByCoordinate("A3");
                lbA4.Text           = pc.GetNumberByCoordinate("A4");
                lbB1.Text           = pc.GetNumberByCoordinate("B1");
                lbB2.Text           = pc.GetNumberByCoordinate("B2");
                lbB3.Text           = pc.GetNumberByCoordinate("B3");
                lbB4.Text           = pc.GetNumberByCoordinate("B4");
                lbC1.Text           = pc.GetNumberByCoordinate("C1");
                lbC2.Text           = pc.GetNumberByCoordinate("C2");
                lbC3.Text           = pc.GetNumberByCoordinate("C3");
                lbC4.Text           = pc.GetNumberByCoordinate("C4");
                lbD1.Text           = pc.GetNumberByCoordinate("D1");
                lbD2.Text           = pc.GetNumberByCoordinate("D2");
                lbD3.Text           = pc.GetNumberByCoordinate("D3");
                lbD4.Text           = pc.GetNumberByCoordinate("D4");
                lbE1.Text           = pc.GetNumberByCoordinate("E1");
                lbE2.Text           = pc.GetNumberByCoordinate("E2");
                lbE3.Text           = pc.GetNumberByCoordinate("E3");
                lbE4.Text           = pc.GetNumberByCoordinate("E4");
                lbF1.Text           = pc.GetNumberByCoordinate("F1");
                lbF2.Text           = pc.GetNumberByCoordinate("F2");
                lbF3.Text           = pc.GetNumberByCoordinate("F3");
                lbF4.Text           = pc.GetNumberByCoordinate("F4");

                string[] number = pc.RandomString( );
                lbNumber1.Text = number[0];
                lbNumber2.Text = number[1];
                lbNumber3.Text = number[2];
            }
        }