Ejemplo n.º 1
0
        protected void btnGuardarConfigNegocio_Click(object sender, EventArgs e)
        {
            Data2.Class.Struct_UserConfig UC = Data2.Class.Struct_UserConfig.getUserConfig(UserId);
            if (UC == null)
            {
                UC = new Struct_UserConfig();
            }

            UC.FacturaPorDefecto  = cmb_FacturaPorDefecto.SelectedValue;
            UC.NombreNegocio      = txt_NombreNegocio.Text;
            UC.MostrarLogoNegocio = chk_MostrarLogoNegocio.Checked;
            UC.PIN           = "";
            UC.MostrarKiosco = chk_HabilitarKiosco.Checked;
            UC.Guardar(UserId);
        }
Ejemplo n.º 2
0
        private void ConfigurarControlesFactura()
        {
            btn_NuevaVenta.Visible         = false;
            btn_CancelarVenta.Visible      = true;
            controlesFactura.Visible       = true;
            controlesFactura.ClientIDMode  = System.Web.UI.ClientIDMode.Static;
            ControlesFacturaA.ClientIDMode = System.Web.UI.ClientIDMode.Static;


            List <Struct_Vendedores> SellerList = Data2.Class.Struct_Vendedores.GetAllVendedores(Conversion.ObtenerLocal(UserId));

            if (!IsPostBack && SellerList != null && SellerList.Count > 0)
            {
                cmbVendedor.Items.Clear();
                cmbVendedor.Items.Add(new System.Web.UI.WebControls.ListItem("Ninguno", "0"));
                for (int a = 0; a < SellerList.Count; a++)
                {
                    System.Web.UI.WebControls.ListItem ListI = new System.Web.UI.WebControls.ListItem(SellerList[a].NombreVendedor, SellerList[a].Id.ToString());
                    cmbVendedor.Items.Add(ListI);
                }
                Data2.Statics.Log.ADD("Se agrega data", this);
            }
            else
            {
                Data2.Statics.Log.ADD("No se agrega data", this);
            }

            Data2.Class.Struct_UserConfig _UC = Data2.Class.Struct_UserConfig.GetUserConfig(Conversion.ObtenerLocal(UserId));

            if (_UC != null && _UC.MostrarKiosco == true)
            {
                ModoRapido.Visible  = true;
                HF_ModoRapido.Value = "1";
            }
            else
            {
                ModoRapido.Visible  = false;
                HF_ModoRapido.Value = "0";
            }
        }
Ejemplo n.º 3
0
 void LlenarCamposUserConfig()
 {
     Data2.Class.Struct_UserConfig UC = Data2.Class.Struct_UserConfig.getUserConfig(UserId);
     if (UC != null)
     {
         MensajeConfigUsuario.Visible   = false;
         txt_NombreNegocio.Text         = UC.NombreNegocio;
         chk_MostrarLogoNegocio.Checked = UC.MostrarLogoNegocio;
         chk_HabilitarKiosco.Checked    = UC.MostrarKiosco;
         for (int a = 0; a < cmb_FacturaPorDefecto.Items.Count; a++)
         {
             if (cmb_FacturaPorDefecto.Items[a].Value == UC.FacturaPorDefecto)
             {
                 cmb_FacturaPorDefecto.SelectedIndex = a;
                 break;
             }
         }
     }
     else
     {
         MensajeConfigUsuario.Visible   = true;
         MensajeConfigUsuario.InnerText = "No exiten configuraciones del usuario";
     }
 }