Exemplo n.º 1
0
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            var esValido = this.ValidarForm();

            if (!esValido)
            {
                return;
            }

            if (Descripcion != "" && Porcentaje > 0)
            {
                var tipoTaller = new Tallere();
                tipoTaller.Id             = Guid.NewGuid();
                tipoTaller.Descripcion    = Descripcion;
                tipoTaller.Porcentaje     = Porcentaje;
                tipoTaller.Activo         = true;
                tipoTaller.OperadorAltaId = Context.OperadorActual.Id;
                tipoTaller.SucursalAltaId = Context.SucursalActual.Id;
                tipoTaller.FechaAlta      = _clock.Now;

                Uow.Talleres.Agregar(tipoTaller);
                Uow.Commit();

                RefrescarListado();
                Descripcion = "";
                Porcentaje  = 0;
            }
        }
Exemplo n.º 2
0
        private void DeleteTipoTaller(Tallere tipoTaller)
        {
            tipoTaller.Activo                 = false;
            tipoTaller.FechaModificacion      = _clock.Now;
            tipoTaller.OperadorModificacionId = Context.OperadorActual.Id;
            tipoTaller.SucursalModificacionId = Context.SucursalActual.Id;

            Uow.Talleres.Modificar(tipoTaller);
            Uow.Commit();
            RefrescarListado();
        }