82 lines
2.8 KiB
C#
82 lines
2.8 KiB
C#
namespace FineUIPro.Web.HJGL.DataIn
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using BLL;
|
|
|
|
public partial class DrawingRecognitionContentEdit : PageBase
|
|
{
|
|
#region 定义项
|
|
/// <summary>
|
|
/// 临时表主键
|
|
/// </summary>
|
|
public static Dictionary<string, DataTable> dicDt = new Dictionary<string, DataTable>();
|
|
public int Index
|
|
{
|
|
get
|
|
{
|
|
return (int)ViewState["Index"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["Index"] = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 加载页面
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.Index = int.Parse(Request.Params["Index"]);
|
|
DataTable dt = dicDt[CurrUser.PersonId];
|
|
var dataInTemp = dt.Rows[this.Index];
|
|
if (dataInTemp != null)
|
|
{
|
|
this.txtPipeNo.Text = dataInTemp["pipe_no"].ToString();
|
|
this.txtDrawingNumber.Text = dataInTemp["drawing_number"].ToString();
|
|
this.txtCategory.Text = dataInTemp["category"].ToString();
|
|
this.txtQty.Text = dataInTemp["qty"].ToString();
|
|
this.txtSpec.Text = dataInTemp["spec"].ToString();
|
|
this.txtPageNo.Text = dataInTemp["page_no"].ToString();
|
|
this.txtDescription.Text = dataInTemp["description"].ToString();
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 提交按钮
|
|
/// <summary>
|
|
/// 提交按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
|
{
|
|
DataTable dt = dicDt[CurrUser.PersonId];
|
|
var dataInTemp = dt.Rows[this.Index];
|
|
dataInTemp["pipe_no"] = this.txtPipeNo.Text;
|
|
dataInTemp["drawing_number"] = this.txtDrawingNumber.Text;
|
|
dataInTemp["category"] = this.txtCategory.Text;
|
|
dataInTemp["qty"] = this.txtQty.Text;
|
|
dataInTemp["spec"] = this.txtSpec.Text;
|
|
dataInTemp["page_no"] = this.txtPageNo.Text;
|
|
dataInTemp["description"] = this.txtDescription;
|
|
Alert.ShowInTop("信息修改完成!", MessageBoxIcon.Success);
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
dicDt.Remove(CurrUser.PersonId);
|
|
}
|
|
#endregion
|
|
}
|
|
} |