public Venta(string Periodo, CedEntidades.Sesion Sesion, string CedForecastWSRUL) : base() { periodo = Periodo; sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; }
static void Main() { try { Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; ArchDb = @System.Configuration.ConfigurationManager.AppSettings["ArchDb"]; VisualizarArchivos = @System.Configuration.ConfigurationManager.AppSettings["VisualizarArchivos"]; Modalidad = @System.Configuration.ConfigurationManager.AppSettings["Modalidad"]; OtrosFiltrosFiltrarBE = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosFiltrarBE"]; OtrosFiltrosFiltrarBS = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosFiltrarBS"]; OtrosFiltrosCuit = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosCuit"]; OtrosFiltrosPuntoVta = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosPuntoVta"]; StoreLocationActivacion = @System.Configuration.ConfigurationManager.AppSettings["StoreLocationActivacion"]; //seteo cultura thread CultureInfo cedeiraCultura = new CultureInfo(System.Configuration.ConfigurationManager.AppSettings["Cultura"], false); cedeiraCultura.DateTimeFormat = new CultureInfo(System.Configuration.ConfigurationManager.AppSettings["CulturaDateTimeFormat"], false).DateTimeFormat; Thread.CurrentThread.CurrentCulture = cedeiraCultura; FechaMin = Convert.ToDateTime("01/01/2001"); FechaMax = Convert.ToDateTime("31/12/9998"); Aplic = eFact_RN.Aplicacion.Crear(); Aplic.Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(3); Aplic.VersionParaControl = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(2); System.Text.StringBuilder auxCnn = new System.Text.StringBuilder(); auxCnn.Append(System.Configuration.ConfigurationManager.AppSettings["CnnStr"]); System.Text.StringBuilder auxCnnAplicExterna = new System.Text.StringBuilder(); auxCnnAplicExterna.Append(System.Configuration.ConfigurationManager.AppSettings["CnnStrAplicExterna"]); auxCnnAplicExterna.Append(Aplic.ArchPath); auxCnnAplicExterna.Append(ArchDb); Sesion = new CedEntidades.Sesion(); string Usuario = System.Environment.UserName; string Dominio = System.Environment.UserDomainName; eFact_RN.Sesion.Crear(Usuario, "", Dominio, auxCnn.ToString(), auxCnnAplicExterna.ToString(), "FrontEnd", Aplic.Version, Aplic.VersionParaControl, Sesion); if (Sesion != null) { Application.Run(new Tablero()); } else { throw new Microsoft.ApplicationBlocks.ExceptionManagement.Sesion.BaseApplicationException("Problemas para crear la sesion de trabajo"); } } catch (Exception ex) { Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(ex); } finally { Cursor.Current=System.Windows.Forms.Cursors.Default; } }
public Aplicacion() { sesion = new CedEntidades.Sesion(); vendedores = new List<eFact_Entidades.Vendedor>(); }
static void Main() { try { Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; ArchDb = @System.Configuration.ConfigurationManager.AppSettings["ArchDb"]; VisualizarArchivos = @System.Configuration.ConfigurationManager.AppSettings["VisualizarArchivos"]; Modalidad = @System.Configuration.ConfigurationManager.AppSettings["Modalidad"]; OtrosFiltrosFiltrarBE = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosFiltrarBE"]; OtrosFiltrosFiltrarBS = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosFiltrarBS"]; OtrosFiltrosCuit = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosCuit"]; OtrosFiltrosPuntoVta = @System.Configuration.ConfigurationManager.AppSettings["OtrosFiltrosPuntoVta"]; FechaMin = Convert.ToDateTime("01/01/2001"); FechaMax = Convert.ToDateTime("31/12/9998"); StoreLocationActivacion = @System.Configuration.ConfigurationManager.AppSettings["StoreLocationActivacion"]; //seteo cultura thread Thread.CurrentThread.CurrentCulture = new CultureInfo(System.Configuration.ConfigurationManager.AppSettings["Cultura"]); object changüí; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (StoreLocationActivacion == "CurrentUser") { if (!eFact_RN.Registro.Existe(Registry.CurrentUser, RegistroNombreClave)) { //Registracion changüí = Encryptor.Encrypt("0", "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); eFact_RN.Registro.Guardar(Registry.CurrentUser, RegistroNombreClave, "q", changüí); eFact_RN.Registro.Guardar(Registry.CurrentUser, RegistroNombreClave, "k", ""); } else { if (!eFact_RN.Registro.ExisteValor(Registry.CurrentUser, RegistroNombreClave, "q")) { changüí = Encryptor.Encrypt("0", "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); eFact_RN.Registro.Guardar(Registry.CurrentUser, RegistroNombreClave, "q", changüí); } if (!eFact_RN.Registro.ExisteValor(Registry.CurrentUser, RegistroNombreClave, "k")) { eFact_RN.Registro.Guardar(Registry.CurrentUser, RegistroNombreClave, "k", ""); } } } else { if (!eFact_RN.Registro.Existe(Registry.LocalMachine, RegistroNombreClave)) { //Registracion changüí = Encryptor.Encrypt("0", "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); eFact_RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "q", changüí); eFact_RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "k", ""); } else { if (!eFact_RN.Registro.ExisteValor(Registry.LocalMachine, RegistroNombreClave, "q")) { changüí = Encryptor.Encrypt("0", "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); eFact_RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "q", changüí); } if (!eFact_RN.Registro.ExisteValor(Registry.LocalMachine, RegistroNombreClave, "k")) { eFact_RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "k", ""); } } } //Verificar changüí if (StoreLocationActivacion == "CurrentUser") { eFact_RN.Registro.Leer(Registry.CurrentUser, RegistroNombreClave, "q", out changüí); } else { eFact_RN.Registro.Leer(Registry.LocalMachine, RegistroNombreClave, "q", out changüí); } int i = Convert.ToInt32(Encryptor.Decrypt(changüí.ToString(), "srgerg$%^bg", Convert.FromBase64String("srfjuoxp"))); if (i > 0) { i--; changüí = Encryptor.Encrypt(i.ToString(), "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); if (StoreLocationActivacion == "CurrentUser") { eFact_RN.Registro.Guardar(Registry.CurrentUser, RegistroNombreClave, "q", changüí); } else { eFact_RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "q", changüí); } Application.Run(new Tablero()); } else { //Verificar activacion ClaveSolicitud = eFact_RN.Disco.ClaveSolicitud(); string claveSolicitud = Encryptor.Encrypt(ClaveSolicitud, "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); object claveActivacion; if (StoreLocationActivacion == "CurrentUser") { eFact_RN.Registro.Leer(Registry.CurrentUser, RegistroNombreClave, "k", out claveActivacion); } else { eFact_RN.Registro.Leer(Registry.LocalMachine, RegistroNombreClave, "k", out claveActivacion); } if (claveSolicitud == claveActivacion.ToString()) { Aplic = eFact_RN.Aplicacion.Crear(); System.Text.StringBuilder auxCnn = new System.Text.StringBuilder(); auxCnn.Append(System.Configuration.ConfigurationManager.AppSettings["CnnStr"]); System.Text.StringBuilder auxCnnAplicExterna = new System.Text.StringBuilder(); auxCnnAplicExterna.Append(System.Configuration.ConfigurationManager.AppSettings["CnnStrAplicExterna"]); auxCnnAplicExterna.Append(Aplic.ArchPath); auxCnnAplicExterna.Append(ArchDb); Sesion = new CedEntidades.Sesion(); string Usuario = System.Environment.UserName; string Dominio = System.Environment.UserDomainName; eFact_RN.Sesion.Crear(Usuario, "", Dominio, auxCnn.ToString(), auxCnnAplicExterna.ToString(), "FrontEnd", Aplic.Version, Aplic.VersionParaControl, Sesion); if (Sesion != null) { Application.Run(new Tablero()); } else { throw new Microsoft.ApplicationBlocks.ExceptionManagement.Sesion.BaseApplicationException("Problemas para crear la sesion de trabajo"); } } else { Application.Run(new Activacion()); } } } catch (Exception ex) { Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(ex); } finally { Cursor.Current=System.Windows.Forms.Cursors.Default; } }
public Cliente(CedEntidades.Sesion Sesion, string CedForecastWSRUL) : base() { sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; }
public db(CedEntidades.Sesion Sesion) { // Constructor this.sesion = Sesion; }
public FamiliaArticulo(CedEntidades.Sesion Sesion) { sesion = Sesion; }
public FamiliaArticulo(CedEntidades.Sesion Sesion, string CedForecastWSRUL) { sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; }
public ProyeccionAnual(CedEntidades.Sesion Sesion, string CedForecastWSRUL, string Periodo) { sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; periodo = Periodo; }
static void Main() { try { Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; ArchDb = @System.Configuration.ConfigurationManager.AppSettings["ArchDb"]; ArchPath = @System.Configuration.ConfigurationManager.AppSettings["ArchPath"]; CodigoAplic = @System.Configuration.ConfigurationManager.AppSettings["CodigoAplic"]; Modalidad = @System.Configuration.ConfigurationManager.AppSettings["Modalidad"]; Testing = Convert.ToBoolean(@System.Configuration.ConfigurationManager.AppSettings["Testing"]); FechaMin = Convert.ToDateTime("01/01/2001"); FechaMax = Convert.ToDateTime("31/12/9998"); //seteo cultura thread Thread.CurrentThread.CurrentCulture = new CultureInfo(System.Configuration.ConfigurationManager.AppSettings["Cultura"]); //object changüí; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //if (!RN.Registro.Existe(Registry.LocalMachine, RegistroNombreClave)) //{ // //Registracion // changüí = Encryptor.Encrypt("0", "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); // RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "q", changüí); // RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "k", ""); //} ////Verificar changüí //RN.Registro.Leer(Registry.LocalMachine, RegistroNombreClave, "q", out changüí); //int i = Convert.ToInt32(Encryptor.Decrypt(changüí.ToString(), "srgerg$%^bg", Convert.FromBase64String("srfjuoxp"))); //if (i > 0) //{ // i--; // changüí = Encryptor.Encrypt(i.ToString(), "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); // RN.Registro.Guardar(Registry.LocalMachine, RegistroNombreClave, "q", changüí); // Application.Run(new TableroBj()); //} //else //{ // //Verificar activacion // ClaveSolicitud = RN.Disco.ClaveSolicitud(); // string claveSolicitud = Encryptor.Encrypt(ClaveSolicitud, "srgerg$%^bg", Convert.FromBase64String("srfjuoxp")).ToString(); // object claveActivacion; // RN.Registro.Leer(Registry.LocalMachine, RegistroNombreClave, "k", out claveActivacion); // if (claveSolicitud == claveActivacion.ToString()) // { System.Text.StringBuilder auxCnn = new System.Text.StringBuilder(); auxCnn.Append(System.Configuration.ConfigurationManager.AppSettings["CnnStr"]); System.Text.StringBuilder auxCnnAplicExterna = new System.Text.StringBuilder(); auxCnnAplicExterna.Append(System.Configuration.ConfigurationManager.AppSettings["CnnStrAplicExterna"]); eFact_I_Bj.Entidades.Aplicacion aplic = eFact_I_Bj.RN.Aplicacion.Crear(); Sesion = new CedEntidades.Sesion(); eFact_I_Bj.RN.Sesion.Crear("Usr_eFact", "", "NONE", auxCnn.ToString(), auxCnnAplicExterna.ToString(), "FrontEndBj", aplic.Version, aplic.VersionParaControl, Sesion); if (Sesion != null) { Application.Run(new TableroBj()); } else { throw new Microsoft.ApplicationBlocks.ExceptionManagement.Sesion.BaseApplicationException("Problemas para crear la sesion de trabajo"); } // } // else // { // Application.Run(new Activacion()); // } //} } catch (Exception ex) { Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(ex); } finally { Cursor.Current=System.Windows.Forms.Cursors.Default; } }
public Articulo(CedEntidades.Sesion Sesion, string CedForecastWSRUL) : base() { sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; }
public Zona(CedEntidades.Sesion Sesion, string CedForecastWSRUL) { sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; }
public RollingForecast(CedEntidades.Sesion Sesion, string CedForecastWSRUL, string Periodo) { sesion = Sesion; cedForecastWSRUL = CedForecastWSRUL; periodo = Periodo; }
private CedEntidades.Sesion Sesion() { CedEntidades.Sesion sesion = new CedEntidades.Sesion(); sesion.CnnStr = System.Configuration.ConfigurationManager.AppSettings["CnnStr"].ToString(); return sesion; }
//static void Main() //{ // Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(false); // Application.Run(new TableroForm()); //} static void Main() { try { Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; //seteo cultura thread CultureInfo cedeiraCultura = new CultureInfo(System.Configuration.ConfigurationManager.AppSettings["Cultura"], false); cedeiraCultura.DateTimeFormat = new CultureInfo(System.Configuration.ConfigurationManager.AppSettings["CulturaDateTimeFormat"], false).DateTimeFormat; Thread.CurrentThread.CurrentCulture = cedeiraCultura; // Determino el path de la aplicacion string AppPath = @Application.StartupPath; AppPath = AppPath.ToLower().Replace(@"\bin\debug", "") + @"\"; // Parametros varios CampoHabilitadoBackColor = System.Drawing.Color.FromName(System.Configuration.ConfigurationManager.AppSettings["CampoHabilitadoBackColor"]); LabelCampoHabilitadoForeColor = System.Drawing.Color.FromName(System.Configuration.ConfigurationManager.AppSettings["LabelCampoHabilitadoForeColor"]); CampoDesHabilitadoBackColor = System.Drawing.Color.FromName(System.Configuration.ConfigurationManager.AppSettings["CampoDesHabilitadoBackColor"]); LabelCampoDesHabilitadoForeColor = System.Drawing.Color.FromName(System.Configuration.ConfigurationManager.AppSettings["LabelCampoDesHabilitadoForeColor"]); // Creo una sesion de trabajo Titulo = ((AssemblyDescriptionAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description; Codigo = ((AssemblyTitleAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0]).Title; Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major + "." + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor + "." + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build; Cedeira.UI.Mostrar.Acerca(Titulo, "(" + Codigo + ")", "Versión " + Version, 3); string idUsuarioWindows = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Split(@"\".ToCharArray())[1].ToString(); string idUsuario = String.Empty; string password = String.Empty; switch (System.Configuration.ConfigurationManager.AppSettings["Autenticacion"].ToUpper()) { case "NONE": idUsuario = idUsuarioWindows; break; default: throw new Microsoft.ApplicationBlocks.ExceptionManagement.Login.AutenticacionInvalida(); } Cursor.Current = System.Windows.Forms.Cursors.Default; if (!idUsuario.Equals(string.Empty)) { System.Configuration.ConnectionStringSettingsCollection connections = System.Configuration.ConfigurationManager.ConnectionStrings; string cnnStr = connections["CnnStr"].ConnectionString; string cnnStrBejerman = connections["CnnStrBejerman"].ConnectionString; string versionParaControl = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major.ToString() + "." + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor.ToString(); Sesion = new CedEntidades.Sesion(); Cedeira.SV.Sesion.Crear( idUsuario, password, "Windows", cnnStr, cnnStrBejerman, "FrontEnd", Version, versionParaControl, Sesion); Cedeira.RecursoIncrustado r = new Cedeira.RecursoIncrustado(); r.GuardarRecursoIncrustado(); // Levanto el Front-End de la aplicacion SingleInstance.SingleApplication.Run(new TableroForm(Titulo)); } Cedeira.UI.Mostrar.Acerca(Aplicacion.Titulo, "Gracias", "por utilizar " + Codigo, 2); } catch (Exception ex) { Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(ex); } finally { Cursor.Current = System.Windows.Forms.Cursors.Default; } }