From ed8787f2314500e645a03cf47af771eb82f98ed8 Mon Sep 17 00:00:00 2001 From: Ling0925 <2449858657a@gmail.com> Date: Wed, 22 May 2024 17:15:17 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20=E7=94=9F=E4=BA=A7=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E5=8F=8C=E5=87=BB=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- newyt/Module_data/Productout_browse.aspx.cs | 18 +++++----- newyt/Module_data/Schedule_list.aspx.cs | 40 +++++++++++---------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/newyt/Module_data/Productout_browse.aspx.cs b/newyt/Module_data/Productout_browse.aspx.cs index 78591eb..495748b 100644 --- a/newyt/Module_data/Productout_browse.aspx.cs +++ b/newyt/Module_data/Productout_browse.aspx.cs @@ -29,7 +29,7 @@ public partial class Productout_browse : System.Web.UI.Page id.Value = Request.QueryString["uid"].ToString(); } initdata(Convert.ToInt32(id.Value)); - pdquanxian(user.juese); + pdquanxian(user.juese); } @@ -163,12 +163,13 @@ public partial class Productout_browse : System.Web.UI.Page DataTable dt = DBHlper.Execute(string.Format("select * from nr_z_cpkc where scdh='{0}' and xmmc='{1}' and khmc='{2}'", scdh.Text, cpbh.Text, khming.Text)).Tables[0]; double sl = Convert.ToDouble(dt.Rows[0]["sl"]); double nowsl = Convert.ToDouble(shuliang.Text); - int gxcount= DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl + nowsl) + " where id=" + dt.Rows[0]["id"]); + int gxcount = DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl + nowsl) + " where id=" + dt.Rows[0]["id"]); if (gxcount > 0) { DBHlper.excutecmd("update nr_z_cpck set zt='待确认' where id=" + id.Value); } - else { + else + { Response.Write(""); } @@ -178,16 +179,17 @@ public partial class Productout_browse : System.Web.UI.Page //将session转换对象取值 Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; //拼接字符串插入日志 - rizhi.jilu = zh.zhanghao + "执行了出库冲红,出库单号为:" +ckdh.Text.Trim(); + rizhi.jilu = zh.zhanghao + "执行了出库冲红,出库单号为:" + ckdh.Text.Trim(); rizhi.yonghuming = zh.zhanghao.ToString(); rizhibll.Add(rizhi); Response.Redirect("Productout_browse.aspx?uid=" + id.Value); - } + } protected void btn_chuku_Click(object sender, EventArgs e) { - DataTable dt = DBHlper.Execute(string.Format("select * from view_nr_z_cpkc where scdh='{0}' and xmmc='{1}' and khmc='{2}'", scdh.Text, cpbh.Text, khming.Text)).Tables[0]; + var result = DBHlper.Execute(string.Format("select * from view_nr_z_cpkc where scdh='{0}' and xmmc='{1}' and khmc='{2}'", scdh.Text, cpbh.Text, khming.Text)); + DataTable dt = result.Tables[0]; if (dt.Rows.Count == 0) { Response.Write(""); @@ -219,6 +221,6 @@ public partial class Productout_browse : System.Web.UI.Page } } - + } - + diff --git a/newyt/Module_data/Schedule_list.aspx.cs b/newyt/Module_data/Schedule_list.aspx.cs index af2fb60..35aec44 100644 --- a/newyt/Module_data/Schedule_list.aspx.cs +++ b/newyt/Module_data/Schedule_list.aspx.cs @@ -26,7 +26,7 @@ public partial class Schedule_list : CommonPage { Response.Redirect("../index.aspx"); } - + if (Request.QueryString["sczt"] != null && Request.QueryString["sczt"] != "") { drp_zt.Text = Request.QueryString["sczt"].ToString(); @@ -61,7 +61,7 @@ public partial class Schedule_list : CommonPage wherecode += "id"; if (DBHlper.GetPermission(zhanghao.juese, "生产进度", "view_nr_z_scjd", "查看全部")) { - wherecode += string.Format(" from view_nr_z_scjd where " + tiaojian + " id not in(select top ({0}*{1}) id from view_nr_z_scjd "+" where "+tiaojian+" 1=1 " + paixu + ")" + paixu, pg, pageitem); + wherecode += string.Format(" from view_nr_z_scjd where " + tiaojian + " id not in(select top ({0}*{1}) id from view_nr_z_scjd " + " where " + tiaojian + " 1=1 " + paixu + ")" + paixu, pg, pageitem); } DataTable dt_paixu = DBHlper.Execute(wherecode).Tables[0]; @@ -72,7 +72,7 @@ public partial class Schedule_list : CommonPage for (int i = 0; i < dt_paixu.Rows.Count; i++) { - htmlcode += ""; + htmlcode += ""; htmlcode += " "; for (int j = 0; j < dt_paixu.Columns.Count - 1; j++) { @@ -97,15 +97,15 @@ public partial class Schedule_list : CommonPage int dxfzsl = Convert.ToInt32(djzsl) - Convert.ToInt32(yxfzsl); //滞留总数量 int zlzsl = ddjzsl + dxfzsl; - if ( Convert.ToInt32(ybfzsl)>10) + if (Convert.ToInt32(ybfzsl) > 10) { htmlcode += "