387 lines
18 KiB
C#
387 lines
18 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using BLL;
|
|
using FineUIPro.Web.PHTGL.BiddingManagement;
|
|
|
|
namespace FineUIPro.Web.PHTGL.Filing
|
|
{
|
|
public partial class BidDocumentsStandingBookEdit: PageBase
|
|
{
|
|
#region
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
public string BidDocumentsStandingBookId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["BidDocumentsStandingBookId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["BidDocumentsStandingBookId"] = value;
|
|
}
|
|
}
|
|
public string Type
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["Type"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["Type"] = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference();
|
|
//BLL.PHTGL_SetSubReviewService.InitGetSetSubCompleteDropDownList(DropSetSubReviewCode, this.CurrUser.PersonId, this.CurrUser.LoginProjectId, false);
|
|
////权限按钮方法
|
|
this.BidDocumentsStandingBookId = Request.Params["BidDocumentsStandingBookId"];
|
|
Type = Request.Params["Type"];
|
|
|
|
this.GetButtonPower();
|
|
|
|
if (!string.IsNullOrEmpty(this.BidDocumentsStandingBookId))
|
|
{
|
|
Model.PHTGL_BidDocumentsStandingBook model = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(this.BidDocumentsStandingBookId);
|
|
if (model != null)
|
|
{
|
|
this.txtEPCCode.Text = model.EPCCode;
|
|
this.txtProjectShortName.Text = model.ProjectShortName;
|
|
this.txtProjectCode.Text = model.ProjectCode;
|
|
this.txtIsOnLine.Text = model.IsOnLine;
|
|
this.txtBidType.Text = model.BidType;
|
|
this.txtActionPlanCode.Text = model.ActionPlanCode;
|
|
this.txtBidDocumentsCode.Text = model.BidDocumentsCode;
|
|
this.txtBidProject.Text = model.BidProject;
|
|
this.txtShortListApprovalCode.Text = model.ShortListApprovalCode;
|
|
this.txtProposedInviter.Text = model.ProposedInviter;
|
|
this.txtBidding_SendTime.Text = model.Bidding_SendTime;
|
|
this.txtBidding_StartTime.Text = model.Bidding_StartTime;
|
|
this.txtApprovePersonFormCode.Text = model.ApprovePersonFormCode;
|
|
this.txtBidWinner.Text = model.BidWinner;
|
|
this.txtSetSubReviewCode.Text = model.SetSubReviewCode;
|
|
this.txtBidNoticeCode.Text=model.BidNoticeCode;
|
|
this.txtBidUnitFileCode.Text = model.BidUnitFileCode;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#region 保存提交
|
|
/// <summary>
|
|
/// 保存按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
|
{
|
|
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook();
|
|
table.UnitId = this.CurrUser.UnitId;
|
|
table.DepartId=this.CurrUser.DepartId;
|
|
table.EPCCode = this.txtEPCCode.Text;
|
|
table.ProjectShortName = this.txtProjectShortName.Text;
|
|
table.ProjectCode = this.txtProjectCode.Text;
|
|
table.IsOnLine = this.txtIsOnLine.Text;
|
|
table.BidType = this.txtBidType.Text;
|
|
table.ActionPlanCode = this.txtActionPlanCode.Text;
|
|
table.BidDocumentsCode = this.txtBidDocumentsCode.Text;
|
|
table.BidProject = this.txtBidProject.Text;
|
|
table.ShortListApprovalCode = this.txtShortListApprovalCode.Text;
|
|
table.ProposedInviter = this.txtProposedInviter.Text;
|
|
table.Bidding_SendTime = this.txtBidding_SendTime.Text;
|
|
table.Bidding_StartTime = this.txtBidding_StartTime.Text;
|
|
table.ApprovePersonFormCode = this.txtApprovePersonFormCode.Text;
|
|
table.BidWinner = this.txtBidWinner.Text;
|
|
table.SetSubReviewCode = this.txtSetSubReviewCode.Text;
|
|
table.State = 0;
|
|
table.BidNoticeCode=this.txtBidNoticeCode.Text;
|
|
table.BidUnitFileCode=this.txtBidUnitFileCode.Text;
|
|
if (Type == "1")
|
|
{
|
|
table.ProjectId = this.CurrUser.LoginProjectId;
|
|
|
|
}
|
|
if (string.IsNullOrEmpty(this.BidDocumentsStandingBookId))
|
|
{
|
|
table.BidDocumentsStandingBookId = SQLHelper.GetNewID(typeof(Model.PHTGL_BidDocumentsStandingBook));
|
|
BidDocumentsStandingBookId = table.BidDocumentsStandingBookId;
|
|
|
|
BLL.BidDocStandingBookService.AddPHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
else
|
|
{
|
|
table.BidDocumentsStandingBookId = this.BidDocumentsStandingBookId;
|
|
var q = BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(table.BidDocumentsStandingBookId);
|
|
if (q != null)
|
|
{
|
|
BLL.BidDocStandingBookService.UpdatePHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
else
|
|
{
|
|
BLL.BidDocStandingBookService.AddPHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
}
|
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
|
|
|
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
}
|
|
|
|
protected void btnSubmit_Click(object sender, EventArgs e)
|
|
{
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-BidUnit", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传中标单位投标文件,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-BidNotice", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传中标通知书,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-ActionPlan", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传实施计划文件,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-BidDocuments", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传招标文件,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-ApprovePersonForm", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传评委名单审批表文件,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-SetSubReview", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传确定中标人审批表文件,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (!BLL.AttachFileService.Getfile(BidDocumentsStandingBookId + "-ShortListApproval", BLL.Const.ProjectBidDocumentsStandingBookMenuId))
|
|
{
|
|
ShowNotify("未上传短名单审批表文件,无法提交!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook();
|
|
table.UnitId = this.CurrUser.UnitId;
|
|
table.DepartId = this.CurrUser.DepartId;
|
|
table.EPCCode = this.txtEPCCode.Text;
|
|
table.ProjectShortName = this.txtProjectShortName.Text;
|
|
table.ProjectCode = this.txtProjectCode.Text;
|
|
table.IsOnLine = this.txtIsOnLine.Text;
|
|
table.BidType = this.txtBidType.Text;
|
|
table.ActionPlanCode = this.txtActionPlanCode.Text;
|
|
table.BidDocumentsCode = this.txtBidDocumentsCode.Text;
|
|
table.BidProject = this.txtBidProject.Text;
|
|
table.ShortListApprovalCode = this.txtShortListApprovalCode.Text;
|
|
table.ProposedInviter = this.txtProposedInviter.Text;
|
|
table.Bidding_SendTime = this.txtBidding_SendTime.Text;
|
|
table.Bidding_StartTime = this.txtBidding_StartTime.Text;
|
|
table.ApprovePersonFormCode = this.txtApprovePersonFormCode.Text;
|
|
table.BidWinner = this.txtBidWinner.Text;
|
|
table.SetSubReviewCode = this.txtSetSubReviewCode.Text;
|
|
table.State = 1;
|
|
table.BidNoticeCode = this.txtBidNoticeCode.Text;
|
|
table.BidUnitFileCode = this.txtBidUnitFileCode.Text;
|
|
if (Type == "1")
|
|
{
|
|
table.ProjectId = this.CurrUser.LoginProjectId;
|
|
|
|
}
|
|
if (string.IsNullOrEmpty(this.BidDocumentsStandingBookId))
|
|
{
|
|
table.BidDocumentsStandingBookId = SQLHelper.GetNewID(typeof(Model.PHTGL_BidDocumentsStandingBook));
|
|
BLL.BidDocStandingBookService.AddPHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
else
|
|
{
|
|
table.BidDocumentsStandingBookId = this.BidDocumentsStandingBookId;
|
|
var q = BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(table.BidDocumentsStandingBookId);
|
|
if (q != null)
|
|
{
|
|
BLL.BidDocStandingBookService.UpdatePHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
else
|
|
{
|
|
BLL.BidDocStandingBookService.AddPHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
}
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取按钮权限
|
|
/// <summary>
|
|
/// 获取按钮权限
|
|
/// </summary>
|
|
/// <param name="button"></param>
|
|
/// <returns></returns>
|
|
private void GetButtonPower()
|
|
{
|
|
if (!string .IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
var q = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(BidDocumentsStandingBookId);
|
|
if (q != null&& q.State==1)
|
|
{
|
|
btnSave.Hidden = true;
|
|
btnSubmit.Hidden=true;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 附件上传
|
|
/// <summary>
|
|
/// 中标单位投标文件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl_BidUnit_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId+ "-BidUnit", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 中标通知书
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl_BidNotice_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId+ "-BidNotice", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 实施计划文件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl_ActionPlanCode_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId + "-ActionPlan", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
|
|
}
|
|
/// <summary>
|
|
/// 招标文件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
|
|
protected void btnAttachUrl_BidDocumentsCode_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId + "-BidDocuments", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 评委名单审批表文件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
|
|
protected void btnAttachUrl_ApprovePersonFormCode_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId + "-ApprovePersonForm", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 确定中标人审批表文件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
|
|
protected void btnAttachUrl_SetSubReviewCode_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId + "-SetSubReview", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 短名单审批表文件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl_ShortListApprovalCode_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(BidDocumentsStandingBookId))
|
|
{
|
|
BidDocumentsStandingBookId = Guid.NewGuid().ToString();
|
|
}
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}",
|
|
this.BidDocumentsStandingBookId + "-ShortListApproval", BLL.Const.ProjectBidDocumentsStandingBookMenuId)));
|
|
}
|
|
#endregion
|
|
|
|
//protected void DropSetSubReviewCode_SelectedIndexChanged(object sender, EventArgs e)
|
|
//{
|
|
// var _SetSub= BLL.PHTGL_SetSubReviewService.GetPHTGL_SetSubReviewBySetSubReviewCode(DropSetSubReviewCode.SelectedValue);
|
|
// var _BidApprove= PHTGL_BidApproveUserReviewService.GetPHTGL_BidApproveUserReviewById(_SetSub.ApproveUserReviewID);
|
|
// var _BidDoc = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(_BidApprove.BidDocumentsReviewId);
|
|
// var _ActPlan = BLL.PHTGL_ActionPlanFormationService.GetPHTGL_ActionPlanFormationById(_BidDoc.ActionPlanID);
|
|
// var _Project=BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
|
|
|
|
|
// this.txtEPCCode.Text = _ActPlan.EPCCode;
|
|
// this.txtProjectShortName.Text = _Project.ShortName;
|
|
// this.txtProjectCode.Text = _Project.ProjectCode;
|
|
// this.txtBidType.Text = _BidDoc.BidType;
|
|
// this.txtBidProject.Text = _ActPlan.BidProject;
|
|
// this.txtActionPlanCode.Text = _ActPlan.ActionPlanCode;
|
|
// this.txtBidDocumentsCode.Text = _BidDoc.BidDocumentsCode;
|
|
// if (_BidDoc.Bidding_SendTime != null)
|
|
// {
|
|
// this.txtBidding_SendTime.Text = string.Format("{0:yyyy-MM-dd}", _BidDoc.Bidding_SendTime);
|
|
// }
|
|
// if (_BidDoc.Bidding_StartTime != null)
|
|
// {
|
|
// this.txtBidding_StartTime.Text = string.Format("{0:yyyy-MM-dd}", _BidDoc.Bidding_StartTime);
|
|
// }
|
|
// //this.txtApprovePersonFormCode.Text = model.ApprovePersonFormCode;
|
|
// }
|
|
|
|
|
|
}
|
|
} |