| | |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | using DBUtility; |
| | | |
| | | namespace DAL |
| | | { |
| | |
| | | public ClsIF_Property_View() |
| | | { |
| | | base.MvarReportTitle = "è¾
å©å±æ§è®¾ç½®"; |
| | | base.MvarItemKey = "h_v_IF_Property"; |
| | | base.SQLName = "Select HItemID,HNumber è¾
å©å±æ§ä»£ç ,HName è¾
å©å±æ§ from h_v_IF_Property where HStopflag=0 "; |
| | | base.MvarItemKey = "h_v_IF_PropertyByMaterID"; |
| | | base.SQLName = "Select HItemID,HNumber è¾
å©å±æ§ä»£ç ,HName è¾
å©å±æ§ from h_v_IF_PropertyByMaterID "; |
| | | base.SQLWhere = " where HStopflag=0 "; |
| | | base.SQLOrder = " "; |
| | | //䏿SQL |
| | | base.SQLNameForDown = " Select top 30 HItemID,HNumber è¾
å©å±æ§ä»£ç ,HName è¾
å©å±æ§ from h_v_IF_Property "; |
| | | base.SQLOrderForDown = " Order by HNumber "; |
| | |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºç¡èµæå¸®å©-å
¨é¨å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public override bool RefreshView(string sLike) |
| | | { |
| | | try |
| | | {// |
| | | Pub_Control.frmHlpInfo_View ofrm = new Pub_Control.frmHlpInfo_View(); |
| | | // |
| | | string sSQL = SQLName + SQLWhere + sLike + SQLOrder; |
| | | //ç¼è¾ofrm |
| | | ofrm.sTitle = MvarReportTitle; |
| | | ofrm.sBill = MvarItemKey; |
| | | ofrm.txtFindInfo.Text = WherePart; |
| | | |
| | | // |
| | | DataSet Ds; |
| | | Pub_Class.ClsSqlHelper oCn = new Pub_Class.ClsSqlHelper(); |
| | | Ds = oCn.RunProcReturn(sSQL, MvarItemKey); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | //ç»å® |
| | | ofrm.grdShow.DataSource = Ds.Tables[0].DefaultView; |
| | | Ds.Dispose(); |
| | | Ds = null; |
| | | ofrm.grdShow.SuspendLayout(); |
| | | ofrm.grdShow.Columns[0].Visible = false; |
| | | ofrm.ShowDialog(); |
| | | //å¾å°å¯¹åºå |
| | | int HItemIDCol = 0; |
| | | int HNumberCol = 1; |
| | | int HNameCol = 2; |
| | | // |
| | | if (ofrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK) |
| | | { |
| | | if (ofrm.grdShow.CurrentRow == null) |
| | | { |
| | | return false; |
| | | } |
| | | oModel = new ClsGy_Base_Model(); |
| | | oModel.HItemID = Pub_Class.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[0].Value); |
| | | oModel.HNumber = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[1].Value); |
| | | oModel.HName = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[2].Value); |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | // |
| | | ofrm.Dispose(); |
| | | ofrm = null; |
| | | // |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |