-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathSelectModel.cs
71 lines (59 loc) · 1.63 KB
/
SelectModel.cs
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace HdbPoet
{
public partial class SelectModel : Form
{
public SelectModel()
{
InitializeComponent();
this.dataGridView1.DataSource = Hdb.HDB_Model();
this.dataGridView1.Columns["Model_ID"].Visible = false;
this.dataGridView1.Columns["Coordinated"].Visible = false;
}
public int ModelID
{
get
{
if (this.dataGridView1.SelectedRows.Count > 0)
{
return
Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Model_ID"]);
}
return -1;
}
}
public string ModelName
{
get
{
if (ModelID < 0)
return "";
var row = dataGridView1.SelectedRows[0];
string rval = ModelID.ToString() + " "
+ row.Cells["Model_Name"].ToString()
+" " + row.Cells["Cmmnt"].ToString();
return rval;
}
}
public string ModelTable
{
get{
if( radioButtonday.Checked)
return "m_day";
else if( radioButtonMonth.Checked)
return "m_month";
return "m_hour";
}
}
public int PreviousDaysRunDate
{
get { return (int)this.numericUpDown1.Value; }
}
}
}