Beispiel #1
0
 internal Member()
 {
     InitializeComponent();
     fh = new DBForms.DBForm(this, TopPanel, btnClose);
     fh.Init <tables.Member, tables.Member>(this.panForm, obj);
     fh.SetFormButtons(obj, panForm, btnSave, btnReset);
     DBForms.DBForm.PopulateCombobox <tables.MemberType>(cmbMemberType, "ID", "TypeName");
 }
Beispiel #2
0
 internal Book()
 {
     InitializeComponent();
     fh = new DBForms.DBForm(this, TopPanel, btnClose);
     fh.Init <tables.Book, tables.Book>(this.panForm, obj);
     fh.SetFormButtons(obj, panForm, btnSave, btnReset);
     DBForms.DBForm.PopulateCombobox <tables.BookCategory>(cmbCategoryID, "ID", "CategoryName");
 }
        internal Password(long ID)
        {
            InitializeComponent();
            fh = new DBForms.DBForm(this, TopPanel, btnClose);
            fh.Init <tables.User, tables.User>(this.panForm, obj);

            fh.SetFormButtons(obj, panForm, btnSave);

            obj.Set(ID);
        }
        internal User()
        {
            InitializeComponent();
            fh = new DBForms.DBForm(this, TopPanel, btnClose);

            fh.Init <tables.User, tables.User>(this.panForm, obj);

            fh.SetFormButtons(obj, panForm, btnSave, btnReset);

            cmbActive.Enabled   = Core._user.info.UserType == UserTypes.Admin;
            cmbUserType.Enabled = Core._user.info.UserType == UserTypes.Admin;
        }
Beispiel #5
0
 internal Settings()
 {
     InitializeComponent();
     fh = new DBForms.DBForm(this, TopPanel, btnClose);
     fh.Init <tables.Settings, tables.Settings>(this.panForm, obj);
     fh.SetFormButtons(obj, panForm, btnSave);
     if (controllers.Settings.Count() > 0)
     {
         obj.First();
         DBForms.DBForm.SetForm(obj, panForm);
     }
     DBForms.DBForm.SetPictureBox(pcbInstituteLogo, btnSelectLogo);
     DBForms.DBForm.SetPictureBox(pcbInstituteBackground, btnSelectBackground);
 }
Beispiel #6
0
        internal Member(long ID)
        {
            InitializeComponent();
            fh = new DBForms.DBForm(this, TopPanel, btnClose);
            fh.Init <tables.Member, tables.Member>(this.panForm, obj);
            fh.SetFormButtons(obj, panForm, btnSave, btnReset);
            DBForms.DBForm.PopulateCombobox <tables.MemberType>(cmbMemberType, "ID", "TypeName");
            btnReset.Visible = false;

            if (ID > 0)
            {
                obj.Set(ID);
                DBForms.DBForm.SetForm(obj, panForm);
                btnSave.Text = "UPDATE";
            }
        }
Beispiel #7
0
        internal Book(long ID)
        {
            InitializeComponent();
            DBForms.DBForm.PopulateCombobox <tables.BookCategory>(cmbCategoryID, "ID", "CategoryName");
            fh = new DBForms.DBForm(this, TopPanel, btnClose);
            fh.Init <tables.Book, tables.Book>(this.panForm, obj);
            fh.SetFormButtons(obj, panForm, btnSave, btnReset);
            btnReset.Visible = false;

            if (ID > 0)
            {
                obj.Set(ID);
                DBForms.DBForm.SetForm <tables.Book>(obj, panForm);
                btnSave.Text = "UPDATE";
            }
        }
        internal User(long ID)
        {
            InitializeComponent();
            fh = new DBForms.DBForm(this, TopPanel, btnClose);
            fh.Init <tables.User, tables.User>(this.panForm, obj);
            fh.SetFormButtons(obj, panForm, btnSave, btnReset);

            cmbUserType.Enabled = (Core._user.info.UserType == UserTypes.Admin && ID != Core._user.info.ID);
            cmbActive.Enabled   = Core._user.info.UserType == UserTypes.Admin;

            btnReset.Visible    = false;
            txtPassword.Enabled = Core._user.info.UserType == UserTypes.Admin;;

            if (ID > 0)
            {
                obj.Set(ID);
                DBForms.DBForm.SetForm <tables.User>(obj, panForm);
                txtUsername.Enabled = false;
                btnSave.Text        = "UPDATE";
            }
        }