Effect of Charge and Dielectric Constant on Linear and Nonlinear Optical Properties of Two Dyes