Version OScar
This commit is contained in:
96
ADSUtileriasWF/Helpers/ModVars.cs
Normal file
96
ADSUtileriasWF/Helpers/ModVars.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using ADSUtileriasWF.Data.Externa.PV;
|
||||
using DocumentFormat.OpenXml.Office2013.Word;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Text;
|
||||
using UtileriasServiceWCF;
|
||||
|
||||
namespace ADSUtileriasWF.Helpers
|
||||
{
|
||||
public static class ModVarsPV
|
||||
{
|
||||
|
||||
public enum ModuloActivo
|
||||
{
|
||||
Checador,
|
||||
PuntoVenta
|
||||
}
|
||||
|
||||
public static ModuloActivo moduloActivo = ModuloActivo.Checador;
|
||||
#region PuntodeVenta
|
||||
public static WCF_PV.Usuario UsuarioActual;
|
||||
public static UtileriasServiceWCF.ResponseLogin UserV2;
|
||||
|
||||
public static string subproyecto;
|
||||
public static WCF_PV.PuntoVentaClient.EndpointConfiguration EndPointName = WCF_PV.PuntoVentaClient.EndpointConfiguration.basicHttpBinding_IPuntoVenta;
|
||||
public static string RutaWCF = "http://localhost:8000/WCF/";
|
||||
public static string Address { get { return string.Format("{0}Clase", RutaWCF); } }
|
||||
|
||||
|
||||
public static ClsVta_Cortes.ClsVta_CortesModel CorteActual;
|
||||
public static int CveClientePG = 3940;//Publico general
|
||||
public static decimal IVAClientePG = (decimal)0.16;//Publico general
|
||||
public static Data.Externa.PV.TamanoTicket TamanoTicketConfigurado = Data.Externa.PV.TamanoTicket.Chico;
|
||||
public static bool ImprimirComandas = false;
|
||||
public static System.Drawing.Color ColorBTNs = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.ActiveBorder);
|
||||
|
||||
public static string TipoTerminal;
|
||||
public static int CveTipoTerminal
|
||||
{
|
||||
get
|
||||
{
|
||||
int cvetipoterminal = 0;
|
||||
if (ModVarsPV.TipoTerminal != null)
|
||||
{
|
||||
string[] spliteditems = ModVarsPV.TipoTerminal.Split("_");
|
||||
cvetipoterminal = (spliteditems[0]).ToEntero();
|
||||
|
||||
}
|
||||
return cvetipoterminal;
|
||||
}
|
||||
|
||||
}
|
||||
public static string txtTipoTerminal
|
||||
{
|
||||
get
|
||||
{
|
||||
string txttipoterminal = "";
|
||||
if (ModVarsPV.TipoTerminal != null)
|
||||
{
|
||||
string[] spliteditems = ModVarsPV.TipoTerminal.Split("_");
|
||||
if (spliteditems.Length > 1)
|
||||
{ txttipoterminal = (spliteditems[1]); }
|
||||
|
||||
}
|
||||
return txttipoterminal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static bool TieneProceso(this ResponseLogin UsuarioClase, int CveProceso)
|
||||
{
|
||||
|
||||
|
||||
var result = UsuarioClase.UsuariosRolesProcesos?.Where(kv => kv.cveProceso == CveProceso )?.ToList();
|
||||
|
||||
if(result!= null && result.Count > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//public static string Istouch;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user