using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { /// /// 模治具 /// public class ClsGy_MouldFileMain_View:DBUtility.ClsGy_Base_View { // public Model.ClsGy_MouldFileMain omodel = new Model.ClsGy_MouldFileMain(); SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public ClsGy_MouldFileMain_View() { base.MvarReportTitle = "模治具设置"; base.MvarItemKey = "Gy_MouldFileMain"; base.SQLName = "Select HInterID,HMouldNo 模治具代码,HName 模治具 from Gy_MouldFileMain Order by HInterID "; } // public void Dispose() { GC.SuppressFinalize(this); } // //返回项目信息 public override bool GetInfoByID(Int64 sItemID) { DataSet DS ; try { DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HInterID='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo); if (DS.Tables[0].Rows.Count == 0) return false; else { return GetInfo(DS); } } catch (Exception e) { throw (e); } } //根据代码返回项目信息 public override bool GetInfoByNumber(string sNumber) { DataSet DS; try { DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HCheckToolsNumber='" + sNumber + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo); if (DS.Tables[0].Rows.Count == 0) return false; else { return GetInfo(DS); } } catch (Exception e) { throw (e); } } //返回项目信息 public override bool GetInfo(DataSet Ds) { try { omodel = new Model.ClsGy_MouldFileMain(); omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); omodel.HMouldNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMouldNo"]); omodel.HName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HName"]); //omodel.HShortNumber = "''"; //omodel.HParentID = "0"; //omodel.HLevel = "0"; //omodel.HEndFlag = "0"; //omodel.HStopflag = "0"; omodel.HRemark = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); //omodel.HHelpCode = "''"; //omodel.HWHID = "0"; // return true; } catch (Exception e) { throw (e); } } } }