public Model.Master.DeptMasterInfo DisplayRecord(IModelObject KeyObject) { string sqlString = string.Empty; sqlString = "SELECT * FROM "+this._dataDictionary[DeptMasterInfoEnum.TableName.ToString()]+Environment.NewLine; sqlString += " WHERE " + this._dataDictionary[DeptMasterInfoEnum.RecordID.ToString()] + "=" + KeyObject.RecordID.ToString(); DataBaseCommand<DeptMasterInfo> dbCommand = new DataBaseCommand<DeptMasterInfo>(); DeptMasterInfo deptMasterInfo; try { deptMasterInfo = dbCommand.GetRecord(sqlString, this._dataDictionary); } catch (Exception Ex) { throw Ex; } return deptMasterInfo; }
public DeptMasterInfo GetRecord(string deptNum) { string sqlString = string.Empty; sqlString = "SELECT * FROM " + this._dataDictionary[DeptMasterInfoEnum.TableName.ToString()] + Environment.NewLine; sqlString += " WHERE " + this._dataDictionary[DeptMasterInfoEnum.DpmCDeptNumber.ToString()] + "='" + deptNum.Replace("'", "''") + "'"; DataBaseCommand <DeptMasterInfo> dbCommand = new DataBaseCommand <DeptMasterInfo>(); DeptMasterInfo deptMasterInfo; try { deptMasterInfo = dbCommand.GetRecord(sqlString, this._dataDictionary); } catch (Exception Ex) { throw Ex; } return(deptMasterInfo); }
public Model.Master.DeptMasterInfo DisplayRecord(IModelObject KeyObject) { string sqlString = string.Empty; sqlString = "SELECT * FROM " + this._dataDictionary[DeptMasterInfoEnum.TableName.ToString()] + Environment.NewLine; sqlString += " WHERE " + this._dataDictionary[DeptMasterInfoEnum.RecordID.ToString()] + "=" + KeyObject.RecordID.ToString(); DataBaseCommand <DeptMasterInfo> dbCommand = new DataBaseCommand <DeptMasterInfo>(); DeptMasterInfo deptMasterInfo; try { deptMasterInfo = dbCommand.GetRecord(sqlString, this._dataDictionary); } catch (Exception Ex) { throw Ex; } return(deptMasterInfo); }
public DeptMasterInfo GetRecord(string deptNum) { string sqlString = string.Empty; sqlString = "SELECT * FROM " + this._dataDictionary[DeptMasterInfoEnum.TableName.ToString()] + Environment.NewLine; sqlString += " WHERE " + this._dataDictionary[DeptMasterInfoEnum.DpmCDeptNumber.ToString()] + "='" + deptNum.Replace("'","''")+"'"; DataBaseCommand<DeptMasterInfo> dbCommand = new DataBaseCommand<DeptMasterInfo>(); DeptMasterInfo deptMasterInfo; try { deptMasterInfo = dbCommand.GetRecord(sqlString, this._dataDictionary); } catch (Exception Ex) { throw Ex; } return deptMasterInfo; }