Beispiel #1
0
        public void credential()
        {
            if (Flag == true)
            {
                if (UserType.Equals("Admin"))
                {
                    frmMain main = new frmMain();

                    main.Access_Control = UserType.ToString();
                    main.First_Name     = First_Name.ToString();
                    main.Last_Name      = Last_Name.ToString();

                    main.AccessGrant();
                    main.Show();
                    this.Hide();
                }

                else if (UserType.Equals("Teacher"))
                {
                    frmMain main = new frmMain();

                    main.Access_Control = "Teacher";

                    main.Access_Control = UserType.ToString();
                    main.First_Name     = First_Name.ToString();
                    main.Last_Name      = Last_Name.ToString();
                    main.Teacher_Id     = Teacher_Id.ToString();

                    main.AccessGrant();

                    main.btnTeacher.Visible = false;
                    main.button10.Visible   = false;
                    main.button3.Visible    = false;
                    main.button1.Visible    = false;

                    main.Show();
                    this.Hide();
                }
                else
                {
                    string message = "Erorr";
                    string title   = "GOC_INFO_SYS";

                    MessageBoxButtons buttons = MessageBoxButtons.OK;
                    DialogResult      result  = MessageBox.Show(message, title, buttons, MessageBoxIcon.Error);

                    if (result == DialogResult.OK)
                    {
                        Flag = false;
                        return;
                    }
                }
            }
            else
            {
                string message = "User not existing";
                string title   = "GOC_INFO_SYS";

                MessageBoxButtons buttons = MessageBoxButtons.OK;
                DialogResult      result  = MessageBox.Show(message, title, buttons, MessageBoxIcon.Error);

                if (result == DialogResult.OK)
                {
                    return;
                }
            }
        }
Beispiel #2
0
 public override string ToString()
 {
     return(base.ToString() + ": " + ID.ToString() + " " + Prefix.ToString() + " " + Last_Name.ToString() + " " + First_Name.ToString() + " " + Middle_initial.ToString() + " " + Permit_Num.ToString() +
            " " + Assistant_First_Name.ToString() + " " + Assistant_Last_Name.ToString() + " " + Active.ToString() + " " + Notes.ToString() + " " + Address.Line1.ToString() + " " +
            Address.Line2.ToString() + " " + Address.City.ToString() + " " + Address.State.ToString() + " " + Address.Zip.ToString() + " " + Org.Org_Name + " " + Org.Org_Type + " " +
            Org.Title + " P:" + Email.Personal_Email + " B:" + Email.Business_Email + " A:" + Email.Assistant_Email + " P:" + Phone.Personal_Phone + " B:" + Phone.Business_Phone + " A:" + Phone.Assistant_Phone);
 }