diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx
index aca8d337..eb71d123 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx
@@ -88,6 +88,11 @@
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs
index 47273673..d500f3ee 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs
@@ -493,5 +493,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BindGrid();
}
#endregion
+
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = txtWeldingDate.Text;
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊接日报" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ //this.Grid1.PageSize = this.;
+ BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs
index 6e035317..ff8a406c 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.HJGL.WeldingManage {
-
-
- public partial class WeldReport {
-
+namespace FineUIPro.Web.HJGL.WeldingManage
+{
+
+
+ public partial class WeldReport
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// panelLeftRegion 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel panelLeftRegion;
-
+
///
/// Toolbar1 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// txtMonth 控件。
///
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtMonth;
-
+
///
/// tvControlItem 控件。
///
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Tree tvControlItem;
-
+
///
/// Panel2 控件。
///
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// panelCenterRegion 控件。
///
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel panelCenterRegion;
-
+
///
/// Grid1 控件。
///
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar2 控件。
///
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar2;
-
+
///
/// txtUnitName 控件。
///
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label txtUnitName;
-
+
///
/// txtTabler 控件。
///
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label txtTabler;
-
+
///
/// txtTableDate 控件。
///
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label txtTableDate;
-
+
///
/// txtWeldingDate 控件。
///
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label txtWeldingDate;
-
+
///
/// txtSumSize 控件。
///
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label txtSumSize;
-
+
///
/// txtRemark 控件。
///
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label txtRemark;
-
+
///
/// Toolbar3 控件。
///
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar3;
-
+
///
/// txtPipelineCode 控件。
///
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPipelineCode;
-
+
///
/// txtWelderCode 控件。
///
@@ -191,7 +193,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtWelderCode;
-
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// ToolbarSeparator1 控件。
///
@@ -200,7 +220,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
-
+
///
/// ToolbarText1 控件。
///
@@ -209,7 +229,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -218,7 +238,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// Window1 控件。
///
@@ -227,7 +247,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Menu1 控件。
///
@@ -236,7 +256,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuAdd 控件。
///
@@ -245,7 +265,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuAdd;
-
+
///
/// btnMenuEdit 控件。
///
@@ -254,7 +274,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuEdit;
-
+
///
/// btnMenuDelete 控件。
///
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx
index 8a1568ff..7242e22c 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx
@@ -26,7 +26,7 @@
-
+
+ AllowCellEditing="true" ClicksToEdit="1" DataIDField="WeldTaskId" AllowSorting="true" KeepCurrentSelection="true" AllowColumnLocking="true"
+ SortField="WeldJointNum" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true" CheckBoxSelectOnly="true"
+ AllowPaging="false" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True" DisableUnselectableRows="true">
private void BindGrid(List weldingDailyItem)
{
-
+ var aw = this.Grid1.SelectedRowIDArray;
DataTable dt = null;
var list = from x in Funs.DB.View_HJGL_WeldingTask where x.ProjectId == this.CurrUser.LoginProjectId select x;
if (weldingDailyItem != null)
@@ -247,26 +247,32 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
Grid1.DataSource = table;
Grid1.DataBind();
+
+ //for (int i = 0; i < this.Grid1.Rows.Count; i++)
+ //{
+ // var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString());
+ // if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
+ // {
+ // // Grid1.Rows[i].RowSelectable = false;
+ // }
+ // var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString() && x.PointState != null);
+ // if (pointBatchItem != null) //已生成委托,不能编辑或删除
+ // {
+ // // Grid1.Rows[i].RowSelectable = false;
+ // }
+ //}
if (weldingDailyItem != null)
{
- var task = from x in Funs.DB.View_HJGL_WeldingTask
+ var task = (from x in Funs.DB.View_HJGL_WeldingTask
where x.WeldingDailyId == this.WeldingDailyId
- select x;
+ select x).ToList();
+ if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
+ {
+ task = task.Where(x => x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).ToList();
+ }
var weldTaskIds = task.Select(x => x.WeldTaskId).ToArray();
this.Grid1.SelectedRowIDArray = weldTaskIds;
- }
- for (int i = 0; i < this.Grid1.Rows.Count; i++)
- {
- var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString());
- if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
- {
- Grid1.Rows[i].RowSelectable = false;
- }
- var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString() && x.PointState != null);
- if (pointBatchItem != null) //已生成委托,不能编辑或删除
- {
- Grid1.Rows[i].RowSelectable = false;
- }
+ var a = this.Grid1.SelectedRowIDArray;
}
}
#endregion
@@ -456,6 +462,47 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
BLL.WeldingDailyService.AddWeldingDaily(newWeldingDaily);
//BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldReportMenuId, Const.BtnAdd, this.WeldingDailyId);
}
+ foreach (JObject mergedRow in Grid1.GetMergedData())
+ {
+ JObject values = mergedRow.Value("values");
+ int i = mergedRow.Value("index");
+
+ string rowId = Grid1.Rows[i].RowID;
+ if (this.Grid1.SelectedRowIDArray.Contains(rowId))
+ {
+ var t = BLL.WeldTaskService.GetWeldTaskById(rowId);
+ var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId);
+
+
+ if (newWeldJoint != null)
+ {
+ var coverWelderCode = (from x in Funs.DB.SitePerson_Person
+ where x.ProjectId == CurrUser.LoginProjectId && x.WelderCode == values.Value("CoverWelderCode")
+ select x).FirstOrDefault();
+ if (coverWelderCode != null)
+ {
+ t.CoverWelderId = coverWelderCode.PersonId;
+ newWeldJoint.CoverWelderId = coverWelderCode.PersonId;
+ }
+ var backingWelderCode = (from x in Funs.DB.SitePerson_Person
+ where x.ProjectId == CurrUser.LoginProjectId && x.WelderCode == values.Value("BackingWelderCode")
+ select x).FirstOrDefault();
+ if (backingWelderCode != null)
+ {
+ t.BackingWelderId = backingWelderCode.PersonId;
+ newWeldJoint.BackingWelderId = backingWelderCode.PersonId;
+ }
+ WeldTaskService.UpdateWeldTask(t);
+ WeldJointService.UpdateWeldJoint(newWeldJoint);
+ //if (!string.IsNullOrEmpty(values.Value("JointAttribute").ToString()))
+ //{
+ // newWeldJoint.JointAttribute = values.Value("JointAttribute").ToString();
+ //}
+ //BLL.WeldJointService.UpdateWeldJoint(newWeldJoint);
+ BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, newWeldJoint.JointAttribute, Const.BtnAdd);
+ }
+ }
+ }
// 获取组批条件
var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", CurrUser.LoginProjectId);
@@ -573,47 +620,6 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
#endregion
//更新焊口属性
- foreach (JObject mergedRow in Grid1.GetMergedData())
- {
- JObject values = mergedRow.Value("values");
- int i = mergedRow.Value("index");
-
- string rowId = Grid1.Rows[i].RowID;
- if (this.Grid1.SelectedRowIDArray.Contains(rowId))
- {
- var t = BLL.WeldTaskService.GetWeldTaskById(rowId);
- var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId);
-
-
- if (newWeldJoint != null)
- {
- var coverWelderCode = (from x in Funs.DB.SitePerson_Person
- where x.ProjectId == CurrUser.LoginProjectId && x.WelderCode == values.Value("CoverWelderCode")
- select x).FirstOrDefault();
- if (coverWelderCode != null)
- {
- t.CoverWelderId = coverWelderCode.PersonId;
- newWeldJoint.CoverWelderId = coverWelderCode.PersonId;
- }
- var backingWelderCode = (from x in Funs.DB.SitePerson_Person
- where x.ProjectId == CurrUser.LoginProjectId && x.WelderCode == values.Value("BackingWelderCode")
- select x).FirstOrDefault();
- if (backingWelderCode != null)
- {
- t.BackingWelderId = backingWelderCode.PersonId;
- newWeldJoint.BackingWelderId = backingWelderCode.PersonId;
- }
- WeldTaskService.UpdateWeldTask(t);
- WeldJointService.UpdateWeldJoint(newWeldJoint);
- //if (!string.IsNullOrEmpty(values.Value("JointAttribute").ToString()))
- //{
- // newWeldJoint.JointAttribute = values.Value("JointAttribute").ToString();
- //}
- //BLL.WeldJointService.UpdateWeldJoint(newWeldJoint);
- BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, newWeldJoint.JointAttribute, Const.BtnAdd);
- }
- }
- }
if (string.IsNullOrEmpty(errlog))
{
ShowNotify("保存成功!", MessageBoxIcon.Success);
@@ -1240,5 +1246,38 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
}
}
+
+ protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
+ {
+ DataRowView row = e.DataItem as DataRowView;
+ var id= row["WeldJointId"].ToString();
+ var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == id);
+ if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
+ {
+ e.RowSelectable = false;
+ // Grid1.DeleteRow(e.RowID);
+ // Grid1.DeleteRow(e.RowID);
+ }
+ var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == id && x.PointState != null);
+ if (pointBatchItem != null) //已生成委托,不能编辑或删除
+ {
+ e.RowSelectable = false;
+ // Grid1.DeleteRow(e.RowID);
+ // Grid1.DeleteRow(e.RowID);
+ }
+ //for (int i = 0; i < this.Grid1.Rows.Count; i++)
+ //{
+ // var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString());
+ // if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
+ // {
+ // Grid1.Rows[i].RowSelectable = false;
+ // }
+ // var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString() && x.PointState != null);
+ // if (pointBatchItem != null) //已生成委托,不能编辑或删除
+ // {
+ // Grid1.Rows[i].RowSelectable = false;
+ // }
+ //}
+ }
}
}
\ No newline at end of file