feat: 完善材料条码与焊接业务功能
This commit is contained in:
@@ -66,6 +66,8 @@ namespace FineUIPro.Web.CLGL
|
||||
Grid2.DataBind();
|
||||
Grid3.DataSource = null;
|
||||
Grid3.DataBind();
|
||||
GridPipeDetail.DataSource = null;
|
||||
GridPipeDetail.DataBind();
|
||||
}
|
||||
private void BindDetailGrid(string inputMasterId)
|
||||
{
|
||||
@@ -100,10 +102,22 @@ namespace FineUIPro.Web.CLGL
|
||||
{
|
||||
Model.Tw_InputDetailBarCodeOutput table = new Model.Tw_InputDetailBarCodeOutput();
|
||||
table.InputMasterId = inputMasterId;
|
||||
table.MaterialCode = txtBarCodeMaterialCode.Text.Trim();
|
||||
var tb = BLL.TwInputdetailBarCodeService.GetListData(table, Grid3);
|
||||
Grid3.DataSource = tb;
|
||||
Grid3.DataBind();
|
||||
}
|
||||
|
||||
private void BindPipeDetailGrid(string inputMasterId)
|
||||
{
|
||||
var table = new Model.Tw_InOutDetailOutput
|
||||
{
|
||||
InputMasterId = inputMasterId,
|
||||
MaterialCode = txtPipeMaterialCode.Text.Trim()
|
||||
};
|
||||
GridPipeDetail.DataSource = BLL.TwInputdetailService.GetPipeListData(table);
|
||||
GridPipeDetail.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GV 数据操作
|
||||
@@ -146,6 +160,7 @@ namespace FineUIPro.Web.CLGL
|
||||
string ID = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
BindDetailGrid(ID);
|
||||
BindBarCodeGrid(ID);
|
||||
BindPipeDetailGrid(ID);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -350,6 +365,46 @@ namespace FineUIPro.Web.CLGL
|
||||
}
|
||||
}
|
||||
|
||||
protected void GridPipeDetail_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName != "btnGenerateBarCode")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string barCode = TwInputdetailBarCodeService.AddNextByInputDetailId(e.RowID);
|
||||
BindPipeDetailGrid(Grid1.SelectedRowID);
|
||||
BindBarCodeGrid(Grid1.SelectedRowID);
|
||||
ShowNotify("新条码已生成:" + barCode, MessageBoxIcon.Success);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify(ex.Message, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSearchPipeDetail_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
ShowNotify("请先选择一张入库单。", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
BindPipeDetailGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
|
||||
protected void btnSearchBarCodeDetail_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
ShowNotify("请先选择一张入库单。", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
BindBarCodeGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
|
||||
protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
@@ -359,6 +414,10 @@ namespace FineUIPro.Web.CLGL
|
||||
BindDetailGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
else if (TabStrip1.ActiveTabIndex == 1)
|
||||
{
|
||||
BindPipeDetailGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
else if (TabStrip1.ActiveTabIndex == 2)
|
||||
{
|
||||
BindBarCodeGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user