public AddEditJobView(Job thisJob) { InitializeComponent(); if (!IsRuntime) return; _currentJob = thisJob; InitializeStuff(); BindDataSources(); UpdateCurrentJobFaultType(); UpdateCurrentJobItemType(); UpDateOrSetJobCreator(); }
public void PrintJobReceipt(Job jobToBePrinted) { JobToBePrinted = jobToBePrinted; PrintDialog printDialog = new PrintDialog(); PrintDocument printDocument = new PrintDocument(); printDialog.Document = printDocument; printDocument.PrintPage += printJob_PrintPage; DialogResult result = printDialog.ShowDialog(); if (result == DialogResult.OK) { printDocument.Print(); } }
private void ShowJobDetails(Job thisJob) { ShowWaitForm(); using (var jobDetailsView = new AddEditJobView(thisJob)) { jobDetailsView.SaveButtonClicked += SaveChanges; jobDetailsView.RecordJobPaymentButtonClicked += RecordJobPaymentButtonClicked; HideWaitForm(); jobDetailsView.ShowDialog(); } }
private void SaveOrUpdateJob(Job thisJob) { if (thisJob.JobID < 1) { _dataManager.AddJob(thisJob); JobsBindingSource.Add(thisJob); } else { _dataManager.UpdateJob(thisJob); } }
public Job AddJob(Job newJob) { _dataBaseContext.Jobs.AddObject(newJob); SaveChangesToDataBase(); return newJob; }
public void UpdateJob(Job newJob) { _dataBaseContext.Jobs.ApplyCurrentValues(newJob); SaveChangesToDataBase(); }