using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { /// /// 检具 /// public class ClsGy_CheckToolsFileMain_View:DBUtility.ClsGy_Base_View { // public Model.ClsGy_CheckToolsFileMain omodel = new Model.ClsGy_CheckToolsFileMain(); SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public ClsGy_CheckToolsFileMain_View() { base.MvarReportTitle = "检具设置"; base.MvarItemKey = "Gy_CheckToolsFileMain"; base.SQLName = "Select HInterID,HCheckToolsNumber 检具代码,HName 检具 from Gy_CheckToolsFileMain 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_CheckToolsFileMain(); omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); omodel.HCheckToolsNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCheckToolsNumber"]); 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); } } } }