-
Notifications
You must be signed in to change notification settings - Fork 0
/
XMGL_JXBW.aspx.cs
356 lines (307 loc) · 13.3 KB
/
XMGL_JXBW.aspx.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Principal;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FineUI;
using ExcelHelp;
using System.Data.SqlClient;
using System.Data;
using AppBox;
using System.Web.Security;
using System.Text;
using System.Xml;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
using Maticsoft.DBUtility;
using Aspose.Cells;
using XMGL.BLL;
using ExcelHelp;
namespace XMGL.Web.admin
{
public partial class XMGL_JXBW : System.Web.UI.Page
{
PageBase1 pb = new PageBase1();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
databind();
string userid = pb.GetIdentityId();
string sqlstr = "select xxdm,xxmc from Users where user_uid='" + userid + "'";
SqlDataReader sdr = DbHelperSQL.ExecuteReader(sqlstr);
string xxdm = "", xxmc = "";
if (sdr.Read())
{
xxdm = sdr["xxdm"].ToString().Trim();
ViewState["xxdm"] = xxdm;
}
sdr.Dispose();
}
}
protected void databind()
{
string sqlstr = "";
DataTable dt = null;
sqlstr = " select * from JXBW where user_uid='" + pb.GetIdentityId() + "' and SFSC=0";
dt = DbHelperSQL.Query(sqlstr).Tables[0];
string[] arr = null;
string[] arr_temp = null;
string tempstr = "";
string title = "";
for (int i = 0; i < dt.Rows.Count; i++)
{
arr = dt.Rows[i]["WORD1"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a>";
//dt.Rows[i]["WORD1"]=dt.Rows[i]["WORD1"]
}
dt.Rows[i]["WORD1"] = tempstr;
arr = dt.Rows[i]["WORD2"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a>";
//dt.Rows[i]["WORD1"]=dt.Rows[i]["WORD1"]
}
dt.Rows[i]["WORD2"] = tempstr;
arr = dt.Rows[i]["WORD3"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a>";
//dt.Rows[i]["WORD1"]=dt.Rows[i]["WORD1"]
}
dt.Rows[i]["WORD3"] = tempstr;
arr = dt.Rows[i]["WORD4"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"upload/教学比武/" + arr[j] + "\" target=\"_blank\" title=\"" + title + "\">" + title + "</a>";
//dt.Rows[i]["WORD1"]=dt.Rows[i]["WORD1"]
}
dt.Rows[i]["WORD4"] = tempstr;
arr = dt.Rows[i]["SP1"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a>";
}
dt.Rows[i]["SP1"] = tempstr;
arr = dt.Rows[i]["SP2"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a>";
}
dt.Rows[i]["SP2"] = tempstr;
arr = dt.Rows[i]["SP3"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a>";
}
dt.Rows[i]["SP3"] = tempstr;
arr = dt.Rows[i]["SP4"].ToString().Split('|');
tempstr = "";
for (int j = 0; j < arr.Length; j++)
{
title = "";
if (arr[j].Trim() != "")
{
arr_temp = arr[j].Split('_');
title = arr[j].Substring(arr_temp[0].Length + arr_temp[1].Length + 2);
}
if (j != arr.Length - 1)
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a></br>";
else
tempstr = tempstr + "<a href=\"#\" onclick=\"PlayWmv('" + arr[j] + "')\" title=\"" + title + "\">" + title + "</a>";
}
dt.Rows[i]["SP4"] = tempstr;
}
Grid1.DataSource = dt;
Grid1.DataBind();
Grid1.Hidden = false;
}
protected void Window1_Close(object sender, FineUI.WindowCloseEventArgs e)
{
databind();
Alert.ShowInTop("操作成功!");
}
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
Grid1.PageIndex = e.NewPageIndex;
}
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
object[] values = Grid1.DataKeys[e.RowIndex];
//int id = Convert.ToInt32(values[0]);
string xmbh = values[1].ToString().Trim();
string zt = values[2].ToString().Trim();
string selectedID = values[0].ToString().Trim();
if (e.CommandName == "xq")
{
string a1 = "upload/教学比武/"+e.CommandArgument;
//a1 = Button_sp1.Text.Trim();
PageContext.RegisterStartupScript("PlayWmv('" + a1 + "');");
}
else if (e.CommandName == "up")
{
if (zt == "1" || zt == "4" || zt == "6")
{
PageContext.RegisterStartupScript(Window1.GetShowReference("XMGL_JXBW_Up.aspx?xmbh=" + xmbh, "修改申报书") + Window1.GetMaximizeReference());
}
else
{
Alert.Show("该项目已经提交,无法修改");
}
}
else if (e.CommandName == "tj")
{
if (zt == "1" || zt == "4" || zt == "6")
{
string sqlstr = "update JXBW set ZT=2 where ID=" + Convert.ToInt32(selectedID);
if (DbHelperSQL.ExecuteSql(sqlstr) != 0)
{
databind();
Alert.Show("操作成功");
}
else
{
databind();
Alert.Show("操作失败");
}
}
else
{
Alert.Show("该项目已经提交,无需重复提交");
}
}
else if (e.CommandName == "del")
{
if (zt == "1")
{
string sqlstr = "update JXBW set SFSC=1 where ID=" + Convert.ToInt32(selectedID);
if (DbHelperSQL.ExecuteSql(sqlstr) != 0)
{
databind();
Alert.Show("操作成功");
}
else
{
databind();
Alert.Show("操作失败");
}
}
else
{
Alert.Show("该项目已经提交,无法删除");
}
}
}
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
GridRow gr = Grid1.Rows[e.RowIndex];
System.Web.UI.WebControls.Label lb = gr.FindControl("Label1") as System.Web.UI.WebControls.Label;
//Alert.Show(lb.Text, "提示", Alert.DefaultMessageBoxIcon);
if (lb.Text.Trim() == "1")
lb.Text = "未提交";
else if (lb.Text.Trim() == "2")
lb.Text = "院校审核中";
else if (lb.Text.Trim() == "3")
lb.Text = "市教委审核中";
else if (lb.Text.Trim() == "4")
lb.Text = "院校退回";
else if (lb.Text.Trim() == "5")
lb.Text = "评审中";
else if (lb.Text.Trim() == "6")
lb.Text = "市教委退回";
else if (lb.Text.Trim() == "7")
lb.Text = "评审通过";
else if (lb.Text.Trim() == "8")
lb.Text = "评审未通过";
}
protected void Button1_Click(object sender, EventArgs e)
{
string a1 = "";
a1 = "upload/教学比武/635699828444961637_01.wmv";
PageContext.RegisterStartupScript("PlayWmv("+a1+");");
}
protected void Button_XXX_Click(object sender, EventArgs e)//“下一步”按钮及项目团队人员信息顶部导航按钮
{
string a1 = "upload/教学比武/635699828444961637_01.wmv";
//a1 = Button_sp1.Text.Trim();
PageContext.RegisterStartupScript("PlayWmv('" + a1 + "');");
}
}
}