public FeatureProvider(
     SectionsModel sectionsModel,
     Randomizer randomizer,
     ISectionsProvider sectionsProvider)
 {
     this.sectionModel     = sectionsModel;
     this.randomizer       = randomizer;
     this.sectionsProvider = sectionsProvider;
 }
        public ActionResult SectionEdit(int id)
        {
            @ViewBag.Main = "Updation";
            @ViewBag.Sub  = "Sections";

            SectionsModel model = new SectionsModel();

            model = _sectionRep.Get(id);
            return(View(model));
        }
Beispiel #3
0
 public void GetData()
 {
     YearList = new ObservableCollection <int>();
     YearList.Add(2019); YearList.Add(2020); YearList.Add(2021); YearList.Add(2022); YearList.Add(2023); YearList.Add(2024); YearList.Add(2025); YearList.Add(2026); YearList.Add(2027); YearList.Add(2028);
     YearList.Add(2029); YearList.Add(2030); YearList.Add(2031); YearList.Add(2032); YearList.Add(2033); YearList.Add(2034); YearList.Add(2035); YearList.Add(2036); YearList.Add(2037); YearList.Add(2038);
     SelectedYear = DateTime.Now.Year;
     MonthList    = new ObservableCollection <Month>();
     MonthList.Add(new Month(1, "Январь")); MonthList.Add(new Month(2, "Февраль")); MonthList.Add(new Month(3, "Март")); MonthList.Add(new Month(4, "Апрель")); MonthList.Add(new Month(5, "Май")); MonthList.Add(new Month(6, "Июнь"));
     MonthList.Add(new Month(7, "Июль")); MonthList.Add(new Month(8, "Август")); MonthList.Add(new Month(9, "Сентябрь")); MonthList.Add(new Month(10, "Октябрь")); MonthList.Add(new Month(11, "Ноябрь")); MonthList.Add(new Month(12, "Декабрь"));
     SelectedMonthIndex = DateTime.Now.Month - 1;
     Children           = ChildrenModel.SelectChildren();
     Sections           = SectionsModel.SelectSections();
     GardenEvents       = GardenEventsModel.SelectGardenEvents(SelectedSection, SelectedMonth.Number, SelectedYear);
 }
Beispiel #4
0
 public WetnessApplier(
     PulseGenerator pulseGenerator,
     ISectionsProvider sectionsProvider,
     IFeatureChooser featureChooser,
     Randomizer randomizer,
     FeatureProvider featureProvider,
     WetnessModel wetness,
     SectionsModel sections
     )
 {
     this.pulseGenerator   = pulseGenerator;
     this.sectionsProvider = sectionsProvider;
     this.wetness          = wetness;
     this.sections         = sections;
     this.featureChooser   = featureChooser;
     this.randomizer       = randomizer;
     this.featureProvider  = featureProvider;
 }
        public ActionResult SectionEdit(SectionsModel model)
        {
            @ViewBag.Main = "Updation";
            @ViewBag.Sub  = "Sections";

            if (ModelState.IsValid)
            {
                try
                {
                    _sectionRep.Edit(model);
                    model = new SectionsModel();
                    ModelState.Clear();
                    TempData["Message"]        = "success";
                    TempData["SuccessMessage"] = MessageNaming.SuccessDataUpdate;
                }
                catch (Exception ex)
                {
                    TempData["Message"]      = "error";
                    TempData["ErrorMessage"] = ex.Message;
                }
            }
            return(View(model));
        }
 public SectionsProvider(IWaveFileMetadata settings, SectionsModel sections, ISamplingFrequencyProvider samplingFrequencyProvider)
 {
     this.settings = settings;
     this.sections = sections;
     this.samplingFrequencyProvider = samplingFrequencyProvider;
 }