using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Maticsoft.BLL; using System.Data; using System.Data.SqlClient; using Ajax; public partial class Wages_browse : CommonPage { //创建一个共用的编码bll层 Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma(); //创建一个共用的类型BLL层 Maticsoft.BLL.nr_sys_leixing bmlx = new Maticsoft.BLL.nr_sys_leixing(); //创建一个共用的工价档案bll层 Maticsoft.BLL.nr_z_cpkc_gj gjdabll = new Maticsoft.BLL.nr_z_cpkc_gj(); //创建一个共用的工价档案 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.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi(); protected void Page_Load(object sender, EventArgs e) { Utility.RegisterTypeForAjax(typeof(Wages_browse)); if (!IsPostBack) { if (Session["user"] == null) { Response.Redirect("../index.aspx"); } //获取角色权限 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); } else { pdquanxian(user.juese); } } } #region 修改时获取真正数据值 private void initdata(string 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(); cpmc.Value = ds.Tables[0].Rows[0]["cpmc"].ToString(); cpzl.Value = ds.Tables[0].Rows[0]["zl"].ToString(); 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='后段工价'"); if (gjds != null && gjds.Tables[0].Rows.Count > 0) { //修改页面时,首先吧项目明细的表头加载出来 string biao = "
" + r["mingcheng"] + " | "; if (x == 6) { biao += " |   | " + " | "; } biao += " |   | "; } gjxx.InnerHtml = biao + "