CeramicProject/newyt/Common/cpck_dy.aspx.cs

72 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class Common_cpck_dy : System.Web.UI.Page
{
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
Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi();
public string userinfo = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dtuserinfo = DBHlper.Execute("select mingcheng,logourl from nr_sysuserinfo").Tables[0];
if (dtuserinfo.Rows.Count > 0)
{
userinfo = dtuserinfo.Rows[0]["mingcheng"].ToString();
img_logo.Src = "../UseFile/" + dtuserinfo.Rows[0]["logourl"].ToString();
}
else
{
img_logo.Visible = false;
}
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"] != "")
{
id.Value = Request.QueryString["uid"].ToString();
}
initdata(Convert.ToInt32(id.Value));
}
}
#region
private void initdata(int did)
{
cpckmodel = cpckbll.GetModel(did);
ckdh.Text = cpckmodel.ckbh;
riqi.Text = Convert.ToDateTime(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;
}
#endregion
}