Exemplo n.º 1
0
 public AddEditJobView(Job thisJob)
 {
     InitializeComponent();
     if (!IsRuntime) return;
     _currentJob = thisJob;
     InitializeStuff();
     BindDataSources();
     UpdateCurrentJobFaultType();
     UpdateCurrentJobItemType();
     UpDateOrSetJobCreator();
 }
Exemplo n.º 2
0
        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();
            }
        }
Exemplo n.º 3
0
 private void ShowJobDetails(Job thisJob)
 {
     ShowWaitForm();
     using (var jobDetailsView = new AddEditJobView(thisJob))
     {
         jobDetailsView.SaveButtonClicked += SaveChanges;
         jobDetailsView.RecordJobPaymentButtonClicked += RecordJobPaymentButtonClicked;
         HideWaitForm();
         jobDetailsView.ShowDialog();
     }
 }
Exemplo n.º 4
0
 private void SaveOrUpdateJob(Job thisJob)
 {
     if (thisJob.JobID < 1)
     {
         _dataManager.AddJob(thisJob);
         JobsBindingSource.Add(thisJob);
     }
     else
     {
         _dataManager.UpdateJob(thisJob);
     }
 }
Exemplo n.º 5
0
 public Job AddJob(Job newJob)
 {
     _dataBaseContext.Jobs.AddObject(newJob);
     SaveChangesToDataBase();
     return newJob;
 }
Exemplo n.º 6
0
 public void UpdateJob(Job newJob)
 {
     _dataBaseContext.Jobs.ApplyCurrentValues(newJob);
     SaveChangesToDataBase();
 }