131 lines
5.4 KiB
C#
131 lines
5.4 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;
|
|
|
|
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;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
////权限按钮方法
|
|
this.GetButtonPower();
|
|
this.BidDocumentsStandingBookId = Request.Params["BidDocumentsStandingBookId"];
|
|
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;
|
|
if (model.IsOnLine.HasValue)
|
|
{
|
|
this.txtIsOnLine.Text = model.IsOnLine.Value.ToString();
|
|
}
|
|
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;
|
|
if (model.Bidding_SendTime != null)
|
|
{
|
|
this.txtBidding_SendTime.Text = string.Format("{0:yyyy-MM-dd}", model.Bidding_SendTime);
|
|
}
|
|
if (model.Bidding_StartTime != null)
|
|
{
|
|
this.txtBidding_StartTime.Text = string.Format("{0:yyyy-MM-dd}", model.Bidding_StartTime);
|
|
}
|
|
this.txtApprovePersonFormCode.Text = model.ApprovePersonFormCode;
|
|
this.txtBidWinner.Text = model.BidWinner;
|
|
this.txtSetSubReviewCode.Text = model.SetSubReviewCode;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <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.EPCCode = this.txtEPCCode.Text;
|
|
table.ProjectShortName = this.txtProjectShortName.Text;
|
|
table.ProjectCode = this.txtProjectCode.Text;
|
|
table.IsOnLine = Funs.GetNewInt(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.SelectedDate;
|
|
table.Bidding_StartTime = this.txtBidding_StartTime.SelectedDate;
|
|
table.ApprovePersonFormCode = this.txtApprovePersonFormCode.Text;
|
|
table.BidWinner = this.txtBidWinner.Text;
|
|
table.SetSubReviewCode = this.txtSetSubReviewCode.Text;
|
|
if (string.IsNullOrEmpty(this.BidDocumentsStandingBookId))
|
|
{
|
|
table.BidDocumentsStandingBookId = SQLHelper.GetNewID(typeof(Model.PHTGL_BidDocumentsStandingBook));
|
|
BLL.BidDocStandingBookService.AddPHTGL_BidDocumentsStandingBook(table);
|
|
|
|
}
|
|
else
|
|
{
|
|
table.BidDocumentsStandingBookId = this.BidDocumentsStandingBookId;
|
|
BLL.BidDocStandingBookService.UpdatePHTGL_BidDocumentsStandingBook(table);
|
|
}
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
}
|
|
|
|
#region 获取按钮权限
|
|
/// <summary>
|
|
/// 获取按钮权限
|
|
/// </summary>
|
|
/// <param name="button"></param>
|
|
/// <returns></returns>
|
|
private void GetButtonPower()
|
|
{
|
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.BidDocumentsStandingBookMenuId);
|
|
if (buttonList.Count() > 0)
|
|
{
|
|
if (buttonList.Contains(BLL.Const.BtnSave))
|
|
{
|
|
this.btnSave.Hidden = false;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
} |