public void BuscarCuit()
        {
            var dbContext = new DesktopEntities.Models.CooperativaProduccionEntities();
            var result    = (
                from a in Context.Vw_Productor
                select new
            {
                full = a.nrofet + a.NOMBRE + a.CUIT,
                ID = a.ID,
                FET = a.nrofet,
                PRODUCTOR = a.NOMBRE,
                CUIT = a.CUIT,
                PROVINCIA = a.Provincia
            });
            var busqueda = result
                           .Where(r => r.CUIT.Contains(cuit))
                           .ToList();

            if (busqueda.Count > 0)
            {
                gridControlProductor.DataSource      = busqueda;
                gridViewProductor.Columns[0].Visible = false;
                gridViewProductor.Columns[1].Visible = false;
                gridViewProductor.Columns[2].Width   = 90;
                gridViewProductor.Columns[3].Width   = 150;
                gridViewProductor.Columns[4].Width   = 100;
                gridViewProductor.Columns[5].Width   = 100;
            }
        }
Exemple #2
0
        private void CargarPermisos(Guid UsuarioId)
        {
            var dbContext = new DesktopEntities.Models.CooperativaProduccionEntities();

            var permisos = Context.Usuario
                           .Where(x => x.Id == UsuarioId);

            if (permisos.Count() > 0)
            {
                #region Módulo Romaneo

                var permiso = permisos.FirstOrDefault();

                checkPreingreso.Checked = permiso.Preingreso.Equals(true) ?
                                          true : false;

                checkPesada.Checked = permiso.Pesada.Equals(true) ?
                                      true : false;

                if (permiso.ReimpresionRomaneo == true)
                {
                    checkListRomaneo.SetItemChecked(0, true);
                }
                else
                {
                    checkListRomaneo.SetItemChecked(0, false);
                }

                if (permiso.ResumenRomaneo == true)
                {
                    checkListRomaneo.SetItemChecked(1, true);
                }
                else
                {
                    checkListRomaneo.SetItemChecked(1, false);
                }

                if (permiso.ResumenCompra == true)
                {
                    checkListRomaneo.SetItemChecked(2, true);
                }
                else
                {
                    checkListRomaneo.SetItemChecked(2, false);
                }

                if (permiso.ResumenClaseMes == true)
                {
                    checkListRomaneo.SetItemChecked(3, true);
                }
                else
                {
                    checkListRomaneo.SetItemChecked(3, false);
                }

                if (permiso.ResumenClaseTrimestre == true)
                {
                    checkListRomaneo.SetItemChecked(4, true);
                }
                else
                {
                    checkListRomaneo.SetItemChecked(4, false);
                }

                checkReclasificacion.Checked = permiso.Reclasificacion.Equals(true) ?
                                               true : false;

                checkGestionReclasificacion.Checked = permiso.GestionReclasificacion.Equals(true) ?
                                                      true : false;

                #endregion

                #region Módulo Seguridad

                checkSeguridad.Checked = permiso.Seguridad.Equals(true) ?
                                         true : false;

                #endregion

                #region Módulo Configuracion

                checkConfiguracion.Checked = permiso.Configuracion.Equals(true) ?
                                             true : false;

                #endregion

                #region Módulo de Administracion

                if (permiso.Liquidar == true)
                {
                    checkListLiquidacion.SetItemChecked(0, true);
                }
                else
                {
                    checkListLiquidacion.SetItemChecked(0, false);
                }

                if (permiso.LiquidacionSubirAfip == true)
                {
                    checkListLiquidacion.SetItemChecked(1, true);
                }
                else
                {
                    checkListLiquidacion.SetItemChecked(1, false);
                }

                if (permiso.LiquidacionImprimir == true)
                {
                    checkListLiquidacion.SetItemChecked(2, true);
                }
                else
                {
                    checkListLiquidacion.SetItemChecked(2, false);
                }

                checkGenerarOrdenPago.Checked = permiso.GenerarOrdenPago.Equals(true) ?
                                                true : false;

                checkGestionCata.Checked = permiso.GestionCata.Equals(true) ?
                                           true : false;

                checkGestionCaja.Checked = permiso.GestionCaja.Equals(true) ?
                                           true : false;

                checkGenerarOrdenVenta.Checked = permiso.GenerarOrdenVenta.Equals(true) ?
                                                 true : false;

                checkGenerarRemitoElectronico.Checked = permiso.GenerarRemitoElectronico.Equals(true) ?
                                                        true : false;

                checkListaPrecio.Checked = permiso.GestionarListaPrecio.Equals(true) ?
                                           true : false;

                #endregion
            }
        }
Exemple #3
0
 public SplashScreen1()
 {
     InitializeComponent();
     _dbContext = new DesktopEntities.Models.CooperativaProduccionEntities();
 }