예제 #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);
                }
            }
        }
예제 #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();
                }
            }
        }
예제 #3
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);
                }
            }
        }
예제 #4
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();   
                }
            }
        }