public FrmNewCollection(FrmHomepage parent)
        {
            InitializeComponent();

            this.parent = parent;
            tableLayoutPanel2.SetColumnSpan(txt_address, 3);
            tableLayoutPanel2.SetColumnSpan(ckBox_newOrg, 2);

            db            = new SignChatDB();
            organisations = db.GetOrganisationList();

            // set organisation cbBox
            cbBox_organisation.TabIndex = 0;
            foreach (organisation o in organisations)
            {
                String item = String.Format("{0,-10}{1}", o.id, o.name);
                cbBox_organisation.Items.Add(item);
            }
            // set organisation txt
            txt_organisation          = new TextBox();
            txt_organisation.Anchor   = (AnchorStyles.Left | AnchorStyles.Right);
            txt_organisation.TabIndex = 0;

            txt_orgEmail.ReadOnly = true;
            txt_orgTel.ReadOnly   = true;
            txt_address.ReadOnly  = true;
        }
Esempio n. 2
0
        public FrmMyAccount(String username)
        {
            InitializeComponent();

            this.adminUsername = username;
            db = new SignChatDB();
            txt_username.Text     = username;
            txt_username.ReadOnly = true;
        }
        public FrmOrganisationList(FrmHomepage parent)
        {
            InitializeComponent();

            this.parent = parent;

            db = new SignChatDB();
            organisationList = db.GetOrganisationList();
            UpdateList(organisationList);
        }
        public FrmCollectionList(FrmHomepage parent)
        {
            InitializeComponent();

            this.parent = parent;

            db = new SignChatDB();
            signcollectionsList = db.GetCollectionList();
            UpdateList(signcollectionsList);
        }
        private FrmOrganisationDetails(FrmHomepage parent)
        {
            InitializeComponent();

            this.parent = parent;
            db          = new SignChatDB();
            editMode    = false;
            txt_organisation.ReadOnly = true;
            txt_orgEmail.ReadOnly     = true;
            txt_address.ReadOnly      = true;
            txt_orgTel.ReadOnly       = true;
            txt_orgId.ReadOnly        = true;
        }
Esempio n. 6
0
        public FrmCollectionDetails(FrmHomepage parent, String collectionId)
        {
            InitializeComponent();

            this.parent = parent;
            tableLayoutPanel2.SetColumnSpan(txt_address, 3);

            db = new SignChatDB();
            mySignCollection = db.GetSignCollection(collectionId);
            mySigns          = db.GetSigns(collectionId);
            myOrganisation   = db.GetOrganisation(mySignCollection.organisationId);

            SetForm();
            editMode = false;
        }
        private void Login()
        {
            SignChatDB db       = new SignChatDB();
            String     username = txt_username.Text;
            String     password = txt_password.Text;
            bool       validate = db.LoginValidation(username, password);

            if (validate)
            {
                FrmHomepage frm = new FrmHomepage(username);
                frm.StartPosition = FormStartPosition.Manual;
                frm.Location      = this.Location;
                this.Visible      = false;
                frm.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Sorry. Invalid Login.", "Login failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }