diff --git a/newyt/Module_data/Employee_Form.aspx b/newyt/Module_data/Employee_Form.aspx index bbf417e..7409d5f 100644 --- a/newyt/Module_data/Employee_Form.aspx +++ b/newyt/Module_data/Employee_Form.aspx @@ -219,8 +219,12 @@   +
+
+ + diff --git a/newyt/Module_data/Employee_Form.aspx.cs b/newyt/Module_data/Employee_Form.aspx.cs index 781def5..e346d32 100644 --- a/newyt/Module_data/Employee_Form.aspx.cs +++ b/newyt/Module_data/Employee_Form.aspx.cs @@ -11,7 +11,7 @@ using Ajax; using System.IO; public partial class Employee_Form : CommonPage { - + //创建一个共用的编码bll层 Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma(); //创建一个共用的类型BLL层 @@ -36,14 +36,14 @@ public partial class Employee_Form : CommonPage } //获取角色权限 Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); - + binddata(); if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0) { pdquanxianbj(user.juese); string uid = Request.QueryString["uid"].ToString(); id.Value = uid; - initdata(uid); + initdata(uid); setgyxx(); } else @@ -61,7 +61,7 @@ public partial class Employee_Form : CommonPage rzrq.Value = DateTime.Now.ToString("yyyy-MM-dd"); //htdq.Value = DateTime.Now.AddYears(1).ToString("yyyy-MM-dd"); } - + } } #region 用来初始化绑定下拉框等值 @@ -70,7 +70,7 @@ public partial class Employee_Form : CommonPage //jbgz.Value = "0"; DataSet hylx = bmlx.GetAllList(); - DataRow [] dr = hylx.Tables[0].Select("leixing='学历'"); + DataRow[] dr = hylx.Tables[0].Select("leixing='学历'"); if (dr != null && dr.Length > 0) { DataSet xz = bm.GetList("zhongleiid='" + dr[0]["id"] + "'"); @@ -110,7 +110,7 @@ public partial class Employee_Form : CommonPage glzh.SelectedIndex = glzh.Items.Count - 1; } - + } #endregion #region 修改时获取真正数据值 @@ -128,14 +128,14 @@ public partial class Employee_Form : CommonPage csrq.Value = Convert.ToDateTime(ry.csrq).ToString("yyyy-MM-dd").ToString(); xl.Text = ry.xl.ToString(); lxfs.Value = ry.lxfs.ToString(); - zw.Text = ry.zw.ToString(); + zw.Text = ry.zw.ToString(); rzrq.Value = Convert.ToDateTime(ry.rzrq).ToString("yyyy-MM-dd").ToString(); //htdq.Value = Convert.ToDateTime(ry.htdq).ToString("yyyy-MM-dd").ToString(); //jbgz.Value = Convert.ToDecimal(ry.jbgz).ToString(); zt.Text = ry.zt; glzh.Text = ry.glzh; bz.Value = ry.bz.ToString(); - + } } #endregion @@ -208,22 +208,22 @@ public partial class Employee_Form : CommonPage #region 添加时候加载工艺信息 private void jzgyxx() { - + //修改页面时,首先吧项目明细的表头加载出来 string biao = " "; DataSet dtgx = DBHlper.Execute("select * from view_bianma where zhonglei='工序项目'"); string gxcode = ""; - gxcode += ""; gxcode += ""; - //gysq.InnerHtml=biao+gxcode+"
登记工艺权限
    "; - gxcode += "
  •  制模
  • "; + gxcode += "
  •  制模
  • "; foreach (DataRow dr in dtgx.Tables[0].Rows) { - gxcode += "
  •  " + dr["mingcheng"] + "
  • "; + gxcode += "
  •  " + dr["mingcheng"] + "
  • "; } gxcode += "
  •  土坯仓
  • "; gxcode += "
  •  素坯仓
  • "; gxcode += "
  •  白地仓
  • "; - gxcode += "
  •  成品仓
  • "; + gxcode += "
  •  成品仓
  • "; gxcode += "
下发工艺权限
    "; + gxcode += "
下发工艺权限
    "; foreach (DataRow dr in dtgx.Tables[0].Rows) { gxcode += "
  •  " + dr["mingcheng"] + "
  • "; @@ -231,7 +231,7 @@ public partial class Employee_Form : CommonPage gxcode += "
  •  土坯仓
  • "; gxcode += "
  •  素坯仓
  • "; gxcode += "
  •  白地仓
  • "; - gxcode += "
  •  成品仓
  • "; + gxcode += "
  •  成品仓
  • "; gxcode += "
掌握技能权限
    "; foreach (DataRow dr in dtgx.Tables[0].Rows) @@ -239,7 +239,7 @@ public partial class Employee_Form : CommonPage gxcode += "
  •  " + dr["mingcheng"] + "
  • "; } gxcode += "
"; + gxxm.InnerHtml = biao + gxcode + ""; } #endregion @@ -251,7 +251,7 @@ public partial class Employee_Form : CommonPage string biao = " "; DataSet dtgx = DBHlper.Execute("select * from view_bianma where zhonglei='工序项目'"); string gxcode = ""; - //gysq.InnerHtml = biao + gxcode + "
登记工艺权限
    "; - DataSet djqxgyds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='"+id.Value+"' and qxlx='登记权限'"); + DataSet djqxgyds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='登记权限'"); DataRow[] ckdr = djqxgyds.Tables[0].Select("gyxx='制模'"); if (ckdr != null && ckdr.Length > 0) { @@ -273,16 +273,16 @@ public partial class Employee_Form : CommonPage gxcode += "
  •  " + dr["mingcheng"] + "
  • "; } } - ckdr = djqxgyds.Tables[0].Select("gyxx='土坯仓'"); + ckdr = djqxgyds.Tables[0].Select("gyxx='土坯仓'"); if (ckdr != null && ckdr.Length > 0) { - gxcode += "
  •  土坯仓
  • "; + gxcode += "
  •  土坯仓
  • "; } else { - gxcode += "
  •  土坯仓
  • "; + gxcode += "
  •  土坯仓
  • "; } - ckdr = djqxgyds.Tables[0].Select("gyxx='素坯仓'"); + ckdr = djqxgyds.Tables[0].Select("gyxx='素坯仓'"); if (ckdr != null && ckdr.Length > 0) { gxcode += "
  •  素坯仓
  • "; @@ -323,7 +323,7 @@ public partial class Employee_Form : CommonPage else { gxcode += "
  •  " + dr["mingcheng"] + "
  • "; - } + } } ckdr = xfqxgyds.Tables[0].Select("gyxx='土坯仓'"); @@ -379,7 +379,7 @@ public partial class Employee_Form : CommonPage } } gxcode += "
