We formulate and analyze the dynamics of an influenza pandemic model with vaccination and treatment using two preventive scenarios: increase and decrease in vaccine uptake. Due to the seasonality of the influenza pandemic, the dynamics is studied in a finite time interval. We focus primarily on controlling the disease with a possible minimal cost and side effects using control theory which is therefore applied via the Pontryagin's maximum principle, and it is observed that full treatment effort should be given while increasing vaccination at the onset of the outbreak. Next, sensitivity analysis and simulations (using the fourth order Runge-Kutta scheme) are carried out in order to determine the relative importance of different factors responsible for disease transmission and prevalence. The most sensitive parameter of the various reproductive numbers apart from the death rate is the inflow rate, while the proportion of new recruits and the vaccine efficacy are the most sensitive parameters for the endemic equilibrium point.