82 lines
3.4 KiB
C#
82 lines
3.4 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_sg_dy : System.Web.UI.Page
|
|
{
|
|
//创建一个共用的申购单bll
|
|
Maticsoft.BLL.nr_z_shengoudan sgdbll = new Maticsoft.BLL.nr_z_shengoudan();
|
|
//创建一个申购单模板
|
|
Maticsoft.Model.nr_z_shengoudan sgdmodel = new Maticsoft.Model.nr_z_shengoudan();
|
|
//创建一个操作记录模板
|
|
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(id.Value);
|
|
}
|
|
}
|
|
#region 获取真正数据值
|
|
private void initdata(string did)
|
|
{
|
|
DataTable dtsgd = DBHlper.Execute("select * from view_nr_z_shengoudan where id=" + did).Tables[0];
|
|
if (dtsgd != null)
|
|
{
|
|
id.Value = dtsgd.Rows[0]["id"].ToString();
|
|
bh.Text = dtsgd.Rows[0]["sgdbianhao"].ToString();
|
|
txt_shengchandan.Text = dtsgd.Rows[0]["scdbh"].ToString();
|
|
txt_sgriqi.Text = DateTime.Parse(dtsgd.Rows[0]["riqi"].ToString()).ToString("yyyy-MM-dd HH:mm");
|
|
txt_wlbianhao.Text = dtsgd.Rows[0]["wlbh"].ToString();
|
|
txt_wlmingcheng.Text = dtsgd.Rows[0]["mingcheng"].ToString();
|
|
txt_wlpinpai.Text = dtsgd.Rows[0]["pinpai"].ToString();
|
|
txt_wlchangdu.Text = dtsgd.Rows[0]["changdu"].ToString();
|
|
txt_wlkuaidu.Text = dtsgd.Rows[0]["kuandu"].ToString();
|
|
txt_yhriqi.Text = DateTime.Parse(dtsgd.Rows[0]["yhriqi"].ToString()).ToString("yyyy-MM-dd");
|
|
txt_qxshuliang.Text = dtsgd.Rows[0]["xuqiushuliang"].ToString();
|
|
txt_kucun.Text = dtsgd.Rows[0]["kucun"].ToString();
|
|
txt_shengoushu.Text = dtsgd.Rows[0]["shengoushu"].ToString();
|
|
txt_shengouren.Text = dtsgd.Rows[0]["shengouren"].ToString();
|
|
lbl_zt.Text = dtsgd.Rows[0]["zt"].ToString();
|
|
txt_beizhu.Text = dtsgd.Rows[0]["beizhu"].ToString();
|
|
cgzt.Text = dtsgd.Rows[0]["cgzt"].ToString();
|
|
txt_danwei.Text = dtsgd.Rows[0]["danwei"].ToString();
|
|
}
|
|
}
|
|
#endregion
|
|
protected void bt_tj_Click(object sender, EventArgs e)
|
|
{
|
|
Response.Redirect("DemandSheet_Form.aspx?uid=" + id.Value);
|
|
}
|
|
protected void Button2_Click(object sender, EventArgs e)
|
|
{
|
|
Response.Redirect("DemandSheet_Form.aspx?fid=" + id.Value);
|
|
}
|
|
} |