Ejemplo n.º 1
0
        public bool Delete(RoomRatePlan roomRatePlan)
        {
            Database  db      = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_RoomRatePlanDelete");

            db.AddInParameter(command, "@RoomRatePlanId", DbType.Int32, roomRatePlan.RoomRatePlanId);

            db.ExecuteNonQuery(command);

            return(true);
        }
        public bool Delete(RoomRatePlan roomRatePlan)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_RoomRatePlanDelete");

            db.AddInParameter(command, "@RoomRatePlanId", DbType.Int32, roomRatePlan.RoomRatePlanId);

            db.ExecuteNonQuery(command);

            return true;
        }
        public bool Insert(RoomRatePlan roomRatePlan)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_RoomRatePlanInsert");

            db.AddInParameter(command, "@RoomId", DbType.Int32, roomRatePlan.RoomId);
            db.AddInParameter(command, "@RatePlanId", DbType.Int32, roomRatePlan.RatePlanId);
            db.AddInParameter(command, "@Note", DbType.String, roomRatePlan.Note);
            db.AddInParameter(command, "@CreatedUser", DbType.Int32, roomRatePlan.CreatedUser);

            db.ExecuteNonQuery(command);

            return true;
        }
Ejemplo n.º 4
0
        public bool Insert(RoomRatePlan roomRatePlan)
        {
            Database  db      = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_RoomRatePlanInsert");

            db.AddInParameter(command, "@RoomId", DbType.Int32, roomRatePlan.RoomId);
            db.AddInParameter(command, "@RatePlanId", DbType.Int32, roomRatePlan.RatePlanId);
            db.AddInParameter(command, "@Note", DbType.String, roomRatePlan.Note);
            db.AddInParameter(command, "@CreatedUser", DbType.Int32, roomRatePlan.CreatedUser);


            db.ExecuteNonQuery(command);

            return(true);
        }