コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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);
        }