Esempio n. 1
0
        public frmContacts_Add()
        {
            InitializeComponent();

            #region Initialize DirtyHandler

            DirtyStatus = new DirtyFormHandler(this);

            this.AskToSaveOnDirtyClosing();
            this.ConvertEnterToTab();
            Load += (s, e) =>
            {
                ShowData();
                DirtyStatus.Clear();
            };

            #endregion


            InputControls.LoadToComboBox(cboCountry, InputControls.Address.GetCountryList().OrderBy(_ => _));
            cboCountry.SelectedIndexChanged += CboCountry_SelectedIndexChanged;

            InputControls.Address.LoadProvinceListTo(cboProvince);
            cboProvince.SelectedIndexChanged += cboProvince_SelectedIndexChanged;


            RecordInfoPanel.Groups[0].ItemAlignment = eItemAlignment.Far;
        }
        private void Load_Tax()
        {
            var items = new TaxCollection();

            items.LoadItemsFromDb();

            InputControls.LoadToComboBox(cboTax, items.Items);
        }
        private void Load_Positions()
        {
            var items = new PositionSalaryGradeCollection();

            items.LoadLatestSchedule();

            InputControls.LoadToComboBox(cboPosition, items.Items);
        }
Esempio n. 4
0
        private void ShowData()
        {
            ShowPersonInfo(ItemData.PersonClass);

            //= ItemData.Id;
            _tempPerson         = ItemData.PersonClass;
            txtBiometricId.Text = ItemData.BiometricId.ToString();


            if (ItemData.PersonClass.Id != 0)
            {
                ItemData.PersonClass.MobileNumbers.LoadItemsFromDb();
                InputControls.LoadToComboBox(cboPhoneNumber, ItemData.PersonClass.MobileNumbers.Items);
            }

            cboCategory.Text    = ItemData.Category;
            cboPhoneNumber.Text = ItemData.PhoneNumber;


            dtMonIn.ValueObject  = ItemData.MonIn.Hour == 0 ? (object)null : ItemData.MonIn;
            dtMonOut.ValueObject = ItemData.MonOut.Hour == 0 ? (object)null : ItemData.MonOut;

            dtTueIn.ValueObject  = ItemData.TueIn.Hour == 0 ? (object)null : ItemData.TueIn;
            dtTueOut.ValueObject = ItemData.TueOut.Hour == 0 ? (object)null : ItemData.TueOut;

            dtWedIn.ValueObject  = ItemData.WedIn.Hour == 0 ? (object)null : ItemData.WedIn;
            dtWedOut.ValueObject = ItemData.WedOut.Hour == 0 ? (object)null : ItemData.WedOut;

            dtThuIn.ValueObject  = ItemData.ThuIn.Hour == 0 ? (object)null : ItemData.ThuIn;
            dtThuOut.ValueObject = ItemData.ThuOut.Hour == 0 ? (object)null : ItemData.ThuOut;

            dtFriIn.ValueObject  = ItemData.FriIn.Hour == 0 ? (object)null : ItemData.FriIn;
            dtFriOut.ValueObject = ItemData.FriOut.Hour == 0 ? (object)null : ItemData.FriOut;

            dtSatIn.ValueObject  = ItemData.SatIn.Hour == 0 ? (object)null : ItemData.SatIn;
            dtSatOut.ValueObject = ItemData.SatOut.Hour == 0 ? (object)null : ItemData.SatOut;


            ShowFileInfo(ItemData);
            DirtyStatus.Clear();
        }
Esempio n. 5
0
        private void LoadPhoneNumbers(Person person)
        {
            person.MobileNumbers.LoadItemsFromDb();

            InputControls.LoadToComboBox(cboPhoneNumber, person.MobileNumbers.Items);
        }