This commit is contained in:
2024-10-21 15:49:55 +08:00
parent 569948f958
commit bafdaa6c9f
19 changed files with 1009 additions and 191 deletions
@@ -77,6 +77,7 @@ namespace FineUIPro.Web.WeldMat.ReleaseRecovery
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.BindGrid();
Grid2.Rows.Clear();
}
#endregion
@@ -103,7 +104,9 @@ namespace FineUIPro.Web.WeldMat.ReleaseRecovery
{
listStr.Add(new SqlParameter("@WeldName", null));
}
listStr.Add(new SqlParameter("@WeldSpec", null));
if (!string.IsNullOrEmpty(this.txtStarTime.Text))
{
listStr.Add(new SqlParameter("@StartDate", Convert.ToDateTime(this.txtStarTime.Text.Trim())));
@@ -136,6 +139,71 @@ namespace FineUIPro.Web.WeldMat.ReleaseRecovery
}
#endregion
protected void Grid1_RowSelect(object sender, GridRowSelectEventArgs e)
{
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
{
string weldName = Grid1.DataKeys[e.RowIndex][0].ToString();
string weldSpec= Grid1.DataKeys[e.RowIndex][1].ToString();
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.tvControlItem.SelectedNodeID != null && this.tvControlItem.SelectedNodeID != "0")
{
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
else
{
listStr.Add(new SqlParameter("@ProjectId", null));
}
if (!string.IsNullOrEmpty(weldName))
{
listStr.Add(new SqlParameter("@WeldName", "%" + weldName + "%"));
}
else
{
listStr.Add(new SqlParameter("@WeldName", null));
}
if (!string.IsNullOrEmpty(this.txtStarTime.Text))
{
listStr.Add(new SqlParameter("@StartDate", Convert.ToDateTime(this.txtStarTime.Text.Trim())));
}
else
{
listStr.Add(new SqlParameter("@StartDate", null));
}
if (!string.IsNullOrEmpty(this.txtEndTime.Text))
{
listStr.Add(new SqlParameter("@EndDate", Convert.ToDateTime(this.txtEndTime.Text.Trim())));
}
else
{
listStr.Add(new SqlParameter("@EndDate", null));
}
if (!string.IsNullOrEmpty(weldSpec))
{
listStr.Add(new SqlParameter("@WeldSpec", weldSpec));
}
else
{
listStr.Add(new SqlParameter("@WeldSpec", null));
}
listStr.Add(new SqlParameter("@IsTeamGroup", "1"));
SqlParameter[] parameter = listStr.ToArray();
DataTable dt = SQLHelper.GetDataTableRunProc("sp_Weld_ReleaseRecovery", parameter);
//Grid2.RecordCount = tb.Rows.Count;
//var table = this.GetPagedDataTable(Grid1, tb);
//this.OutputSummaryData(tb); ///取合计值
Grid2.DataSource = dt;
Grid2.DataBind();
}
}
#region
/// <summary>
/// 计算合计