Revert 回滚错误修改
This commit is contained in:
parent
337a47286f
commit
d9316ce676
|
@ -8,8 +8,8 @@ using System.Data;
|
||||||
|
|
||||||
public partial class Productout_browse : System.Web.UI.Page
|
public partial class Productout_browse : System.Web.UI.Page
|
||||||
{
|
{
|
||||||
Maticsoft.Model.nr_z_cprk cprkmodel = new Maticsoft.Model.nr_z_cprk();
|
Maticsoft.Model.nr_z_cpck cpckmodel = new Maticsoft.Model.nr_z_cpck();
|
||||||
Maticsoft.BLL.nr_z_cprk cprkbll = new Maticsoft.BLL.nr_z_cprk();
|
Maticsoft.BLL.nr_z_cpck cpckbll = new Maticsoft.BLL.nr_z_cpck();
|
||||||
//创建一个操作记录模板
|
//创建一个操作记录模板
|
||||||
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
|
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
|
||||||
//创建一个操作记录bll
|
//创建一个操作记录bll
|
||||||
|
@ -37,27 +37,27 @@ public partial class Productout_browse : System.Web.UI.Page
|
||||||
#region 获取真正数据值
|
#region 获取真正数据值
|
||||||
private void initdata(int did)
|
private void initdata(int did)
|
||||||
{
|
{
|
||||||
cprkmodel = cprkbll.GetModel(did);
|
cpckmodel = cpckbll.GetModel(did);
|
||||||
//ckdh.Text = cprkmodel.ckbh;
|
ckdh.Text = cpckmodel.ckbh;
|
||||||
riqi.Text = cprkmodel.riqi.ToString("yyyy-MM-dd");
|
riqi.Text = cpckmodel.riqi.ToString("yyyy-MM-dd");
|
||||||
scdh.Text = cprkmodel.scdh;
|
scdh.Text = cpckmodel.scdh;
|
||||||
//khming.Text = cprkmodel.khmc;
|
khming.Text = cpckmodel.khmc;
|
||||||
//cpbh.Text = cprkmodel.cpbh;
|
cpbh.Text = cpckmodel.cpbh;
|
||||||
cpmc.Text = cprkmodel.cpmc;
|
cpmc.Text = cpckmodel.cpmc;
|
||||||
//danjia.Text = cprkmodel.cpdj.ToString();
|
danjia.Text = cpckmodel.cpdj.ToString();
|
||||||
//guige.Text = cprkmodel.guige.ToString();
|
guige.Text = cpckmodel.guige.ToString();
|
||||||
zzshuliang.Text = cprkmodel.zzsl.ToString();
|
zzshuliang.Text = cpckmodel.zzsl.ToString();
|
||||||
lingtou.Text = cprkmodel.lt.ToString();
|
lingtou.Text = cpckmodel.lt.ToString();
|
||||||
shuliang.Text = cprkmodel.sl.ToString();
|
shuliang.Text = cpckmodel.sl.ToString();
|
||||||
//danwei.Text = cprkmodel.danwei;
|
danwei.Text = cpckmodel.danwei;
|
||||||
//lxr.Text = cprkmodel.lxr;
|
lxr.Text = cpckmodel.lxr;
|
||||||
//zongjine.Text = cprkmodel.zje.ToString();
|
zongjine.Text = cpckmodel.zje.ToString();
|
||||||
//lxdh.Text = cprkmodel.lxdh;
|
lxdh.Text = cpckmodel.lxdh;
|
||||||
jingshouren.Text = cprkmodel.jsr;
|
jingshouren.Text = cpckmodel.jsr;
|
||||||
//shr.Text = cprkmodel.shr;
|
shr.Text = cpckmodel.shr;
|
||||||
//dizhi.Text = cprkmodel.shdizhi;
|
dizhi.Text = cpckmodel.shdizhi;
|
||||||
//txt_beizhu.Text = cprkmodel.beizhu;
|
txt_beizhu.Text = cpckmodel.beizhu;
|
||||||
zhuangtai.Text = cprkmodel.zt;
|
zhuangtai.Text = cpckmodel.zt;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -69,42 +69,47 @@ public partial class Productout_browse : System.Web.UI.Page
|
||||||
{
|
{
|
||||||
Response.Redirect("../index.aspx");
|
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");
|
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;
|
bt_tj.Visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "编辑全部"))
|
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "编辑全部"))
|
||||||
{
|
{
|
||||||
bt_tj.Visible = true;
|
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;
|
shanchu.Visible = true;
|
||||||
}
|
}
|
||||||
if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "删除全部"))
|
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "删除全部"))
|
||||||
{
|
{
|
||||||
shanchu.Visible = true;
|
shanchu.Visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库确认"))
|
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "出库确认"))
|
||||||
{
|
{
|
||||||
ckqr.Visible = true;
|
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;
|
bt_add.Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zhuangtai.Text == "已入库")
|
if (zhuangtai.Text == "已出库")
|
||||||
{
|
{
|
||||||
ckqr.Enabled = false;
|
ckqr.Enabled = false;
|
||||||
ckqr.BackColor = System.Drawing.Color.Gray;
|
ckqr.BackColor = System.Drawing.Color.Gray;
|
||||||
|
@ -118,7 +123,7 @@ public partial class Productout_browse : System.Web.UI.Page
|
||||||
ckch.Enabled = false;
|
ckch.Enabled = false;
|
||||||
ckch.BackColor = System.Drawing.Color.Gray;
|
ckch.BackColor = System.Drawing.Color.Gray;
|
||||||
}
|
}
|
||||||
if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "打印"))
|
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "打印"))
|
||||||
{
|
{
|
||||||
dayin.Visible = true;
|
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.riqi = DateTime.Now;
|
||||||
rizhi.leixing = "成品入库";
|
rizhi.leixing = "成品出库";
|
||||||
//将session转换对象取值
|
//将session转换对象取值
|
||||||
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
|
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();
|
rizhi.yonghuming = zh.zhanghao.ToString();
|
||||||
rizhibll.Add(rizhi);
|
rizhibll.Add(rizhi);
|
||||||
Response.Redirect("Productout_list.aspx", false);
|
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"]);
|
int gxcount = DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl + nowsl) + " where id=" + dt.Rows[0]["id"]);
|
||||||
if (gxcount > 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
Response.Write("<script>alert('入库冲红失败')</script>");
|
Response.Write("<script>alert('出库冲红失败')</script>");
|
||||||
}
|
}
|
||||||
|
|
||||||
//给日志模板赋值
|
//给日志模板赋值
|
||||||
rizhi.riqi = DateTime.Now;
|
rizhi.riqi = DateTime.Now;
|
||||||
rizhi.leixing = "成品入库";
|
rizhi.leixing = "成品出库";
|
||||||
//将session转换对象取值
|
//将session转换对象取值
|
||||||
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
|
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();
|
rizhi.yonghuming = zh.zhanghao.ToString();
|
||||||
rizhibll.Add(rizhi);
|
rizhibll.Add(rizhi);
|
||||||
Response.Redirect("Productout_browse.aspx?uid=" + id.Value);
|
Response.Redirect("Productout_browse.aspx?uid=" + id.Value);
|
||||||
|
@ -204,13 +209,13 @@ public partial class Productout_browse : System.Web.UI.Page
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl - nowsl) + " where id=" + dt.Rows[0]["id"]);
|
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.riqi = DateTime.Now;
|
||||||
rizhi.leixing = "成品入库";
|
rizhi.leixing = "成品出库";
|
||||||
//将session转换对象取值
|
//将session转换对象取值
|
||||||
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
|
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();
|
rizhi.yonghuming = zh.zhanghao.ToString();
|
||||||
rizhibll.Add(rizhi);
|
rizhibll.Add(rizhi);
|
||||||
Response.Redirect("Productout_browse.aspx?uid=" + id.Value);
|
Response.Redirect("Productout_browse.aspx?uid=" + id.Value);
|
||||||
|
|
Loading…
Reference in New Issue