Two-dimensional materials are an emerging class of new materials with a wide range of electrical and optical properties and potential applications. Single-layer structures of semiconducting transition metal dichalcogenides are gaining increasing attention for use in field-effect transistors. Here, we report a photoluminescence switching effect based on single-layer WSe2 transistors. Dual gates are used to tune the photoluminescence intensity. In particular, a side-gate is utilized to control the location of ions within a solid polymer electrolyte to form an electric double layer at the interface of electrolyte and WSe2 and induce a vertical electric field. Additionally, a back-gate is used to apply a 2nd vertical electric field. An on-off ratio of the light emission up to 90 was observed under constant pump light intensity. In addition, a blue shift of the photoluminescence line up to 36 meV was observed. We attribute this blue shift to the decrease of exciton binding energy due to the change of nonlinear in-plane dielectric constant and use it to determine the 3rd order off-diagonal susceptibility c{hi}^((3) )=3.50*10^(-19)m2/V2.