/******************************************************************************* * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential * 类的信息: * 1.程序名称:F_PC_0108.cs * 2.功能描述:成型线明细表 * 编辑履历: * 作者 日期 版本 修改内容 * 王鑫 2015/09/15 1.00 新建 *******************************************************************************/ using System; using System.Collections.Generic; using System.Data; using System.Windows.Forms; using Dongke.IBOSS.PRD.Basics.BaseResources; using Dongke.IBOSS.PRD.Basics.DockPanel; using Dongke.IBOSS.PRD.Client.CommonModule; using Dongke.IBOSS.PRD.WCF.DataModels; using Dongke.IBOSS.PRD.WCF.Proxys; using Dongke.IBOSS.PRD.WCF.Proxys.PCModuleService; namespace Dongke.IBOSS.PRD.Client.PCModule { public partial class F_PC_0108 : DockPanelBase { #region 成员变量 // 单例模式使用 private static F_PC_0108 _instance; // 成型线集合 private List _groutingLineList = new List(); //选择的成型线状态 private int? _mouldStatus; // 最后选择行 private int _selecedRow; #endregion #region 构造函数 /// /// 构造函数 /// public F_PC_0108() { InitializeComponent(); // 为控件名赋值 this.btnSearch.Text = ButtonText.BTN_SEARCH; this.btnClearCondition.Text = ButtonText.BTN_CLEARCONDITION; this.tsbtnAdd.Text = ButtonText.TSBTN_ADD; this.tsbtnEdit.Text = ButtonText.TSBTN_EDIT; this.tsbtnClose.Text = ButtonText.TSBTN_CLOSE; this.tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE; // this.tsbtnQueryRecord.Text = ButtonText.TSBTN_QUERYRECORD; this.gbxCondition.Text = Constant.LABEL_QUERY_CONDITIONS; this.tsbtnDisable.Text = ButtonText.TSBTN_DISABLE; this.Text = "成型线明细表"; } #endregion #region 单例模式 /// /// 单例模式,防止重复创建窗体 /// public static F_PC_0108 Instance { get { if (_instance == null) { _instance = new F_PC_0108(); } return _instance; } } #endregion #region 事件处理 /// /// 页面加载事件 /// /// /// private void F_PC_0104_Load(object sender, System.EventArgs e) { try { // 加载权限 FormPermissionManager.FormPermissionControl(this.Name, this, Dongke.IBOSS.PRD.Client.DataModels.LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData, Dongke.IBOSS.PRD.Client.DataModels.LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData); // 为成型线绑定数据源 this.BindMouldType(); // 设置日期控件不可用 this.SetBeginTimePickerEnable(false); this.SetEndTimePickerEnable(false); } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 自动列宽按钮按下处理 /// /// /// private void tsbtnAdaptive_Click(object sender, EventArgs e) { this.dgvGroutingLine.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); this.dgvGroutingLineDetail.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); } /// /// 开始日期条件选中状态改变处理事件 /// /// /// private void cbStartTime_CheckedChanged(object sender, EventArgs e) { this.SetBeginTimePickerEnable(this.cbStartTime.Checked); } /// /// 结束日期条件选中状态改变处理事件 /// /// /// private void cbEndTime_CheckedChanged(object sender, EventArgs e) { this.SetEndTimePickerEnable(this.cbEndTime.Checked); } /// /// 查询按钮按下处理 /// /// /// private void btnSearch_Click(object sender, EventArgs e) { try { this._mouldStatus = Convert.ToInt32(this.lstcbxGMouldStatus.SelectedValue); // if (this.lstcbxGMouldStatus.SelectedValue.ToString()!="-1") DataSet dsGroutingLine = (DataSet)DoAsync(new AsyncMethod(() => { return GetGroutingLine(); })); if (dsGroutingLine != null && dsGroutingLine.Tables.Count > Constant.INT_IS_ZERO) { // 控制明细不查询 this.Tag = false; this.dgvGroutingLine.DataSource = dsGroutingLine.Tables[0]; if (dsGroutingLine.Tables[0].Rows.Count > Constant.INT_IS_ZERO) { // 定位当前行 if (this.dgvGroutingLine.Rows.Count > this._selecedRow) { this.dgvGroutingLine.Rows[this._selecedRow].Selected = true; this.dgvGroutingLine.CurrentCell = this.dgvGroutingLine.Rows[this._selecedRow].Cells["GroutingLineCode"]; } else if (this.dgvGroutingLine.Rows.Count <= this._selecedRow) { this._selecedRow = dgvGroutingLine.Rows.Count - 1; this.dgvGroutingLine.CurrentCell = this.dgvGroutingLine.Rows[this.dgvGroutingLine.Rows.Count - 1].Cells["GroutingLineCode"]; this.dgvGroutingLine.Rows[dgvGroutingLine.Rows.Count - 1].Selected = true; } this.Tag = true; // 查明细 this.dgvGroutingLine_SelectionChanged(null, null); this.dgvGroutingLine.Focus(); } else { // 清空明细中的数据 this.dgvGroutingLineDetail.DataSource = null; // 提示未查找到数据 MessageBox.Show(Messages.MSG_CMN_I002, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } } // 设置按钮可用状态 } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 清空查询条件处理 /// /// /// private void btnClearCondition_Click(object sender, EventArgs e) { this.txtBuildingNo.Text = ""; this.txtFloorNo.Text = ""; this.txtGroutingLineNo.Text = ""; this.lstcbxGMouldStatus.Text = ""; this.lstcbxGMouldStatus.SelectedValue = "1"; this.txtGroutingLineCode.Text = ""; this.txtGroutingLineName.Text = ""; this.cbStartTime.Checked = false; this.cbEndTime.Checked = false; this.txtBeginUsedDateStart.Enabled = false; this.txtBeginUsedDateEnd.Enabled = false; this.txtEndUsedDateStart.Enabled = false; this.txtEndUsedDateEnd.Enabled = false; this.txtRemarks.Text = ""; this.txtGroutingUserCode.Text = ""; this.txtBeginUsedDateStart.Value = DateTime.Now; this.txtBeginUsedDateEnd.Value = DateTime.Now; this.txtEndUsedDateStart.Value = DateTime.Now; this.txtEndUsedDateEnd.Value = DateTime.Now; this.scbGMouldType.ClearValue(); } /// /// 窗体关闭事件处理 /// /// /// private void tsbtnClose_Click(object sender, System.EventArgs e) { this.Close(); } /// /// 窗体关闭后,释放单例模式 /// /// /// private void F_PC_0104_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) { _instance = null; } /// /// 双击某成型线进行编辑 /// /// /// private void dgvGroutingLine_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { } /// /// 添加新成型线 /// /// /// private void tsbtnAdd_Click(object sender, EventArgs e) { try { F_PC_0102_1_1 frmFPC0102 = new F_PC_0102_1_1(); DialogResult dialogresult = frmFPC0102.ShowDialog(); if (dialogresult.Equals(DialogResult.OK)) { this.dgvGroutingLine.DataSource = null; DataSet dsGroutingLine = (DataSet)DoAsync(new AsyncMethod(() => { return GetGroutingLine(); })); if (dsGroutingLine != null) { if (dsGroutingLine.Tables.Count != Constant.INT_IS_ZERO) { this.dgvGroutingLine.DataSource = ((DataSet)dsGroutingLine).Tables[0]; this.dgvGroutingLine.ReadOnly = true; } } } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 编辑选中成型线 /// /// /// private void tsbtnEdit_Click(object sender, EventArgs e) { try { DataGridViewRow currentRow = this.dgvGroutingLine.CurrentRow; if (currentRow != null) { int GroutingLineId = Convert.ToInt32(currentRow.Cells["GroutingLineId"].Value); F_PC_0103_1 frmFPC0103 = new F_PC_0103_1(GroutingLineId); DialogResult dialogresult = frmFPC0103.ShowDialog(); if (dialogresult.Equals(DialogResult.OK)) { this.dgvGroutingLine.DataSource = null; object obResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(GetGroutingLine)); if (obResult != null) { DataSet dsGroutingLine = (DataSet)obResult; if (dsGroutingLine.Tables.Count != Constant.INT_IS_ZERO) { this.dgvGroutingLine.DataSource = dsGroutingLine.Tables[0]; this.dgvGroutingLine.ReadOnly = true; } } } } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 选择某成型线查看模具明细 /// /// /// private void dgvGroutingLine_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { try { if (e.RowIndex == -Constant.INT_IS_ONE || e.ColumnIndex == -Constant.INT_IS_ONE) { return; } int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[e.RowIndex].Cells["GroutingLineID"].Value); this.BindDetailInfo(GroutingLineID); this.dgvGroutingLine.Focus(); } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 打开履历查询界面 /// /// /// private void tsbtnQueryRecord_Click(object sender, EventArgs e) { try { if (this.dgvGroutingLine.CurrentCell != null) { int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GroutingLineID"].Value); string GroutingLineCode = this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GroutingLineCode"].Value.ToString(); F_PC_0105_1 frmFPC0105 = new F_PC_0105_1(GroutingLineID, GroutingLineCode); DialogResult dialogresult = frmFPC0105.ShowDialog(); } else { F_PC_0105_1 frmFPC0105 = new F_PC_0105_1(); DialogResult dialogresult = frmFPC0105.ShowDialog(); } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 成型线列头点击事件 /// /// /// private void dgvGroutingLine_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { //try //{ // if (this.dgvGroutingLine.SelectedRows.Count != Constant.INT_IS_ZERO) // { // int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.SelectedRows[0].Cells["GroutingLineID"].Value); // this.BindDetailInfo(GroutingLineID); // } //} //catch (Exception ex) //{ // // 对异常进行共通处理 // ExceptionManager.HandleEventException(this.ToString(), // System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); //} } /// /// 停用按钮事件 /// /// /// private void tsbtnDisable_Click(object sender, EventArgs e) { try { if (this.dgvGroutingLine.CurrentCell != null) { int valueflag = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GMouldStatus"].Value); int groutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["groutingLineID"].Value); if (valueflag == 0) return; // 提示用户确认停用 DialogResult msgBoxResult = MessageBox.Show( string.Format(Messages.MSG_CMN_Q002, "成型线", "停用"), this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (msgBoxResult == DialogResult.Yes) { int returnRow = (int)DoAsync(new AsyncMethod(() => { return PCModuleProxy.Service.SaveGroutingLineValueFlag(groutingLineID, 0); })); //修改成功 if (returnRow > 0) { MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "成型线", "停用"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); btnSearch_Click(sender, e); } else { MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "成型线", "停用"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 启用按钮事件 /// /// /// private void tsbtnStart_Click(object sender, EventArgs e) { try { if (this.dgvGroutingLine.CurrentCell != null) { try { if (this.dgvGroutingLine.CurrentCell != null) { int valueflag = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GMouldStatus"].Value); int groutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["groutingLineID"].Value); if (valueflag == 1) return; // 提示用户确认停用 DialogResult msgBoxResult = MessageBox.Show( string.Format(Messages.MSG_CMN_Q002, "成型线", "启用"), this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (msgBoxResult == DialogResult.Yes) { int returnRow = (int)DoAsync(new AsyncMethod(() => { return PCModuleProxy.Service.SaveGroutingLineValueFlag(groutingLineID, 1); })); //修改成功 if (returnRow > 0) { MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "成型线", "启用"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); btnSearch_Click(sender, e); } else { MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "成型线", "启用"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 模具管理按钮事件 /// /// /// private void tsbtnManager_Click(object sender, EventArgs e) { try { if (this.dgvGroutingLine.CurrentCell != null) { int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GroutingLineID"].Value); string GroutingLineCode = this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GroutingLineCode"].Value.ToString(); F_PC_0101_1_1 frmFPC0101 = F_PC_0101_1_1.Instance; frmFPC0101.ShowInDockPanel(this.DockPanel); frmFPC0101.SetGroutingLineIDAndGroutingLineCode(GroutingLineID, GroutingLineCode); //F_PC_0101_1_1 frmFPC0101 = new F_PC_0101_1_1(GroutingLineID, GroutingLineCode); //DialogResult dialogresult = frmFPC0101.ShowDialog(); } else { //F_PC_0101_1_1 frmFPC0101 = new F_PC_0101_1_1(); //DialogResult dialogresult = frmFPC0101.ShowDialog(); F_PC_0101_1_1 frmFPC0101 = F_PC_0101_1_1.Instance; frmFPC0101.ShowInDockPanel(this.DockPanel); } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } private void dgvGroutingLine_SelectionChanged(object sender, EventArgs e) { try { // 在绑定总表时 不查询明细 if (!Convert.ToBoolean(this.Tag) || this.dgvGroutingLine.CurrentCell == null) { return; } // 选中行时查询明细 else { if (this.txtBuildingNo.ReadOnly) { return; } int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[this.dgvGroutingLine.CurrentCell.RowIndex].Cells["GroutingLineID"].Value.ToString()); this.BindDetailInfo(GroutingLineID); this.dgvGroutingLine.Focus(); } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } #endregion #region 私有方法 /// /// 为页面的成型线类型绑定数据源 /// private void BindMouldType() { try { //DataTable dtDataSourse = new DataTable(); //dtDataSourse.Columns.Add("GMouldType", System.Type.GetType("System.String")); //dtDataSourse.Columns.Add("GMouldTypeName", System.Type.GetType("System.String")); //for (int i = 0; i < Constant.ConGMouldStatusCount; i++) //{ // DataRow drRow = dtDataSourse.NewRow(); // drRow["GMouldType"] = Constant.ConGMouldStatus[i, 0]; // drRow["GMouldTypeName"] = Constant.ConGMouldStatus[i, 1]; // dtDataSourse.Rows.Add(drRow); //} //this.lstcbxGMouldStatus.ListBox.DisplayMember = "GMouldTypeName"; //this.lstcbxGMouldStatus.ListBox.ValueMember = "GMouldType"; //this.lstcbxGMouldStatus.ListBox.DataSource = dtDataSourse; // 调用服务器端获取数据集 ServiceResultEntity sre = (ServiceResultEntity)DoAsync(new AsyncMethod(() => { return PCModuleProxyNew.Service.GetFPC0101IData(); })); if (sre.Status == Constant.ServiceResultStatus.Success) { if (sre.Data.Tables[1].Rows.Count > Constant.INT_IS_ZERO) { DataRow dr = sre.Data.Tables[1].NewRow(); dr["GMouldStatusName"] = ""; dr["GMouldStatusID"] = -1; sre.Data.Tables[1].Rows.InsertAt(dr, 0); this.lstcbxGMouldStatus.DisplayMember = "GMouldStatusName"; this.lstcbxGMouldStatus.ValueMember = "GMouldStatusID"; this.lstcbxGMouldStatus.DataSource = sre.Data.Tables[1]; this.lstcbxGMouldStatus.SelectedValue = "1"; } } } catch (Exception ex) { throw ex; } } /// /// 设置开始使用时间可用状态 /// /// /// false:不可用 /// true:可用 /// private void SetBeginTimePickerEnable(bool isEnable) { this.txtBeginUsedDateStart.Enabled = isEnable; this.txtBeginUsedDateEnd.Enabled = isEnable; } /// /// 设置结束使用时间可用状态 /// /// /// false:不可用 /// true:可用 /// private void SetEndTimePickerEnable(bool isEnable) { this.txtEndUsedDateStart.Enabled = isEnable; this.txtEndUsedDateEnd.Enabled = isEnable; } /// /// 根据条件取得成型线数据 /// /// private DataSet GetGroutingLine() { try { this.dgvGroutingLine.AutoGenerateColumns = false; GroutingLineEntity groutingLineEntity = new GroutingLineEntity(); groutingLineEntity.Purview = ((int)Constant.PurviewType.ViewGroutingLine).ToString(); groutingLineEntity.VALUEFLAG = 1; groutingLineEntity.BUILDINGNO = this.txtBuildingNo.Text.Trim(); groutingLineEntity.FLOORNO = this.txtFloorNo.Text.Trim(); groutingLineEntity.GROUTINGLINENO = this.txtGroutingLineNo.Text.Trim(); //if (this.lstcbxGMouldStatus.SelectedValue.ToString()!="-1") if (_mouldStatus != -1) { groutingLineEntity.MouldStatus = _mouldStatus; } groutingLineEntity.GROUTINGLINECODE = this.txtGroutingLineCode.Text.Trim(); groutingLineEntity.GROUTINGLINENAME = this.txtGroutingLineName.Text.Trim(); if (this.cbStartTime.Checked) { groutingLineEntity.BEGINUSEDDATE = Convert.ToDateTime(this.txtBeginUsedDateStart.Text.Trim()); groutingLineEntity.BEGINUSEDDATEEND = Convert.ToDateTime(this.txtBeginUsedDateEnd.Text.Trim()).AddHours(23) .AddMinutes(59).AddSeconds(59); } if (this.cbEndTime.Checked) { groutingLineEntity.ENDUSEDDATE = Convert.ToDateTime(this.txtEndUsedDateStart.Text.Trim()); groutingLineEntity.ENDUSEDDATEEND = Convert.ToDateTime(this.txtEndUsedDateEnd.Text.Trim()).AddHours(23) .AddMinutes(59).AddSeconds(59); } groutingLineEntity.REMARKS = this.txtRemarks.Text.Trim(); if (this.scbGMouldType.SearchedPKMember != 0) { groutingLineEntity.MOULDTYPEID = this.scbGMouldType.SearchedPKMember; } groutingLineEntity.USERCODE = this.txtGroutingUserCode.Text.Trim(); return PCModuleProxy.Service.GetGroutingLine(groutingLineEntity); } catch (Exception ex) { throw ex; } } /// /// 将成型线DataSet数据集转入集合中 /// /// private void DataTableToListByLine(DataSet dsLine) { try { this._groutingLineList.Clear(); foreach (DataRow drFor in dsLine.Tables[0].Rows) { GroutingLineEntity lineEntity = new GroutingLineEntity(); lineEntity.GROUTINGLINEID = Convert.ToInt32(drFor["GROUTINGLINEID"]); lineEntity.BUILDINGNO = drFor["BUILDINGNO"].ToString(); lineEntity.FLOORNO = drFor["FLOORNO"].ToString(); lineEntity.GROUTINGLINENO = drFor["GROUTINGLINENO"].ToString(); lineEntity.GROUTINGLINECODE = drFor["GROUTINGLINECODE"].ToString(); lineEntity.GROUTINGLINENAME = drFor["GROUTINGLINENAME"].ToString(); lineEntity.MOULDQUANTITY = Convert.ToDecimal(drFor["MOULDQUANTITY"]); lineEntity.MOULDTYPEID = Convert.ToInt32(drFor["GMOULDTYPEID"]); lineEntity.USERID = Convert.ToInt32(drFor["USERID"]); lineEntity.BEGINUSEDDATE = Convert.ToDateTime(drFor["BEGINUSEDDATE"]); if (drFor["ENDUSEDDATE"].ToString() != string.Empty) { lineEntity.ENDUSEDDATE = Convert.ToDateTime(drFor["ENDUSEDDATE"].ToString()); } lineEntity.MouldStatus = Convert.ToInt32(drFor["GMouldStatus"]); lineEntity.REMARKS = drFor["REMARKS"].ToString(); lineEntity.ACCOUNTID = Convert.ToInt32(drFor["ACCOUNTID"]); lineEntity.VALUEFLAG = Convert.ToInt32(drFor["VALUEFLAG"]); lineEntity.CREATETIME = Convert.ToDateTime(drFor["CREATETIME"]); lineEntity.CREATEUSERID = Convert.ToInt32(drFor["CREATEUSERID"]); lineEntity.UPDATETIME = Convert.ToDateTime(drFor["UPDATETIME"]); lineEntity.UPDATEUSERID = Convert.ToInt32(drFor["UPDATEUSERID"]); lineEntity.OPTIMESTAMP = Convert.ToDateTime(drFor["OPTIMESTAMP"]); lineEntity.MOULDTYPENAME = drFor["GMOULDTYPENAME"].ToString(); this._groutingLineList.Add(lineEntity); } } catch (Exception ex) { throw ex; } } /// /// 根据成型线ID获取明细信息 /// private void BindDetailInfo(int GroutingLineID) { try { this.dgvGroutingLineDetail.AutoGenerateColumns = false; DataSet dsDetail = (DataSet)DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(() => { return PCModuleProxy.Service.GetGroutingLineDetailByMainId(GroutingLineID, null, 0); })); DataView dv = dsDetail.Tables[0].DefaultView; dv.RowFilter = "valueflag=1"; dsDetail = new DataSet(); dsDetail.Tables.Add(dv.ToTable()); this.dgvGroutingLineDetail.DataSource = dsDetail.Tables[0]; this.dgvGroutingLineDetail.ReadOnly = true; } catch (Exception ex) { throw ex; } } #endregion } }