Example #1
0
        /// <summary>
        /// Registers a valid user
        /// </summary>
        /// <returns>True or False</returns>
        public bool CreateUser()
        {
            List <string> info = new List <string>(MyTextBoxes.Select(x => x.Text).ToList());
            string        date = Services.ReformatDate(info[2]);

            if (Services.CheckNull(info, MyLabels) && Services.CheckDate(date, MyLabels))
            {
                Services.CreateUser(info);
                return(true);
            }

            return(false);
        }
Example #2
0
 /// <summary>
 /// Add all controls to separate collecton for use in other methods and easier addition to the Form's Controls list
 /// </summary>
 private void IntitializeArrays()
 {
     MyButtons.AddRange(new Button[] { buttonAdd, buttonDeleteAll });
     MyTextBoxes.AddRange(new TextBox[] { textBoxInput });
 }
Example #3
0
 /// <summary>
 /// Adds all controls to their corresponding collection
 /// </summary>
 private void IntitializeArrays()
 {
     MyButtons.Add(buttonLogin);
     MyLabels.AddRange(new Label[] { labelName, labelSurname, labelBirthdate, labelGender, labelCity, labelFormat, labelError });
     MyTextBoxes.AddRange(new TextBox[] { textBoxName, textBoxSurname, textBoxBirthdate, textBoxGender, textBoxCity });
 }