Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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;
        }