Exemple #1
0
        public void EditEntity(AvgWorkingDaysInWeek amount)
        {
            AvgWorkingDaysInWeek am = amount;

            if (amount == null && FocusedEntity == null)
            {
                return;
            }

            if (am == null)
            {
                am = FocusedEntity;
            }
            if (am == null)
            {
                return;            // paranoik check
            }
            using (AvgWorkingDaysInWeekForm form = new AvgWorkingDaysInWeekForm())
            {
                form.Amount = am;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListOfAvgWDInWeek.ResetItemById(am.ID);
                }
            }
        }
Exemple #2
0
        void NewEntity()
        {
            AvgWorkingDaysInWeek amount = ClientEnvironment.AvgWorkingDaysInWeekService.CreateEntity();

            amount.CountryID = EntityCountry.ID;
            using (AvgWorkingDaysInWeekForm form = new AvgWorkingDaysInWeekForm())
            {
                form.Amount = amount;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListOfAvgWDInWeek.Add(form.Amount);
                    UpdateBarButtons();
                }
            }
        }
        public void EditEntity(AvgWorkingDaysInWeek amount)
        {
            AvgWorkingDaysInWeek am = amount;
            if (amount == null && FocusedEntity == null) return;

            if (am == null) am = FocusedEntity;
            if (am == null) return;// paranoik check

            using (AvgWorkingDaysInWeekForm form = new AvgWorkingDaysInWeekForm())
            {
                form.Amount = am;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListOfAvgWDInWeek.ResetItemById(am.ID);
                }
            }
        }
         void NewEntity()
        {
            AvgWorkingDaysInWeek amount = ClientEnvironment.AvgWorkingDaysInWeekService.CreateEntity();

            amount.CountryID = EntityCountry.ID;
            using (AvgWorkingDaysInWeekForm form = new AvgWorkingDaysInWeekForm())
            {
                form.Amount = amount;

                if (form.ShowDialog() == DialogResult.OK)
                {
                        ListOfAvgWDInWeek.Add(form.Amount);
                        UpdateBarButtons();   
                }
            }
        }