提交试车代码
This commit is contained in:
@@ -81,7 +81,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
{
|
||||
QuestionEditImg = 0;
|
||||
//施工单位
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(ddlResponsibilityUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_1, false);
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(ddlResponsibilityUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false);
|
||||
//获取人员信息
|
||||
var userList = from user in Funs.DB.Sys_User
|
||||
join projectrole in Funs.DB.Project_ProjectUser on user.UserId equals projectrole.UserId
|
||||
@@ -156,31 +156,49 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
/// </summary>
|
||||
public void gvDataBrid()
|
||||
{
|
||||
string strSql = @"select a.ConfirmId,a.ProjectId,a.DecisionId,a.ConfirmDesc,a.ConfirmTime,a.ConfirmUser,b.UserName as ConfirmUserName,a.ConfirmType,(case a.ConfirmType when 1 then '责任人确认' when 2 then '提出人确认' when 3 then '总包确认' when 4 then '监理确认' when 5 then '业主确认' else '' end) as ConfirmTypeName,a.ConfirmState,(case a.ConfirmState when 1 then '确认通过' when 2 then '确认退回' else '' end) as ConfirmStateName,a.AddUser,a.AddTime from PreRun_DecisionConfirmRecords as a left join Sys_User as b on a.ConfirmUser=b.UserId where a.ProjectId=@ProjectId and a.DecisionId=@DecisionId ";
|
||||
string strSql = @"select a.ConfirmId,a.ProjectId,a.DecisionId,a.ConfirmDesc,a.ConfirmTime,a.ConfirmUser,b.UserName as ConfirmUserName,a.ConfirmType,(case a.ConfirmType when 1 then '提出人处理' when 2 then '责任人确认' when 3 then '提出人确认' when 4 then '总包确认' when 5 then '监理确认' when 6 then '业主确认' else '' end) as ConfirmTypeName,a.ConfirmState,(case a.ConfirmState when 1 then '确认通过' when 2 then '确认退回' else '' end) as ConfirmStateName,a.AddUser,a.AddTime from PreRun_DecisionConfirmRecords as a left join Sys_User as b on a.ConfirmUser=b.UserId where a.ProjectId=@ProjectId and a.DecisionId=@DecisionId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@DecisionId", this.DecisionId));
|
||||
strSql += " order by a.AddTime asc";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
//提出人处理
|
||||
var tcrclTb = tb.AsEnumerable().Where(row => row.Field<int>("ConfirmType") == 1);
|
||||
gvTcrcl.DataSource = tcrclTb;
|
||||
gvTcrcl.DataBind();
|
||||
//提出人确认
|
||||
var tcrqrTb = tb.AsEnumerable().Where(row => row.Field<int>("ConfirmType") == 3);
|
||||
gvTcrqr.DataSource = tcrqrTb;
|
||||
gvTcrqr.DataBind();
|
||||
//责任人确认
|
||||
var handleTb = tb.AsEnumerable().Where(row => row.Field<int>("ConfirmType") == 1);
|
||||
gvZrrConfirm.DataSource = handleTb;
|
||||
var zrrqrTb = tb.AsEnumerable().Where(row => row.Field<int>("ConfirmType") == 2);
|
||||
gvZrrConfirm.DataSource = zrrqrTb;
|
||||
gvZrrConfirm.DataBind();
|
||||
//其他人员确认
|
||||
var approveTb = tb.AsEnumerable().Where(row => row.Field<int>("ConfirmType") != 1);
|
||||
int[] type = { 4, 5, 6 };
|
||||
var approveTb = tb.AsEnumerable().Where(row => type.Contains(row.Field<int>("ConfirmType")));
|
||||
gvOtherConfirm.DataSource = approveTb;
|
||||
gvOtherConfirm.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 问题图片
|
||||
/// 问题图片查看
|
||||
/// </summary>
|
||||
protected void BtnQuestionFile_Click(object sender, EventArgs e)
|
||||
protected void imgBtnQuestionFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", QuestionEditImg, this.DecisionId + "q", Const.InspectTailTerm)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CheckControl&menuId={1}", this.DecisionId + "q", Const.InspectTailTerm)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 整改图片查看
|
||||
/// </summary>
|
||||
protected void imgBtnRectifyFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CheckControl&menuId={1}", this.DecisionId + "h", Const.InspectTailTerm)));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
@@ -238,7 +256,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
model.RestrictCondition = txtRestrictCondition.Text;
|
||||
model.AddUser = this.CurrUser.LoginProjectId;
|
||||
model.AddTime = DateTime.Now;
|
||||
model.ResponsibilityConfirm = 0;
|
||||
model.ResponsibilityProposeSatate = 0;
|
||||
if (isAdd)
|
||||
{
|
||||
Funs.DB.PreRun_SubThreeChecksFourDecision.InsertOnSubmit(model);
|
||||
@@ -249,7 +267,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存并提交
|
||||
/// 保存并提交提出人处理
|
||||
/// </summary>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -305,7 +323,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
||||
model.RestrictCondition = txtRestrictCondition.Text;
|
||||
model.AddUser = this.CurrUser.LoginProjectId;
|
||||
model.AddTime = DateTime.Now;
|
||||
model.ResponsibilityConfirm = 1;
|
||||
model.ResponsibilityProposeSatate = 1;
|
||||
if (isAdd)
|
||||
{
|
||||
Funs.DB.PreRun_SubThreeChecksFourDecision.InsertOnSubmit(model);
|
||||
|
||||
Reference in New Issue
Block a user