"; + gysq.InnerHtml = biao + gxcode + ""; } #endregion #region 敏感权限查看 @@ -419,7 +419,7 @@ public partial class Employee_Form : CommonPage - + //保存操作 protected void bt_tj_Click(object sender, EventArgs e) { @@ -453,10 +453,10 @@ public partial class Employee_Form : CommonPage } if (rtx > 0) { - int delez=DBHlper.excutecmd("delete nr_z_ryda_gxqx where ryid='" + rtx + "'"); + int delez = DBHlper.excutecmd("delete nr_z_ryda_gxqx where ryid='" + rtx + "'"); foreach (string djgx in djgyqxhd.Value.Split(',')) { - int djz=DBHlper.excutecmd("insert into nr_z_ryda_gxqx (ryid,gyxx,qxlx) values ('"+rtx+"','"+djgx+"','登记权限')"); + int djz = DBHlper.excutecmd("insert into nr_z_ryda_gxqx (ryid,gyxx,qxlx) values ('" + rtx + "','" + djgx + "','登记权限')"); } foreach (string xfgx in xfgyqxhd.Value.Split(',')) { diff --git a/newyt/Module_data/Employee_browse.aspx.cs b/newyt/Module_data/Employee_browse.aspx.cs index e61ca4e..e80018a 100644 --- a/newyt/Module_data/Employee_browse.aspx.cs +++ b/newyt/Module_data/Employee_browse.aspx.cs @@ -12,7 +12,7 @@ public partial class Employee_browse : CommonPage { //创建一个共用的物料bll Maticsoft.BLL.nr_z_ryda rybll = new Maticsoft.BLL.nr_z_ryda(); - + //创建一个物料模板 Maticsoft.Model.nr_z_ryda rymd = new Maticsoft.Model.nr_z_ryda(); //创建一个操作记录模板 @@ -37,13 +37,13 @@ public partial class Employee_browse : CommonPage initdata(id.Value); //jzgyxx(); - } + } } #region 修改时获取真正数据值 private void initdata(string id) { - + int idz = Convert.ToInt32(id); rymd = rybll.GetModel(idz); if (rymd != null) @@ -54,7 +54,7 @@ public partial class Employee_browse : CommonPage xjd.Text = rymd.xjd.ToString(); sfzh.Text = rymd.sfzh.ToString(); csrq.Text = Convert.ToDateTime(rymd.csrq).ToString("yyyy-MM-dd").ToString(); - xl.Text = DBHlper.getfirstcolmn("select mingcheng from nr_sys_bianma where id=" + rymd.xl); + xl.Text = DBHlper.getfirstcolmn("select mingcheng from nr_sys_bianma where id=" + rymd.xl); lxfs.Text = rymd.lxfs.ToString(); zw.Text = DBHlper.getfirstcolmn("select mingcheng from nr_sys_bianma where id=" + rymd.zw); rzrq.Text = Convert.ToDateTime(rymd.rzrq).ToString("yyyy-MM-dd").ToString(); @@ -71,34 +71,34 @@ public partial class Employee_browse : CommonPage #endregion #region 加载工艺信息 - /* private void jzgyxx() - { + /* private void jzgyxx() + { - //修改页面时,首先吧项目明细的表头加载出来 - string biao = " "; - DataSet djgxds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='登记权限'"); ; - string gxcode = ""; - DataSet xfgxds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='下发权限'"); ; - gxcode += ""; - DataSet jngxds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='掌握技能'"); ; - gxcode += ""; - gysq.InnerHtml = biao + gxcode + "
登记工艺权限:
    "; - foreach (DataRow dr in djgxds.Tables[0].Rows) - { - gxcode += "
  •  " + dr["gyxx"] + "
  • "; - } - gxcode += "
