115 lines
5.0 KiB
C#
115 lines
5.0 KiB
C#
|
|
using BLL;
|
|||
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace FineUIPro.Web.CQMS.Plan
|
|||
|
|
{
|
|||
|
|
public partial class TechnicalProposalReviewEdit : PageBase
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 主键
|
|||
|
|
/// </summary>
|
|||
|
|
public string TechnicalProposalReviewId
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return (string)ViewState["TechnicalProposalReviewId"];
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
ViewState["TechnicalProposalReviewId"] = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (!IsPostBack)
|
|||
|
|
{
|
|||
|
|
TechnicalProposalReviewId = Request.Params["TechnicalProposalReviewId"];
|
|||
|
|
SitePerson_PersonService.InitProjectUserListByProjectUnitTypeDropDownList(drpCompileMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1, true);
|
|||
|
|
if (!string.IsNullOrEmpty(TechnicalProposalReviewId))
|
|||
|
|
{
|
|||
|
|
hdId.Text = this.TechnicalProposalReviewId;
|
|||
|
|
Model.Plan_TechnicalProposalReview TechnicalProposalReview = BLL.CQMS_TechnicalProposalReviewService.GetTechnicalProposalReviewByTechnicalProposalReviewId(TechnicalProposalReviewId);
|
|||
|
|
this.txtCode.Text = TechnicalProposalReview.Code;
|
|||
|
|
this.txtName.Text = TechnicalProposalReview.Name;
|
|||
|
|
if (!string.IsNullOrEmpty(TechnicalProposalReview.CompileMan))
|
|||
|
|
{
|
|||
|
|
this.drpCompileMan.SelectedValue = TechnicalProposalReview.CompileMan;
|
|||
|
|
}
|
|||
|
|
if (TechnicalProposalReview.CompileDate != null)
|
|||
|
|
{
|
|||
|
|
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TechnicalProposalReview.CompileDate);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
this.drpCompileMan.SelectedValue = this.CurrUser.PersonId;
|
|||
|
|
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void imgBtnFile_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (string.IsNullOrEmpty(hdId.Text))
|
|||
|
|
{
|
|||
|
|
hdId.Text = SQLHelper.GetNewID();
|
|||
|
|
}
|
|||
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/CQMS/Plan&menuId={1}", hdId.Text, BLL.Const.TechnicalProposalReviewMenuId)));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (this.drpCompileMan.SelectedValue == BLL.Const._Null)
|
|||
|
|
{
|
|||
|
|
Alert.ShowInTop("请选择编制人!", MessageBoxIcon.Warning);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
Saveinspection("save");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 保存
|
|||
|
|
/// </summary>
|
|||
|
|
public void Saveinspection(string saveType)
|
|||
|
|
{
|
|||
|
|
Model.Plan_TechnicalProposalReview TechnicalProposalReview = new Model.Plan_TechnicalProposalReview();
|
|||
|
|
TechnicalProposalReview.ProjectId = this.CurrUser.LoginProjectId;
|
|||
|
|
TechnicalProposalReview.Code = this.txtCode.Text.Trim();
|
|||
|
|
TechnicalProposalReview.Name = this.txtName.Text.Trim();
|
|||
|
|
TechnicalProposalReview.CompileMan = this.drpCompileMan.SelectedValue;
|
|||
|
|
TechnicalProposalReview.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
|
|||
|
|
if (!string.IsNullOrEmpty(this.TechnicalProposalReviewId))
|
|||
|
|
{
|
|||
|
|
TechnicalProposalReview.TechnicalProposalReviewId = this.TechnicalProposalReviewId;
|
|||
|
|
CQMS_TechnicalProposalReviewService.UpdateTechnicalProposalReview(TechnicalProposalReview);
|
|||
|
|
BLL.NoticeService.DeleteUserRead(this.TechnicalProposalReviewId);
|
|||
|
|
LogService.AddSys_Log(CurrUser, TechnicalProposalReview.Code, TechnicalProposalReview.TechnicalProposalReviewId, Const.TechnicalProposalReviewMenuId, "修改项目技术方案评审");
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (string.IsNullOrEmpty(hdId.Text))
|
|||
|
|
{
|
|||
|
|
TechnicalProposalReview.TechnicalProposalReviewId = SQLHelper.GetNewID();
|
|||
|
|
TechnicalProposalReviewId = TechnicalProposalReview.TechnicalProposalReviewId;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
TechnicalProposalReview.TechnicalProposalReviewId = hdId.Text;
|
|||
|
|
}
|
|||
|
|
CQMS_TechnicalProposalReviewService.AddTechnicalProposalReview(TechnicalProposalReview);
|
|||
|
|
LogService.AddSys_Log(CurrUser, TechnicalProposalReview.Code, TechnicalProposalReview.TechnicalProposalReviewId, Const.TechnicalProposalReviewMenuId, "增加项目技术方案评审");
|
|||
|
|
}
|
|||
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|