-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuTypeAdd.Designer.cs
More file actions
134 lines (98 loc) · 2.99 KB
/
Copy pathMenuTypeAdd.Designer.cs
File metadata and controls
134 lines (98 loc) · 2.99 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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
using SmartAdmin.Controls;
using SmartAdmin.Data;
using SmartAdmin.Utils;
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace SmartAdmin
{
public class MenuTypeAdd : System.Web.UI.Page
{
protected Button BtnSave;
protected Button BtnCancel;
protected SmartAdmin.Controls.HeaderBox HeaderBox;
protected SmartAdmin.Controls.SubmenuBox SubmenuBox;
protected SmartAdmin.Controls.CopyrightBox CopyrightBox;
protected ValidationSummary ValidationSummary1;
protected RequiredFieldValidator RequiredFieldValidator1;
protected Label LblMenuTypeID;
protected Label TxtMenuTypeID;
protected Label LblMenuTypeName;
protected TextBox TxtMenuTypeName;
protected Label LblMenuTypeDescription;
protected TextBox TxtMenuTypeDescription;
protected RequiredFieldValidator Requiredfieldvalidator2;
protected Label LblTax1;
protected TextBox TxtTax1;
protected RequiredFieldValidator Requiredfieldvalidator3;
protected Label LblTax2;
protected TextBox TxtTax2;
protected RequiredFieldValidator Requiredfieldvalidator4;
protected RangeValidator RangeValidator1;
protected RangeValidator RangeValidator2;
protected Label LblPrint;
protected CheckBox CheckPrintLine;
protected Label LblPaymentGroup;
protected DropDownList LstMenuGroup;
protected Image ImgError;
public MenuTypeAdd()
{
}
private void BackPage()
{
base.Response.Redirect(Pages.Url(this, Pages.MAS_MENUTYPE_LIST_PAGE));
}
private void BtnCancel_Click(object sender, EventArgs e)
{
this.BackPage();
}
private void BtnSave_Click(object sender, EventArgs e)
{
if (this.Page.IsValid)
{
string str = "0";
if (this.CheckPrintLine.Checked)
{
str = "1";
}
SmartAdmin.Data.Master.MenuTypeInsert(this.TxtMenuTypeName.Text, this.TxtMenuTypeDescription.Text, this.TxtTax1.Text, this.TxtTax2.Text, str, this.LstMenuGroup.SelectedItem.Value);
this.BackPage();
}
}
private void InitializeComponent()
{
this.BtnSave.Click += new EventHandler(this.BtnSave_Click);
this.BtnCancel.Click += new EventHandler(this.BtnCancel_Click);
base.Load += new EventHandler(this.Page_Load);
}
private void LoadMenu()
{
AdminMenu.SetMenu(this, this.HeaderBox, this.SubmenuBox, this.CopyrightBox);
}
private void LoadMenuGroup()
{
this.LstMenuGroup.DataSource = SmartAdmin.Data.Master.MenuGroupList();
this.LstMenuGroup.DataTextField = "menugroupname";
this.LstMenuGroup.DataValueField = "menugroupid";
this.LstMenuGroup.DataBind();
}
protected override void OnInit(EventArgs e)
{
this.InitializeComponent();
base.OnInit(e);
}
private void Page_Load(object sender, EventArgs e)
{
this.LoadMenu();
this.LblTax1.Text = SmartAdmin.Data.Master.GetDescription("TAX1");
this.LblTax2.Text = SmartAdmin.Data.Master.GetDescription("TAX2");
if (this.LblTax2.Text == "")
{
this.LblTax2.Visible = false;
this.TxtTax2.Visible = false;
}
this.LoadMenuGroup();
}
}
}