public void ResetInformationList()
 {
     try
     {
         InformationList.Clear();
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 2
0
 public void ResetInformationList()
 {
     try
     {
         InformationList.Clear();
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
Ejemplo n.º 3
0
        //what happends when we press the submit button?
        //I want:
        // To Make sure that all inputs are present and valid.
        //  if valid:
        //      Store values and display them in a temporary Database list grid:



        //  if not valid:
        //Display the error messages on the side
        protected void SubmitBtn_Click(object sender, EventArgs e)
        {
            //Task 1: check if inputs Valid and present.
            //this is possible from the validators that was implemented on the html web form.
            if (Page.IsValid)
            {
                //Task 2: terms check box must be checked
                if (TandC.Checked)
                {
                    //add information that is currently inputted in the form into the grid view.
                    Information.Add(new UserRegistry(
                                        FirstName.Text,
                                        LastName.Text,
                                        UserName.Text,
                                        Email.Text,
                                        "private information"));
                    //compair email

                    if (!string.IsNullOrEmpty(ConfirmEmail.Text) || !string.IsNullOrEmpty(ConfPassword.Text))
                    {
                        if (ConfirmEmail.Text != Email.Text)
                        {
                            EmailCheck.Text = "Email does not match.";
                        }

                        if (ConfPassword.Text != Password.Text)
                        {
                            PasswordMatch.Text = "Password does not match";
                        }
                    }

                    else if (ConfPassword.Text == Password.Text && ConfirmEmail.Text == Email.Text)
                    {
                        PasswordMatch.Text = "";
                        EmailCheck.Text    = "";
                        //if theres is anything in the information list, and a username entered matched one of them,
                        //then don't allow the user to enter.
                        if (Information.Count() != 0)
                        {
                            foreach (UserRegistry item in Information)
                            {
                                if (UserName.Text == item.UserName)
                                {
                                    RequiredUserName.Text = "Username is already taken. please try another";
                                }
                            }
                        }
                        InformationList.DataSource = Information;
                        InformationList.DataBind();
                    }
                }
            }
        }
Ejemplo n.º 4
0
 public override void Close()
 {
     InformationList.Clear();
     CameraController.Close();
     Scene.Close();
     MessageBox.Close();
     HandCardArea.Close();
     EquipCardArea.Close();
     AmbushCardArea.Close();
     PlayerInformationGroup.Close();
     ToolTip.Close();
     base.Close();
 }
 public void AddReturnedValue(ReturnedSaveFuncInfo returnedSaveFuncInfo)
 {
     try
     {
         if (returnedSaveFuncInfo?.ErrorList?.Count > 0)
         {
             ErrorList.AddRange(returnedSaveFuncInfo.ErrorList);
         }
         if (returnedSaveFuncInfo?.InformationList?.Count > 0)
         {
             InformationList.AddRange(returnedSaveFuncInfo.InformationList);
         }
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 6
0
 public ReturnedSaveFuncInfo AddReturnedValue(ReturnedSaveFuncInfo returnedSaveFuncInfo)
 {
     try
     {
         if (returnedSaveFuncInfo?.ErrorList?.Count > 0)
         {
             ErrorList.AddRange(returnedSaveFuncInfo.ErrorList);
         }
         if (returnedSaveFuncInfo?.InformationList?.Count > 0)
         {
             InformationList.AddRange(returnedSaveFuncInfo.InformationList);
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
     return(returnedSaveFuncInfo);
 }
        public void AddReturnedValue(ReturnedState returnedState, string value)
        {
            try
            {
                switch (returnedState)
                {
                case ReturnedState.Information:
                    InformationList.Add(value);
                    break;

                case ReturnedState.Error:
                    ErrorList.Add(value);
                    break;

                case ReturnedState.Warning:
                    WarningList.Add(value);
                    break;
                }
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 8
0
        public void AddReturnedValue(ReturnedState returnedState, string description)
        {
            try
            {
                switch (returnedState)
                {
                case ReturnedState.Information:
                    InformationList.Add(description);
                    break;

                case ReturnedState.Error:
                    ErrorList.Add(description);
                    break;

                case ReturnedState.Warning:
                    WarningList.Add(description);
                    break;
                }
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }