public DataSet SelectAll(GuestType guestType) { Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING); DbCommand dbCommand = db.GetStoredProcCommand("usp_GuestTypeSelectAll"); db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, guestType.CompanyId); return db.ExecuteDataSet(dbCommand); }
public DataSet SelectAll(GuestType guestType) { Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING); DbCommand dbCommand = db.GetStoredProcCommand("usp_GuestTypeSelectAll"); db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, guestType.CompanyId); return(db.ExecuteDataSet(dbCommand)); }
public bool IsDuplicateTypeName(GuestType guestType) { bool result = false; Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING); DbCommand dbCommand = db.GetStoredProcCommand("usp_GuestTypeIsDuplicateTypeName"); db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, guestType.CompanyId); db.AddInParameter(dbCommand, "@GuestTypeId", DbType.Int32, guestType.GuestTypeId); db.AddInParameter(dbCommand, "@GuestTypeName", DbType.String, guestType.GuestTypeName); db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1); db.ExecuteNonQuery(dbCommand); result = Convert.ToBoolean(db.GetParameterValue(dbCommand, "@IsExist").ToString()); return result; }
public bool IsDuplicateTypeName(GuestType guestType) { bool result = false; Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING); DbCommand dbCommand = db.GetStoredProcCommand("usp_GuestTypeIsDuplicateTypeName"); db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, guestType.CompanyId); db.AddInParameter(dbCommand, "@GuestTypeId", DbType.Int32, guestType.GuestTypeId); db.AddInParameter(dbCommand, "@GuestTypeName", DbType.String, guestType.GuestTypeName); db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1); db.ExecuteNonQuery(dbCommand); result = Convert.ToBoolean(db.GetParameterValue(dbCommand, "@IsExist").ToString()); return(result); }