-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewWorkOrderByJobNumber.cs
More file actions
41 lines (35 loc) · 1.16 KB
/
Copy pathViewWorkOrderByJobNumber.cs
File metadata and controls
41 lines (35 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AviationMaintenanceManagementSystem.Features;
namespace AviationMaintenanceManagementSystem
{
public partial class ViewWorkOrderByJobNumber : Form
{
private readonly IWorkOrderFeature _workOrderFeature;
public ViewWorkOrderByJobNumber(IWorkOrderFeature workOrderFeature)
{
_workOrderFeature = workOrderFeature;
InitializeComponent();
}
private void btnSearch_Click(object sender, EventArgs e)
{
string jobNumber = txtJobNumber.Text;
var workOrder = _workOrderFeature.GetWorkOrderById(jobNumber);
if (workOrder != null)
{
workOrderDataGridView.DataSource = new[] { workOrder };
}
else
{
MessageBox.Show("Job Not Found", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}