SGGL_SHJ/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivideEdit.aspx.cs

46 lines
1.6 KiB
C#

using BLL;
using System;
namespace FineUIPro.Web.HJGL.PreDesign
{
public partial class PipelingDivideEdit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string pipelineId = Request.Params["PipelineId"];
if (!string.IsNullOrEmpty(pipelineId))
{
var pipe = BLL.PipelineService.GetPipelineByPipelineId(pipelineId);
lbPipelineCode.Text = pipe.PipelineCode;
if (!string.IsNullOrEmpty(pipe.PipeArea))
{
drpPipeArea.SelectedValue = pipe.PipeArea;
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipelingDivideMenuId, Const.BtnSave))
{
if (drpPipeArea.SelectedValue != "0" && !string.IsNullOrEmpty(Request.Params["PipelineId"]))
{
BLL.PipelineService.UpdatePipelineArea(Request.Params["PipelineId"], drpPipeArea.SelectedValue);
}
else
{
ShowNotify("请选择划分项!", MessageBoxIcon.Warning);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
}
}