焊接修改

This commit is contained in:
2025-05-08 18:38:55 +08:00
parent 23f7bfbb1d
commit 3a36b8e3ef
38 changed files with 3717 additions and 341 deletions
@@ -26,29 +26,37 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!IsPostBack)
{
PackagingManageId = Request.Params["PackagingManageId"];
//HJGL_PipelineComponentService.InitPipelineDownList(drpPipelineComponentCode, this.CurrUser.LoginProjectId, false);
TrainNumberManageService.InitDownListOfTrainNumber(drpTrainNumber, this.CurrUser.LoginProjectId, false);
drpTypeInt.DataTextField = "Key";
drpTypeInt.DataValueField = "Value";
drpTypeInt.DataSource = HJGL_PackagingmanageService.TypeIntMap;
drpTypeInt.DataBind();
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.Text = model.PackagingCode;
dropPipelineComponentCode.Values = model.PipelineComponentId.Split(',');
txtStackingPosition.Text = model.StackingPosition;
txtContactName.Text = model.ContactName;
txtContactPhone.Text = model.ContactPhone;
txtTrainNumber.Text = model.TrainNumber;
dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(',');
txtStackingPosition.Text = model.StackingPosition;
drpTrainNumber.SelectedValue = model.TrainNumberId;
drpTypeInt.SelectedValue = model.TypeInt.ToString();
BindGrid2(this.PackagingManageId);
if (model.State== HJGL_PackagingmanageService.state_0)
{
btnSave.Hidden = false;
}
}
else
{btnSave.Hidden = false;
{
btnSave.Hidden = false;
txtPackagingCode.Text = ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId)+"-"+ string.Format("{0:yyyyMMdd}", DateTime.Now)+"-";
}
drpTypeInt_SelectedIndexChanged(null, null);
}
}
@@ -60,6 +68,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
Grid1 .DataBind();
}
private void BindGrid2(string PackagingManageId)
{
Grid2.DataSource = PackagingmanagedetailService.GetPackagingData(PackagingManageId);
Grid2.DataBind();
}
//protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e)
//{
// if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue))
@@ -77,26 +91,35 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
protected void btnSave_Click(object sender, EventArgs e)
{
Save();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
private void Save()
{
/*if (dropPipelineComponentCode.Values.Length==0)
{
ShowNotify("请选择预制组件", MessageBoxIcon.Warning);
return;
}*/
if (string.IsNullOrEmpty(PackagingManageId))
{
Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage() ;
Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage();
table.PackagingManageId = SQLHelper.GetNewID();
table.PackagingCode = txtPackagingCode.Text;
table.ProjectId = this.CurrUser.LoginProjectId;
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
table.StackingPosition = txtStackingPosition.Text;
table.State = 0;
table.ContactName = txtContactName.Text;
table.ContactPhone = txtContactPhone.Text;
table.TrainNumber=txtTrainNumber.Text;
//table.ContactName = txtContactName.Text;
//table.ContactPhone = txtContactPhone.Text;
table.TrainNumberId = drpTrainNumber.SelectedValue;
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
if (drpTypeInt.SelectedValue == HJGL_PackagingmanageService.TypeInt..ToString())
{
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
}
BLL.HJGL_PackagingmanageService.AddHJGL_PackagingManage(table);
PackagingManageId= table.PackagingManageId;
}
else
{
@@ -105,22 +128,78 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
table.PackagingCode = txtPackagingCode.Text;
table.ProjectId = this.CurrUser.LoginProjectId;
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
table.StackingPosition = txtStackingPosition.Text ;
table.StackingPosition = txtStackingPosition.Text;
table.State = 0;
table.ContactName = txtContactName.Text;
table.ContactPhone =txtContactPhone.Text;
table.TrainNumber = txtTrainNumber.Text;
//table.ContactName = txtContactName.Text;
//table.ContactPhone =txtContactPhone.Text;
table.TrainNumberId = drpTrainNumber.SelectedValue;
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
if (drpTypeInt.SelectedValue == HJGL_PackagingmanageService.TypeInt..ToString())
{
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
}
}
BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table);
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
protected void btnFind_Click1(object sender, EventArgs e)
{
BindGrid();
}
#region
/// <summary>
/// 选择按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSelect_Click(object sender, EventArgs e)
{
Save();
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PackagingManageSelect.aspx?PackagingManageId={0}", PackagingManageId, "选择- ")));
}
protected void btnSelectStock_Click(object sender, EventArgs e)
{
Save();
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PackagingManageSelectStock.aspx?PackagingManageId={0}", PackagingManageId, "选择- ")));
}
#endregion
protected void drpTypeInt_SelectedIndexChanged(object sender, EventArgs e)
{
if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.).ToString())
{
dropPipelineComponentCode.Hidden=false;
Grid2.Hidden=true;
}
else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.).ToString())
{
dropPipelineComponentCode.Hidden = true;
Grid2.Hidden = false;
}
else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.).ToString())
{
dropPipelineComponentCode.Hidden = true;
Grid2.Hidden = false;
}
}
protected void Grid2_RowCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "delete")
{
string id = e.RowID;
PackagingmanagedetailService.DeleteById(id);
BindGrid2(this.PackagingManageId);
}
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid2(this.PackagingManageId);
}
}
}