Пример #1
0
        public long GetLangId(Controller current, string lang)
        {
            long retorno = 1;


            lang = Session["lang_code"].ToString();

            var x = PwdEncript.criptograph.Descriptografar("zEDSC8Lxh/P88a+UO9jQqw==");

            dbconnection db = new dbconnection();

            db.CFG_APLICATIVO        = current.Server.MapPath("~/padv.cfg");
            opInt.ERR_LOGERRFILENAME = current.Server.MapPath("~/App_Data/") + Properties.Settings.Default.ErrLogFileName;
            db.setERRLOGFILENAME     = opInt.ERR_LOGERRFILENAME;

            if (!db.LOADCONFIG)
            {
                retorno = 0;
                throw new Exception();
            }
            ConfigDB.Conexao_Parametros("DOMIT_SERVER", db.getDBNAME, db.getDBPWD, db.getDBTYPE, db.getDBUSER);

            var ret = ConfigDB.GetInstanciaCon().TestConnection();

            current.Session["rcr"] = rcr;
            try
            {
                exist_languages exist_languages = new exist_languages();
                // var languages = exist_languages.Consultar();


                if (lang == null)
                {
                    Session["lang_code"] = exist_languages.LangViaId(Convert.ToInt64(Session["lang_id"]));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(retorno);
        }
Пример #2
0
 public Negocio()
 {
     conexao = ConfigDB.GetInstanciaCon();
 }