示例#1
0
        protected override void OnInitializeData()
        {
            dbManager = new dbUserManagement(this)
                        .MasterTable <EF_Users>()
                        .Radar <RadarUsers>();

            PrivilegeTypes = new EnumsManager <UserType>(Properties.Resources.ResourceManager);
            PrivilegeTypes.AttachTo(cbbPrivilege);
        }
示例#2
0
        private void LoadPreferences()
        {
            myPrinter = new PrinterPreferencesManager(application);

            pageRangeManager.AttachTo(cbbPages.Control);
            cbbPages.SelectedText = Properties.Resources.E_Page_All;

            pPref = myPrinter.ReadPreference();

            foreach (String printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
            {
                cbbPrinter.Items.Add(printer.ToString());
            }

            switch (printType)
            {
            case PrintType.Letter:
                cbbPrinter.Text    = pPref.L_PrinterName;
                nudCopies.Value    = pPref.L_Copies;
                btnCollate.Checked = pPref.L_Collate;
                paperSource        = (PaperSource)pPref.L_Source;
                break;

            case PrintType.Envelope:
                cbbPrinter.Text    = pPref.E_PrinterName;
                nudCopies.Value    = pPref.E_Copies;
                btnCollate.Checked = pPref.E_Collate;
                paperSource        = (PaperSource)pPref.E_Source;
                break;

            case PrintType.Label:
                cbbPrinter.Text    = pPref.B_PrinterName;
                nudCopies.Value    = pPref.B_Copies;
                btnCollate.Checked = pPref.B_Collate;
                paperSource        = (PaperSource)pPref.B_Source;
                break;
            }
        }