private ClientMasterInfo GetRecordForSql(string sql) { LocalLayer.LocalDefine localDefine = new DAL.SqlDAL.LocalLayer.LocalDefine(); string sqlString = string.Empty; DataAccessLayer dal = new DataAccessLayer(); ClientMasterInfo clientMaster = null; SqlDataReader dr = null; try { dr = dal.GetDataReader(sql); if (dr != null) { if (dr.Read()) { clientMaster = GetRecord(dr); } } } catch (Exception Ex) { throw Ex; } finally { if (dr != null) { dr.Close(); } } return(clientMaster); }
public ClientMasterInfo GetRecord_Next(int currentRecordID) { LocalLayer.LocalDefine localDefine = new DAL.SqlDAL.LocalLayer.LocalDefine(); string sqlString = string.Empty; DataBaseCommandKeyInfo dataBaseCommandKeyInfo = new DataBaseCommandKeyInfo(); List <DataBaseCommandKeyInfo> keyList = new List <DataBaseCommandKeyInfo>(); dataBaseCommandKeyInfo.Key = "clm_iRecID"; dataBaseCommandKeyInfo.KeyValue = currentRecordID.ToString(); dataBaseCommandKeyInfo.KeyValueType = TypeCode.Int32; keyList.Add(dataBaseCommandKeyInfo); sqlString = localDefine.GetCommandSQL_Next(keyList, "ClientMaster_clm"); ClientMasterInfo clientMaster = null; try { clientMaster = GetRecordForSql(sqlString); } catch (Exception Ex) { throw Ex; } return(clientMaster); }
public ClientMasterInfo GetRecord_First() { LocalLayer.LocalDefine localDefine = new DAL.SqlDAL.LocalLayer.LocalDefine(); string sqlString = string.Empty; sqlString = localDefine.GetCommandSQL_First("ClientMaster_clm"); ClientMasterInfo clientMaster = null; try { clientMaster = GetRecordForSql(sqlString); } catch (Exception Ex) { throw Ex; } return(clientMaster); }
private ClientMasterInfo GetRecordForSql(string sql) { LocalLayer.LocalDefine localDefine = new DAL.SqlDAL.LocalLayer.LocalDefine(); string sqlString = string.Empty; DataAccessLayer dal = new DataAccessLayer(); ClientMasterInfo clientMaster = null; SqlDataReader dr = null; try { dr = dal.GetDataReader(sql); if (dr != null) { if (dr.Read()) { clientMaster = GetRecord(dr); } } } catch (Exception Ex) { throw Ex; } finally { if (dr != null) { dr.Close(); } } return clientMaster; }
public ClientMasterInfo GetRecord_Previous(int currentRecordID) { LocalLayer.LocalDefine localDefine = new DAL.SqlDAL.LocalLayer.LocalDefine(); string sqlString = string.Empty; DataBaseCommandKeyInfo dataBaseCommandKeyInfo = new DataBaseCommandKeyInfo(); List<DataBaseCommandKeyInfo> keyList = new List<DataBaseCommandKeyInfo>(); dataBaseCommandKeyInfo.Key = "clm_iRecID"; dataBaseCommandKeyInfo.KeyValue = currentRecordID.ToString(); dataBaseCommandKeyInfo.KeyValueType = TypeCode.Int32; keyList.Add(dataBaseCommandKeyInfo); sqlString = localDefine.GetCommandSQL_Previous(keyList,"ClientMaster_clm"); ClientMasterInfo clientMaster = null; try { clientMaster = GetRecordForSql(sqlString); } catch (Exception Ex) { throw Ex; } return clientMaster; }
public ClientMasterInfo GetRecord_Last() { LocalLayer.LocalDefine localDefine = new DAL.SqlDAL.LocalLayer.LocalDefine(); string sqlString = string.Empty; sqlString = localDefine.GetCommandSQL_Last("ClientMaster_clm"); ClientMasterInfo clientMaster = null; try { clientMaster = GetRecordForSql(sqlString); } catch (Exception Ex) { throw Ex; } return clientMaster; }