Ejemplo n.º 1
0
        private bool Check_Admin(Manager.Administrator admin)
        {
            bool ret = true;
            InitializeLabelColors();

            if (!admin.HasValidFirstName())
            {
                lbl_FirstName.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidLastName())
            {
                lbl_LastName.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidEmail())
            {
                lbl_Email.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidPhoneNumber())
            {
                lbl_Phone.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidAddress())
            {
                lbl_Address.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidSpecialty())
            {
                lbl_Specialty.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidLogin())
            {
                lbl_Login.ForeColor = invalidFieldColor;
                ret = false;
            }
            if (!admin.HasValidPassword())
            {
                lbl_Password.ForeColor = invalidFieldColor;
                ret = false;
            }
            return ret;
        }