下发工艺权限:
    "; - foreach (DataRow dr in xfgxds.Tables[0].Rows) - { - gxcode += "
  •  " + dr["gyxx"] + "
  • "; - } - gxcode += "
掌握技能权限:
    "; - foreach (DataRow dr in jngxds.Tables[0].Rows) - { - gxcode += "
  •  " + dr["gyxx"] + "
  • "; - } - gxcode += "
"; - }*/ + //修改页面时,首先吧项目明细的表头加载出来 + string biao = " "; + DataSet djgxds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='登记权限'"); ; + string gxcode = ""; + DataSet xfgxds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='下发权限'"); ; + gxcode += ""; + DataSet jngxds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='掌握技能'"); ; + gxcode += ""; + gysq.InnerHtml = biao + gxcode + "
登记工艺权限:
    "; + foreach (DataRow dr in djgxds.Tables[0].Rows) + { + gxcode += "
  •  " + dr["gyxx"] + "
  • "; + } + gxcode += "
下发工艺权限:
    "; + foreach (DataRow dr in xfgxds.Tables[0].Rows) + { + gxcode += "
  •  " + dr["gyxx"] + "
  • "; + } + gxcode += "
掌握技能权限:
    "; + foreach (DataRow dr in jngxds.Tables[0].Rows) + { + gxcode += "
  •  " + dr["gyxx"] + "
  • "; + } + gxcode += "
