private void Page_Loaded(object sender, RoutedEventArgs e) { if (DeviceInformation.GetDevicePlatform() == Crystal3.Core.Platform.Xbox) { //force focus on Xbox. ScheduleListView.Focus(FocusState.Keyboard); } }
// START SCHEDULE LIST // public List<Models.DTO.ScheduleListView> GetScheduleList(string jobid) public Models.DTO.ScheduleListView GetScheduleList(string jobid) { if (jobid != string.Empty) { using (var context = new CBDBEntities()) { var schedules = context.Schedules.AsNoTracking() .Where(x => x.JobId == jobid) .OrderBy(x => x.Id); if (schedules != null) { var scheduleListView = new ScheduleListView(); foreach (var schedule in schedules) { var scheduleVm = new Models.DTO.Schedule() { JobId = schedule.JobId.ToString(), Id = schedule.Id, text = schedule.text, //SchTypeId = schedule.SchTypeId, //SchTypName = schedule.SchType.name, start_date = schedule.start_date, end_date = schedule.end_date, //StatusName = schedule.ScheduleStatu.title }; //var schTypesRepo = new SchTypeRepository(); //scheduleVm.SchTypName = schTypesRepo.GetSchTypeName(schedule.SchTypeId); //var jobStatuRepo = new JobStatuRepository(); //scheduleVm.StatusName = jobStatuRepo.GetJobStatuName(schedule.statusId); //scheduleListView.Schedules.Add(scheduleVm); var schTypesRepo = new SchTypeRepository(); scheduleVm.SchTypName = schTypesRepo.GetSchTypes().ToString(); var schStatuRepo = new ScheduleStatuRepository(); //scheduleVm.StatusName = schStatuRepo.GetScheduleStatus().ToString(); scheduleListView.Schedules.Add(scheduleVm); } return(scheduleListView); } } } return(null); }
protected void PauseButton_Click(object sender, EventArgs e) { Button b = sender as Button; int BillPayID = Convert.ToInt32(b.CommandArgument); if (b.Text == "Pause") { b.Text = "Start"; DBBizOb.DbConnect.UpdateBillPayPauseFlag(BillPayID, 'P'); DBBizOb.DbConnect.ResetScheduling(); } else if (b.Text == "Start") { b.Text = "Pause"; DBBizOb.DbConnect.UpdateBillPayPauseFlag(BillPayID, ' '); DBBizOb.DbConnect.ResetScheduling(); } ScheduleListView.DataBind(); }
public App() { NotifyIcon = new AppNotifyIcon(new System.ComponentModel.Container()); var notifier = new GuiNotifier(SynchronizationContext.Current); notifier.ErrorNotified += (sender, error) => { NotifyIcon.NotifyError(error); }; var logger = new MemoryLogger(); AppMain = AppMain.Load(notifier, logger); ScheduleListWindowContainer = new ScheduleListWindowContainer(() => ScheduleListView.Load(AppMain.SchedulerTask.Result, notifier, logger) ); }
protected void BindSchedule() { string userName = Profile.UserName; using (SwapEntities ent = new SwapEntities()) { var checkSwaps = from tbl in ent.ScheduledSwaps where tbl.UserMain == userName & tbl.MainRated == false || tbl.UserOther == userName & tbl.OtherRated == false select tbl; if (checkSwaps.Count() >= 1) { ScheduleListView.DataSource = checkSwaps; ScheduleListView.DataBind(); } else { SchedSwapContainer.Visible = false; } } }
protected void Page_PreRender(object sender, EventArgs e) { ScheduleListView.DataSource = DataSource; ScheduleListView.DataBind(); }