public bool IsExistRecord(string clientNum) { bool isExist = false; string sqlString = string.Empty; object valueObject = null; sqlString = "SELECT COUNT(1) FROM ClientMaster_clm" + Environment.NewLine; sqlString += " WHERE clm_cClientNum='" + clientNum.Trim().Replace("'", "''") + "'"; DataBaseCommand <ClientMasterInfo> dataBaseCommand = new DataBaseCommand <ClientMasterInfo>(); try { valueObject = dataBaseCommand.GetValue(sqlString, typeof(int)); } catch (Exception Ex) { throw Ex; } int count = (int)valueObject; if (count > 0) { isExist = true; } return(isExist); }
public bool IsExistRecord(string userID) { bool isExist = false; string sqlString = string.Empty; object valueObject = null; sqlString = "SELECT COUNT(1) FROM " + this._dataBaseDic[UserInformationInfoEnum.TableName.ToString()] + this._newLineSybm; sqlString += " WHERE " + this._dataBaseDic[UserInformationInfoEnum.UsmCUserID.ToString()] + "='" + userID.Replace("'", "''").Trim() + "'"; DataBaseCommand <UserInformationInfo> dataBaseCommand = new DataBaseCommand <UserInformationInfo>(); try { valueObject = dataBaseCommand.GetValue(sqlString, typeof(int)); } catch (Exception Ex) { throw Ex; } int count = (int)valueObject; if (count > 0) { isExist = true; } return(isExist); }
public bool IsExistRecord(string key1, string key2, string value) { bool isExist = false; string sqlString = string.Empty; object valueObject = null; sqlString = "SELECT COUNT(1) FROM " + this._dataBaseDic[CodeMasterInfoEnum.TableName.ToString()] + this._newLineSybm; sqlString += " WHERE " + this._dataBaseDic[CodeMasterInfoEnum.CmtCKey1.ToString()] + "='" + key1.Replace("'", "''").Trim() + "'" + this._newLineSybm; sqlString += " AND " + this._dataBaseDic[CodeMasterInfoEnum.CmtCKey2.ToString()] + "='" + key2.Replace("'", "''").Trim() + "'" + this._newLineSybm; //sqlString += " AND " + this._dataBaseDic[CodeMasterInfoEnum.CmtCValue.ToString()] + "='" + value.Replace("'", "''").Trim() + "'" + this._newLineSybm; DataBaseCommand <CodeMasterInfo> dataBaseCommand = new DataBaseCommand <CodeMasterInfo>(); try { valueObject = dataBaseCommand.GetValue(sqlString, typeof(int)); } catch (Exception Ex) { throw Ex; } int count = (int)valueObject; if (count > 0) { isExist = true; } return(isExist); }
public bool IsExistRecord(string key1, string key2, string value) { bool isExist = false; string sqlString = string.Empty; object valueObject = null; sqlString = "SELECT COUNT(1) FROM " + this._dataBaseDic[CodeMasterInfoEnum.TableName.ToString()] + this._newLineSybm; sqlString += " WHERE " + this._dataBaseDic[CodeMasterInfoEnum.CmtCKey1.ToString()] + "='" + key1.Replace("'", "''").Trim() + "'" + this._newLineSybm; sqlString += " AND " + this._dataBaseDic[CodeMasterInfoEnum.CmtCKey2.ToString()] + "='" + key2.Replace("'", "''").Trim() + "'" + this._newLineSybm; //sqlString += " AND " + this._dataBaseDic[CodeMasterInfoEnum.CmtCValue.ToString()] + "='" + value.Replace("'", "''").Trim() + "'" + this._newLineSybm; DataBaseCommand<CodeMasterInfo> dataBaseCommand = new DataBaseCommand<CodeMasterInfo>(); try { valueObject = dataBaseCommand.GetValue(sqlString, typeof(int)); } catch (Exception Ex) { throw Ex; } int count = (int)valueObject; if (count > 0) { isExist = true; } return isExist; }
public bool IsExistRecord(string deptNum) { bool isExist = false; string sqlString = string.Empty; object valueObject = null; sqlString = "SELECT COUNT(1) FROM " + this._dataDictionary[DeptMasterInfoEnum.TableName.ToString()] + this._newLineSybm; sqlString += " WHERE " + this._dataDictionary[DeptMasterInfoEnum.DpmCDeptNumber.ToString()] + "='" + deptNum.Replace("'", "''").Trim() + "'"; DataBaseCommand<DeptMasterInfo> dataBaseCommand = new DataBaseCommand<DeptMasterInfo>(); try { valueObject = dataBaseCommand.GetValue(sqlString, typeof(int)); } catch (Exception Ex) { throw Ex; } int count = (int)valueObject; if (count > 0) { isExist = true; } return isExist; }
public bool IsExistRecord(string clientNum) { bool isExist = false; string sqlString = string.Empty; object valueObject = null; sqlString = "SELECT COUNT(1) FROM ClientMaster_clm" + Environment.NewLine; sqlString += " WHERE clm_cClientNum='" + clientNum.Trim().Replace("'", "''") + "'"; DataBaseCommand<ClientMasterInfo> dataBaseCommand = new DataBaseCommand<ClientMasterInfo>(); try { valueObject = dataBaseCommand.GetValue(sqlString, typeof(int)); } catch (Exception Ex) { throw Ex; } int count = (int)valueObject; if (count > 0) { isExist = true; } return isExist; }