"; + }*/ #endregion #region 敏感权限查看 void pdquanxian(int juese) @@ -113,15 +113,15 @@ public partial class Employee_browse : CommonPage Response.Redirect("../Common/nopower.htm"); } - if (DBHlper.GetPermission(juese, "人员档案", "nr_z_ryda", "编辑") ) + if (DBHlper.GetPermission(juese, "人员档案", "nr_z_ryda", "编辑")) { bt_tj.Visible = true; } - if (DBHlper.GetPermission(juese, "人员档案", "nr_z_ryda", "删除") ) + if (DBHlper.GetPermission(juese, "人员档案", "nr_z_ryda", "删除")) { shanchu.Visible = true; } - + } @@ -152,7 +152,7 @@ public partial class Employee_browse : CommonPage { Response.Write(""); } - } - + } + } \ No newline at end of file diff --git a/newyt/Module_data/Wages_browse.aspx.cs b/newyt/Module_data/Wages_browse.aspx.cs index ab2eb72..cd75d7d 100644 --- a/newyt/Module_data/Wages_browse.aspx.cs +++ b/newyt/Module_data/Wages_browse.aspx.cs @@ -11,7 +11,7 @@ using Ajax; public partial class Wages_browse : CommonPage { - + //创建一个共用的编码bll层 Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma(); //创建一个共用的类型BLL层 @@ -21,7 +21,7 @@ public partial class Wages_browse : CommonPage //创建一个共用的工价档案 Maticsoft.Model.nr_z_cpkc_gj gjdamd = new Maticsoft.Model.nr_z_cpkc_gj(); //创建一个操作记录bll - Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi(); + Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi(); //创建一个操作记录模板 Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi(); protected void Page_Load(object sender, EventArgs e) @@ -34,28 +34,28 @@ public partial class Wages_browse : CommonPage Response.Redirect("../index.aspx"); } //获取角色权限 - Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); + Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0) { pdquanxianbj(user.juese); string uid = Request.QueryString["uid"].ToString(); id.Value = uid; - initdata(uid); + initdata(uid); } else { - pdquanxian(user.juese); - + pdquanxian(user.juese); + } - - + + } - } + } #region 修改时获取真正数据值 private void initdata(string did) { - DataSet ds=DBHlper.Execute("select * from view_nr_z_cpkc_gj where id='"+did+"'"); + DataSet ds = DBHlper.Execute("select * from view_nr_z_cpkc_gj where id='" + did + "'"); if (ds != null && ds.Tables[0].Rows.Count > 0) { cpbh.Value = ds.Tables[0].Rows[0]["cpbh"].ToString(); @@ -64,23 +64,23 @@ public partial class Wages_browse : CommonPage guige.Value = ds.Tables[0].Rows[0]["gg"].ToString(); zhongliang.Value = ds.Tables[0].Rows[0]["zhongliang"].ToString(); tiji.Value = ds.Tables[0].Rows[0]["tiji"].ToString(); - DataSet gjds=DBHlper.Execute(" select * from view_bianma where zhonglei='前段工价' or zhonglei='中段工价' or zhonglei='后段工价'"); + DataSet gjds = DBHlper.Execute(" select * from view_bianma where zhonglei='前段工价' or zhonglei='中段工价' or zhonglei='后段工价'"); if (gjds != null && gjds.Tables[0].Rows.Count > 0) { //修改页面时,首先吧项目明细的表头加载出来 string biao = " "; - int x=0; - - foreach(DataRow r in gjds.Tables[0].Rows) + int x = 0; + + foreach (DataRow r in gjds.Tables[0].Rows) { if (x == 0) { biao += ""; } x = x + 1; - string cpgjzhi= DBHlper.getfirstcolmn("select isnull(gjjg,0) from nr_z_cpkc_gj where cpid='" + did + "' and gjmc='"+r["mingcheng"]+"'"); - biao += ""; - if (x == 6) + string cpgjzhi = DBHlper.getfirstcolmn("select isnull(gjjg,0) from nr_z_cpkc_gj where cpid='" + did + "' and gjmc='" + r["mingcheng"] + "'"); + biao += ""; + if (x == 6) { biao += ""; x = 0; @@ -105,13 +105,13 @@ public partial class Wages_browse : CommonPage #region 获取页面参数赋值model对象 private void getmd() - { + { //给日志模板赋值 rizhi.riqi = DateTime.Now; rizhi.leixing = "工价档案"; } #endregion - + #region 敏感权限查看 void pdquanxian(int juese) { @@ -157,18 +157,18 @@ public partial class Wages_browse : CommonPage int rtx = 0; //判断uid是否存在值,有值为修改,无值为添加 - DBHlper.excutecmd("delete nr_z_cpkc_gj where cpid='"+id.Value+"'"); + DBHlper.excutecmd("delete nr_z_cpkc_gj where cpid='" + id.Value + "'"); List gjdads = new List(); gjdads = DBHlper.ConvertJsonToEntityListEntity(gjxxhd.Value); foreach (Maticsoft.Model.nr_z_cpkc_gj gjx in gjdads) - { - gjx.cpid = Convert.ToInt32(id.Value); - rtx= gjdabll.Add(gjx); + { + gjx.cpid = Convert.ToInt32(id.Value); + rtx = gjdabll.Add(gjx); } - - caozuo = "修改"; - + + caozuo = "修改"; + if (rtx > 0) { //将session转换对象取值 diff --git a/newyt/Module_data/Wages_list.aspx.cs b/newyt/Module_data/Wages_list.aspx.cs index c0c7b0c..b450c46 100644 --- a/newyt/Module_data/Wages_list.aspx.cs +++ b/newyt/Module_data/Wages_list.aspx.cs @@ -54,12 +54,12 @@ public partial class Wages_list : System.Web.UI.Page wherecode += dtr["lieming"] + ","; } wherecode += "id"; - if (DBHlper.GetPermission(zhanghao.juese, "工价档案", "nr_z_cpkc_gj", "查看全部")) + if (DBHlper.GetPermission(zhanghao.juese, "工价档案", "view_nr_z_cpkc_gj", "查看全部")) { - wherecode += string.Format(" from view_nr_z_cpkc_gj where " + tiaojian + " id not in(select top ({0}*{1}) id from view_nr_z_cpkc_gj "+" where "+tiaojian+" 1=1 " + paixu + ")" + paixu, pg, pageitem); + wherecode += string.Format(" from view_nr_z_cpkc_gj where " + tiaojian + " id not in(select top ({0}*{1}) id from view_nr_z_cpkc_gj " + " where " + tiaojian + " 1=1 " + paixu + ")" + paixu, pg, pageitem); } - + DataTable dt_paixu = DBHlper.Execute(wherecode).Tables[0]; if (dt_paixu.Rows.Count == 0) { @@ -72,8 +72,8 @@ public partial class Wages_list : System.Web.UI.Page htmlcode += " "; for (int j = 0; j < dt_paixu.Columns.Count - 1; j++) - { - htmlcode += ""; + { + htmlcode += ""; } DataSet gjds = DBHlper.Execute("select * from view_bianma where (zhonglei='前段工价' or zhonglei='中段工价' or zhonglei='后段工价') and zt='1'"); @@ -85,7 +85,7 @@ public partial class Wages_list : System.Web.UI.Page DataSet cpgjds = DBHlper.Execute("select isnull(gjjg,0) from dbo.nr_z_cpkc_gj where cpid='" + dt_paixu.Rows[i]["id"] + "' and gjmc='" + dr["mingcheng"] + "'"); if (cpgjds != null & cpgjds.Tables[0].Rows.Count > 0) { - htmlcode += ""; + htmlcode += ""; } else { @@ -124,7 +124,7 @@ public partial class Wages_list : System.Web.UI.Page int fanhuizhi = 0; string cmd = string.Format("select count(*) from view_nr_z_cpkc_gj " + tj); Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; - if (!DBHlper.GetPermission(yhzh.juese, "工价档案", "nr_z_cpkc_gj", "查看全部")) + if (!DBHlper.GetPermission(yhzh.juese, "工价档案", "view_nr_z_cpkc_gj", "查看全部")) { if (tj == "") { @@ -205,7 +205,7 @@ public partial class Wages_list : System.Web.UI.Page public string yincanglie(int endid) { Maticsoft.Model.nr_z_yhzh zhanghao = (Maticsoft.Model.nr_z_yhzh)Session["user"]; - endid = endid - 1; + endid = endid - 1; string displaycmd = "select * from nr_lt_paixu where isxianshi=0 and tblname='view_nr_z_cpkc_gj' and userid='" + zhanghao.id + "'"; DataTable distable = DBHlper.Execute(displaycmd).Tables[0]; string htmlcode = ""; @@ -224,7 +224,7 @@ public partial class Wages_list : System.Web.UI.Page { string selectcmd = "select count(*) from view_nr_z_cpkc_gj " + wheretj; Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; - if (!DBHlper.GetPermission(yhzh.juese, "工价档案", "nr_z_cpkc_gj", "查看全部")) + if (!DBHlper.GetPermission(yhzh.juese, "工价档案", "view_nr_z_cpkc_gj", "查看全部")) { if (wheretj == "") { @@ -250,7 +250,7 @@ public partial class Wages_list : System.Web.UI.Page DateTime yc = Convert.ToDateTime(yuechu); string cmd = string.Format("select CONVERT(varchar(12),riqi,111) as 'riqi' from view_nr_z_cpkc_gj where riqi>='{0}' and riqi<='{1}'", yuechu, yuemo); Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; - + DataTable dt = DBHlper.Execute(cmd).Tables[0]; var biao = "
" + r["mingcheng"] + " " + r["mingcheng"] + "  
" + dt_paixu.Rows[i][j] + "" + dt_paixu.Rows[i][j] + "" + Convert.ToDouble(cpgjds.Tables[0].Rows[0][0]) + "" + Convert.ToDouble(cpgjds.Tables[0].Rows[0][0]) + "
" @@ -297,7 +297,8 @@ public partial class Wages_list : System.Web.UI.Page { Response.Redirect("../index.aspx"); } - if (!DBHlper.GetPermission(juese, "工价档案", "nr_z_cpkc_gj", "查看全部") && !DBHlper.GetPermission(juese, "工价档案", "nr_z_cpkc_gj", "查看个人")) + if (!DBHlper.GetPermission(juese, "工价档案", "view_nr_z_cpkc_gj", "查看全部") + && !DBHlper.GetPermission(juese, "工价档案", "view_nr_z_cpkc_gj", "查看个人")) { Response.Redirect("../Common/nopower.htm"); } @@ -353,7 +354,7 @@ public partial class Wages_list : System.Web.UI.Page if (gjds != null & gjds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in gjds.Tables[0].Rows) - { + { sList.Add(dr["mingcheng"].ToString()); } @@ -382,21 +383,21 @@ public partial class Wages_list : System.Web.UI.Page for (int i = 0; i < gjds.Tables[0].Rows.Count; i++) { - dt.Columns.Add("fy" +i); + dt.Columns.Add("fy" + i); } foreach (DataRow dr in dt.Rows) { for (int j = 0; j < gjds.Tables[0].Rows.Count; j++) { - double gjjg=0; - DataSet gzds=DBHlper.Execute("select isnull(gjjg,0) from nr_z_cpkc_gj where gjmc='"+gjds.Tables[0].Rows[j]["mingcheng"]+"' and cpid='"+dr["id"]+"'"); - if(gzds!=null&gzds.Tables[0].Rows.Count>0) - { - gjjg= Convert.ToDouble(gzds.Tables[0].Rows[0][0]); - } - dr["fy" + j] = gjjg; - + double gjjg = 0; + DataSet gzds = DBHlper.Execute("select isnull(gjjg,0) from nr_z_cpkc_gj where gjmc='" + gjds.Tables[0].Rows[j]["mingcheng"] + "' and cpid='" + dr["id"] + "'"); + if (gzds != null & gzds.Tables[0].Rows.Count > 0) + { + gjjg = Convert.ToDouble(gzds.Tables[0].Rows[0][0]); + } + dr["fy" + j] = gjjg; + } } @@ -405,7 +406,7 @@ public partial class Wages_list : System.Web.UI.Page - DBHlper.ExportByWeb(dt, "工价档案信息"+DateTime.Now, sList); + DBHlper.ExportByWeb(dt, "工价档案信息" + DateTime.Now, sList); } #endregion #region 汇总 diff --git a/newyt/Module_data/WorkRecord_browse.aspx b/newyt/Module_data/WorkRecord_browse.aspx index aa2c31c..728472e 100644 --- a/newyt/Module_data/WorkRecord_browse.aspx +++ b/newyt/Module_data/WorkRecord_browse.aspx @@ -19,6 +19,7 @@ "); - } + } } protected void scxfbt_Click(object sender, EventArgs e) @@ -406,7 +415,7 @@ public partial class WorkRecord_browse : CommonPage int xfz = 0; foreach (string r in xfgxhd.Value.Split(',')) { - xfz = DBHlper.excutecmd("insert into nr_z_scdj_xf (dqgx,xfgx,xfsl,czr,bz,zt,scxmid,xfsj) values ('" + gyxx.SelectedItem.Text + "','" + r+ "','" + xfsl.Value + "','" + xfczr.Value + "','" + xfbz.Value + "','待接收','" + id.Value +"','"+DateTime.Now+ "')"); + xfz = DBHlper.excutecmd("insert into nr_z_scdj_xf (dqgx,xfgx,xfsl,czr,bz,zt,scxmid,xfsj) values ('" + gyxx.SelectedItem.Text + "','" + r + "','" + xfsl.Value + "','" + xfczr.Value + "','" + xfbz.Value + "','待接收','" + id.Value + "','" + DateTime.Now + "')"); } if (xfz > 0) { @@ -415,10 +424,10 @@ public partial class WorkRecord_browse : CommonPage rizhi.leixing = "生产登记"; rizhi.yonghuming = xfczr.Value; //拼接字符串插入日志 - rizhi.jilu = xfczr.Value + "进行了生产下发:从" + gyxx.SelectedItem.Text + ",下发到:" + xfgxhd.Value + ";下发数量为" + xfsl.Value+";"; + rizhi.jilu = xfczr.Value + "进行了生产下发:从" + gyxx.SelectedItem.Text + ",下发到:" + xfgxhd.Value + ";下发数量为" + xfsl.Value + ";"; rizhibll.Add(rizhi); Response.Write(""); - + } } protected void sctqkc_Click(object sender, EventArgs e) @@ -436,11 +445,11 @@ public partial class WorkRecord_browse : CommonPage { upsql = "update nr_z_scd_cp_tqkc set bdzt='1' where xmid='" + id.Value + "'"; } - int updz=DBHlper.excutecmd(upsql); - if(updz>0) + int updz = DBHlper.excutecmd(upsql); + if (updz > 0) { - Response.Write(""); + Response.Write(""); } } -} \ No newline at end of file +} \ No newline at end of file