2023-09-11
This commit is contained in:
@@ -26,15 +26,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PackagingManageId = Request.Params["PackagingManageId"];
|
||||
|
||||
HJGL_PipelineComponentService.InitPipelineDownList(drpPipelineComponentCode, this.CurrUser.LoginProjectId, false);
|
||||
//HJGL_PipelineComponentService.InitPipelineDownList(drpPipelineComponentCode, this.CurrUser.LoginProjectId, false);
|
||||
BindGrid();
|
||||
HJGL_PackagingmanageService.InitPipelineDownList(txtPackagingCode, this.CurrUser.LoginProjectId, false);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
if (!string.IsNullOrEmpty(PackagingManageId))
|
||||
{
|
||||
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
|
||||
txtPackagingCode.SelectedValue = model.PackagingCode;
|
||||
drpPipelineComponentCode.SelectedValueArray = model.PipelineComponentId.Split(',');
|
||||
dropPipelineComponentCode.Values = model.PipelineComponentId.Split(',');
|
||||
txtStackingPosition.Text = model.StackingPosition;
|
||||
txtContactName.Text = model.ContactName;
|
||||
txtContactPhone.Text = model.ContactPhone;
|
||||
@@ -51,26 +51,33 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue))
|
||||
{
|
||||
var model_Component = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(drpPipelineComponentCode.SelectedValue);
|
||||
var model_pipe=BLL.PipelineService.GetPipelineByPipelineId(model_Component.PipelineId);
|
||||
txtPlanStartDate.Text= model_Component.PlanStartDate.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
txtPlanStartDate.Text =String.Empty;
|
||||
|
||||
}
|
||||
|
||||
Grid1.DataSource = HJGL_PipelineComponentService.GetAcceptedPipelineComponent(CurrUser.LoginProjectId,
|
||||
txtpipelineCode.Text.Trim(), txtpipelineComponentCode.Text.Trim(), txtflowingSection.Text.Trim());
|
||||
Grid1 .DataBind();
|
||||
}
|
||||
|
||||
//protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue))
|
||||
// {
|
||||
// var model_Component = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(drpPipelineComponentCode.SelectedValue);
|
||||
// var model_pipe=BLL.PipelineService.GetPipelineByPipelineId(model_Component.PipelineId);
|
||||
// txtPlanStartDate.Text= model_Component.PlanStartDate.ToString();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// txtPlanStartDate.Text =String.Empty;
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(drpPipelineComponentCode.SelectedValue))
|
||||
if (dropPipelineComponentCode.Values.Length==0)
|
||||
{
|
||||
ShowNotify("请选择预制组件", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -82,7 +89,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
table.PackagingManageId = SQLHelper.GetNewID();
|
||||
table.PackagingCode = txtPackagingCode.Text;
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
table.PipelineComponentId = string.Join(",", drpPipelineComponentCode.SelectedValueArray);
|
||||
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
||||
table.StackingPosition = txtStackingPosition.Text;
|
||||
table.State = 0;
|
||||
table.ContactName = txtContactName.Text;
|
||||
@@ -96,7 +103,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
table.PackagingCode = txtPackagingCode.Text;
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
table.PipelineComponentId = string.Join(",", drpPipelineComponentCode.SelectedValueArray);
|
||||
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
||||
table.StackingPosition = txtStackingPosition.Text ;
|
||||
table.State = 0;
|
||||
table.ContactName = txtContactName.Text;
|
||||
@@ -107,5 +114,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
protected void btnFind_Click1(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user