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 += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
- }
+ }
else if (zlzsl > 0)
{
htmlcode += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
}
- else if (Convert.ToInt32(xcsl)> 0 && zlzsl<=0)
+ else if (Convert.ToInt32(xcsl) > 0 && zlzsl <= 0)
{
htmlcode += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
@@ -115,7 +115,7 @@ public partial class Schedule_list : CommonPage
htmlcode += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
}
- /*-----正常工序时候获取登记信息------*/
+ /*-----正常工序时候获取登记信息------*/
foreach (DataRow dr in gjds.Tables[0].Rows)
{
@@ -134,7 +134,7 @@ public partial class Schedule_list : CommonPage
dxfzsl = Convert.ToInt32(djzsl) - Convert.ToInt32(yxfzsl);
//滞留总数量
zlzsl = ddjzsl + dxfzsl;
- if (Convert.ToInt32(ybfzsl) > 10)
+ if (Convert.ToInt32(ybfzsl) > 10)
{
htmlcode += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
}
@@ -149,9 +149,9 @@ public partial class Schedule_list : CommonPage
}
else
{
- //htmlcode += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
+ //htmlcode += "- 需产:" + xcsl + ";
- 滞留:" + zlzsl + ";
- 下发:" + yxfzsl + ";
- 报废:" + ybfzsl + ";
| ";
- htmlcode += "等待交接... | ";
+ htmlcode += "等待交接... | ";
}
}
@@ -281,22 +281,23 @@ public partial class Schedule_list : CommonPage
#region 日期查询
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
- public string nowdaycount(string zt,int selmonth)
+ public string nowdaycount(string zt, int selmonth)
{
DateTime nowdt = DateTime.Now;
int days = DateTime.DaysInMonth(nowdt.Year, selmonth);
string yuechu = nowdt.Year + "-" + selmonth + "-" + "1";
- string yuemo = Convert.ToDateTime(nowdt.Year + "-" + selmonth + "-" +days).AddDays(1).ToString("yyyy-MM-dd");
+ string yuemo = Convert.ToDateTime(nowdt.Year + "-" + selmonth + "-" + days).AddDays(1).ToString("yyyy-MM-dd");
DateTime yc = Convert.ToDateTime(yuechu);
string cmd = "";
if (zt == "")
{
cmd = string.Format("select CONVERT(varchar(12),riqi,111) as 'riqi' from view_nr_z_scjd where riqi>='{0}' and riqi<='{1}' ", yuechu, yuemo);
}
- else {
+ else
+ {
cmd = string.Format("select CONVERT(varchar(12),riqi,111) as 'riqi' from view_nr_z_scjd where riqi>='{0}' and riqi<='{1}' and zt='{2}' ", yuechu, yuemo, zt);
}
-
+
Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
DataTable dt = DBHlper.Execute(cmd).Tables[0];
var biao = ""
@@ -346,7 +347,7 @@ public partial class Schedule_list : CommonPage
if (!DBHlper.GetPermission(juese, "生产进度", "view_nr_z_scjd", "查看全部") && !DBHlper.GetPermission(juese, "生产进度", "view_nr_z_scjd", "查看个人"))
{
Response.Redirect("../Common/nopower.htm");
- }
+ }
}
@@ -388,10 +389,11 @@ public partial class Schedule_list : CommonPage
{
selectcode = "select " + colmn + " from view_nr_z_scjd where zt='" + drp_zt.Text + "'";
}
- else {
+ else
+ {
selectcode = "select " + colmn + " from view_nr_z_scjd where 1=1 ";
}
-
+
if (tj != "")
{
selectcode += tj.Replace("where", "and");
@@ -400,8 +402,8 @@ public partial class Schedule_list : CommonPage
{
selectcode += " and id in(" + selectid.TrimEnd(',') + ")";
}
- DataTable dt = DBHlper.Execute(selectcode+" order by id desc").Tables[0];
- DBHlper.ExportByWeb(dt, "生产单"+DateTime.Now, sList);
+ DataTable dt = DBHlper.Execute(selectcode + " order by id desc").Tables[0];
+ DBHlper.ExportByWeb(dt, "生产单" + DateTime.Now, sList);
}
#endregion