Beispiel #1
0
        public void CargarConfiguracion()
        {
            string     strMensaje = "";
            SqlCommand cmd        = new SqlCommand();
            DataSet    ds;

            cmd.CommandText = "pa_ConfCorreo_sel";
            cmd.CommandType = CommandType.Text;
            ds = cn.Listar(ConfigurationManager.AppSettings["ConnectionBD"], cmd, ref strMensaje);

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strDesde      = ds.Tables[0].Rows[0]["Desde"].ToString();
                    strCredencial = ds.Tables[0].Rows[0]["Credencial"].ToString();
                    strClave      = ds.Tables[0].Rows[0]["Clave"].ToString();
                    strHost       = ds.Tables[0].Rows[0]["Host"].ToString();
                    strPort       = Convert.ToInt16(ds.Tables[0].Rows[0]["Port"]);
                }
            }
        }