94 lines
3.2 KiB
C#
94 lines
3.2 KiB
C#
using BLL;
|
|
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web.UI.WebControls;
|
|
using AspNet = System.Web.UI.WebControls;
|
|
|
|
namespace FineUIPro.Web.CQMS.PersonManage
|
|
{
|
|
public partial class TestRecordView : PageBase
|
|
{
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
public string TestPlanId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["TestPlanId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["TestPlanId"] = value;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 办理类型
|
|
/// </summary>
|
|
public string State
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["State"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["State"] = value;
|
|
}
|
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.drpWelder.DataTextField = "PersonName";
|
|
this.drpWelder.DataValueField = "PersonId";
|
|
this.drpWelder.DataSource = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.IsWeldAudit == true select x).ToList();
|
|
this.drpWelder.DataBind();
|
|
Funs.FineUIPleaseSelect(this.drpWelder);
|
|
TestPlanId = Request.Params["TestPlanId"];
|
|
if (!string.IsNullOrEmpty(TestPlanId))
|
|
{
|
|
Model.Welder_TestPlan TestPlan = BLL.CQMS_TestPlanService.GetTestPlanByTestPlanId(TestPlanId);
|
|
txtTestPlanCode.Text = TestPlan.TestPlanCode;
|
|
if (TestPlan.PlanTestDate != null)
|
|
{
|
|
txtPlanTestDate.Text = string.Format("{0:yyyy-MM-dd}", TestPlan.PlanTestDate);
|
|
}
|
|
var list = BLL.CQMS_TestPlanDetailService.getListData(this.TestPlanId);
|
|
List<string> strs = BLL.CQMS_TestPlanDetailService.getPersonIdList(this.TestPlanId);
|
|
if (strs.Count > 0)
|
|
{
|
|
this.drpWelder.SelectedValueArray = strs.ToArray();
|
|
}
|
|
if (TestPlan.RealTestDate != null)
|
|
{
|
|
txtRealTestDate.Text = string.Format("{0:yyyy-MM-dd}", TestPlan.RealTestDate);
|
|
}
|
|
Grid1.DataSource = list;
|
|
Grid1.DataBind();
|
|
}
|
|
else
|
|
{
|
|
string prefix = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId) + "-HGKS-";
|
|
txtTestPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "Welder_TestPlan", "TestPlanCode", prefix);
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
} |