diff --git a/newyt/Module_data/Productout_browse.aspx.cs b/newyt/Module_data/Productout_browse.aspx.cs
index b240567..6bfc58b 100644
--- a/newyt/Module_data/Productout_browse.aspx.cs
+++ b/newyt/Module_data/Productout_browse.aspx.cs
@@ -8,8 +8,8 @@ using System.Data;
public partial class Productout_browse : System.Web.UI.Page
{
- Maticsoft.Model.nr_z_cprk cprkmodel = new Maticsoft.Model.nr_z_cprk();
- Maticsoft.BLL.nr_z_cprk cprkbll = new Maticsoft.BLL.nr_z_cprk();
+ Maticsoft.Model.nr_z_cpck cpckmodel = new Maticsoft.Model.nr_z_cpck();
+ Maticsoft.BLL.nr_z_cpck cpckbll = new Maticsoft.BLL.nr_z_cpck();
//创建一个操作记录模板
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
//创建一个操作记录bll
@@ -37,27 +37,27 @@ public partial class Productout_browse : System.Web.UI.Page
#region 获取真正数据值
private void initdata(int did)
{
- cprkmodel = cprkbll.GetModel(did);
- //ckdh.Text = cprkmodel.ckbh;
- riqi.Text = cprkmodel.riqi.ToString("yyyy-MM-dd");
- scdh.Text = cprkmodel.scdh;
- //khming.Text = cprkmodel.khmc;
- //cpbh.Text = cprkmodel.cpbh;
- cpmc.Text = cprkmodel.cpmc;
- //danjia.Text = cprkmodel.cpdj.ToString();
- //guige.Text = cprkmodel.guige.ToString();
- zzshuliang.Text = cprkmodel.zzsl.ToString();
- lingtou.Text = cprkmodel.lt.ToString();
- shuliang.Text = cprkmodel.sl.ToString();
- //danwei.Text = cprkmodel.danwei;
- //lxr.Text = cprkmodel.lxr;
- //zongjine.Text = cprkmodel.zje.ToString();
- //lxdh.Text = cprkmodel.lxdh;
- jingshouren.Text = cprkmodel.jsr;
- //shr.Text = cprkmodel.shr;
- //dizhi.Text = cprkmodel.shdizhi;
- //txt_beizhu.Text = cprkmodel.beizhu;
- zhuangtai.Text = cprkmodel.zt;
+ cpckmodel = cpckbll.GetModel(did);
+ ckdh.Text = cpckmodel.ckbh;
+ riqi.Text = cpckmodel.riqi.ToString("yyyy-MM-dd");
+ scdh.Text = cpckmodel.scdh;
+ khming.Text = cpckmodel.khmc;
+ cpbh.Text = cpckmodel.cpbh;
+ cpmc.Text = cpckmodel.cpmc;
+ danjia.Text = cpckmodel.cpdj.ToString();
+ guige.Text = cpckmodel.guige.ToString();
+ zzshuliang.Text = cpckmodel.zzsl.ToString();
+ lingtou.Text = cpckmodel.lt.ToString();
+ shuliang.Text = cpckmodel.sl.ToString();
+ danwei.Text = cpckmodel.danwei;
+ lxr.Text = cpckmodel.lxr;
+ zongjine.Text = cpckmodel.zje.ToString();
+ lxdh.Text = cpckmodel.lxdh;
+ jingshouren.Text = cpckmodel.jsr;
+ shr.Text = cpckmodel.shr;
+ dizhi.Text = cpckmodel.shdizhi;
+ txt_beizhu.Text = cpckmodel.beizhu;
+ zhuangtai.Text = cpckmodel.zt;
}
#endregion
@@ -69,42 +69,47 @@ public partial class Productout_browse : System.Web.UI.Page
{
Response.Redirect("../index.aspx");
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "查看全部") == false && DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "查看个人") == false)
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "查看全部") == false && DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "查看个人") == false)
{
Response.Redirect("../Common/nopower.htm");
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "编辑个人") && jingshouren.Text == user.zhanghao)
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "编辑个人") && jingshouren.Text == user.zhanghao)
{
bt_tj.Visible = true;
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "编辑全部"))
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "编辑全部"))
{
bt_tj.Visible = true;
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "删除个人") && jingshouren.Text == user.zhanghao)
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "删除个人") && jingshouren.Text == user.zhanghao)
{
shanchu.Visible = true;
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "删除全部"))
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "删除全部"))
{
shanchu.Visible = true;
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库确认"))
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "出库确认"))
{
ckqr.Visible = true;
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "添加"))
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "出库冲红"))
+ {
+ ckch.Visible = true;
+ }
+
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "添加"))
{
bt_add.Visible = true;
}
- if (zhuangtai.Text == "已入库")
+ if (zhuangtai.Text == "已出库")
{
ckqr.Enabled = false;
ckqr.BackColor = System.Drawing.Color.Gray;
@@ -118,7 +123,7 @@ public partial class Productout_browse : System.Web.UI.Page
ckch.Enabled = false;
ckch.BackColor = System.Drawing.Color.Gray;
}
- if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "打印"))
+ if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "打印"))
{
dayin.Visible = true;
}
@@ -133,15 +138,15 @@ public partial class Productout_browse : System.Web.UI.Page
{
- if (cprkbll.Delete(Convert.ToInt32(id.Value)))
+ if (cpckbll.Delete(Convert.ToInt32(id.Value)))
{
//给日志模板赋值
rizhi.riqi = DateTime.Now;
- rizhi.leixing = "成品入库";
+ rizhi.leixing = "成品出库";
//将session转换对象取值
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
//拼接字符串插入日志
- rizhi.jilu = zh.zhanghao + "删除了成品入库,入库单号为:" + cpbh.Text.Trim();
+ rizhi.jilu = zh.zhanghao + "删除了成品出库,出库单号为:" + cpbh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi);
Response.Redirect("Productout_list.aspx", false);
@@ -161,20 +166,20 @@ public partial class Productout_browse : System.Web.UI.Page
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_cprk set zt='待确认' where id=" + id.Value);
+ DBHlper.excutecmd("update nr_z_cpck set zt='待确认' where id=" + id.Value);
}
else
{
- Response.Write("");
+ Response.Write("");
}
//给日志模板赋值
rizhi.riqi = DateTime.Now;
- rizhi.leixing = "成品入库";
+ rizhi.leixing = "成品出库";
//将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);
@@ -204,13 +209,13 @@ public partial class Productout_browse : System.Web.UI.Page
else
{
DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl - nowsl) + " where id=" + dt.Rows[0]["id"]);
- DBHlper.excutecmd("update nr_z_cprk set zt='已入库' where id=" + id.Value);
+ DBHlper.excutecmd("update nr_z_cpck set zt='已出库' where id=" + id.Value);
rizhi.riqi = DateTime.Now;
- rizhi.leixing = "成品入库";
+ rizhi.leixing = "成品出库";
//将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);