コード例 #1
0
 protected void Detalle()
 {
     try
     {
         CNCorreccion ObjCN = new CNCorreccion();
         DataTable    temp  = new DataTable();
         CECorreccion Obj   = new CECorreccion();
         Obj.Codigo = Convert.ToInt32(lblCodigoCorrelativoDetalle.Text);
         temp       = ObjCN.ListarDetalleCorrelativoCorreccion(Obj, ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
         if (lblUsuarioDetalle.Text == User.Identity.Name.ToString())
         {
             pnPanelInsercionDetalle.Visible = true;
             pnListadoDetalle.Height         = 400;
         }
         else
         {
             pnPanelInsercionDetalle.Visible = false;
             pnListadoDetalle.Height         = 570;
         }
         gvDetalle.DataSource = temp;
         gvDetalle.DataBind();
     }
     catch (Exception ex)
     {
         ucMsje.RegistrarMensajeCliente("dvMsjeError", Funciones.m_strImagenError, ex.Message + "<br />" + ex.StackTrace);
     }
     finally
     {
     }
 }
コード例 #2
0
    protected void btnGuardarAgregarDetalle_Click(object sender, EventArgs e)
    {
        try
        {
            CNCorreccion ObjCN = new CNCorreccion();
            CEDetalle    Obj   = new CEDetalle();
            Obj.Motivo            = txtMotivo.Text;
            Obj.Archivo           = txtNombreArchivo.Text;
            Obj.Tipo              = ddlTipoDetalle.SelectedValue;
            Obj.CodigoCorrelativo = Convert.ToInt32(lblCodigoCorrelativoDetalle.Text);
            Obj.Codigo            = Convert.ToInt32(lblCodigoDetalle.Text);

            if (lblCodigoDetalle.Text == "0")
            {
                ObjCN.InsertarDetalleCorreccion(Obj, ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
            }
            else
            {
                ObjCN.ActualizarDetalleCorrelativoCorreccion(Obj, ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
            }
            lblCodigoDetalle.Text = "0";
            Detalle();
            LimpiarRegistrarDetalle();
            mpeDetalle.Show();
        }
        catch (Exception ex)
        {
            ucMsje.RegistrarMensajeCliente("dvMsjeError", Funciones.m_strImagenError, ex.Message + "<br />" + ex.StackTrace);
        }
        finally
        {
        }
    }
コード例 #3
0
 protected void buscarcorrecciones()
 {
     try
     {
         CNCorreccion ObjCN = new CNCorreccion();
         DataTable    temp  = new DataTable();
         temp = ObjCN.ListarCorrecciones(ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
         gvCorrecciones.DataSource = temp;
         gvCorrecciones.DataBind();
         Funciones.MostrarInformacionGrilla(temp.Rows.Count, gvCorrecciones, spRegistros);
         Funciones.OcultarColumnasGridView(gvCorrecciones, 1);
     }
     catch (Exception ex)
     {
         ucMsje.RegistrarMensajeCliente("dvMsjeError", Funciones.m_strImagenError, ex.Message + "<br />" + ex.StackTrace);
     }
     finally
     {
     }
 }
コード例 #4
0
    protected void btnGuardarTabla_Click(object sender, EventArgs e)
    {
        try
        {
            int          codigo;
            CNCorreccion ObjCN = new CNCorreccion();
            CECorreccion ObjCE = new CECorreccion();


            ObjCE.CodigoAsignado = Convert.ToInt32(ddlUsuario.SelectedValue);
            ObjCE.Fecha          = Convert.ToDateTime(txtfecha.Text);
            ObjCE.Descripcion    = txtDescripcion.Text;
            ObjCE.Version        = txtVersion.Text;
            ObjCE.Codigo         = Convert.ToInt32(lblCodigoCorrelativo.Text);
            ObjCE.Mejora         = ddlMejora.SelectedValue;

            if (lblCodigoCorrelativo.Text == "0")
            {
                codigo = ObjCN.InsertarCorrelativoCorreccion(ObjCE, ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Msje", "alert('Se ha realizado la peticion de un nuevo correlativo de correccion satisfactoriamente.\\n\\n Numero de Correlativo asignado:" + codigo + "');", true);
                //txtNumero.Text = codigo.ToString();
                //mpeNuevo.Show();
            }
            else
            {
                ObjCE.Numero = Convert.ToInt32(txtNumero.Text.Trim());
                codigo       = ObjCN.ActualizarCorrelativoCorreccion(ObjCE, ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Msje", "alert('Se ha realizado la actualizacion del correlativo de correccion satisfactoriamente.');", true);
            }

            buscarcorrecciones();
        }
        catch (Exception ex)
        {
            ucMsje.RegistrarMensajeCliente("dvMsjeError", Funciones.m_strImagenError, ex.Message + "<br />" + ex.StackTrace);
        }
        finally
        {
        }
    }
コード例 #5
0
    protected void btnEliminarDetalle_Click(object sender, EventArgs e)
    {
        try
        {
            int          codigo;
            CNCorreccion ObjCN = new CNCorreccion();
            CEDetalle    ObjCE = new CEDetalle();
            ObjCE.Codigo   = Convert.ToInt32(lblCodigoDetalleEliminar.Text);
            ObjCE.Vigencia = false;

            codigo = ObjCN.EliminarDetalleCorrelativoCorreccion(ObjCE, ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString());
            //ScriptManager.RegisterStartupScript(this, this.GetType(), "Msje", "alert('Se ha desestimado el correlativo satisfactoriamente.');", true);
            Detalle();
            mpeDetalle.Show();
        }
        catch (Exception ex)
        {
            ucMsje.RegistrarMensajeCliente("dvMsjeError", Funciones.m_strImagenError, ex.Message + "<br />" + ex.StackTrace);
        }
        finally
        {
        }
    }
コード例 #6
0
    protected void lblNuevo_Click(object sender, EventArgs e)
    {
        try
        {
            mpeNuevo.Show();
            lblTitulo.Text = "Pedir Nuevo Correlativo";
            CNCorreccion ObjCN = new CNCorreccion();
            //txtNumero.Text = ObjCN.ProximoCorrelativoCorreccion(ConfigurationManager.ConnectionStrings["SIEMPRESOFT"].ConnectionString.ToString()).ToString();

            ddlUsuario.SelectedValue  = Funciones.GetCookie("CodigoUsuario");
            txtfecha.Text             = DateTime.Now.ToShortDateString();
            lblCodigoCorrelativo.Text = "0";
            txtDescripcion.Text       = "";
            txtVersion.Text           = "";
            ddlMejora.SelectedValue   = "Seleccione";
        }
        catch (Exception ex)
        {
            ucMsje.RegistrarMensajeCliente("dvMsjeError", Funciones.m_strImagenError, ex.Message + "<br />" + ex.StackTrace);
        }
        finally
        {
        }
    }