Ejemplo n.º 1
0
 protected void BtnBorrar_Click(object sender, EventArgs e)
 {
     this.pagoemple                = new Pago_Empleados();
     this.pagoemple.Opc            = 6;
     this.pagoemple.Estado         = "Desactivado";
     this.pagoemple.Id_comprobante = int.Parse(grid_pagos_empleados.SelectedRow.Cells[1].Text);
     this.pagoempleHelper          = new Pago_Empleados_Helper(pagoemple);
     this.pagoempleHelper.Desactiva_pago();
     ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeDeconfirmDelete", "mensajeDeconfirmDelete('" + "" + "');", true);
     Response.Redirect("modificar_pago.aspx");
 }
Ejemplo n.º 2
0
        protected void btn_modificar_Click(object sender, EventArgs e)
        {
            try
            {
                this.pagoemple = new Pago_Empleados();
                this.pagoemple.Id_comprobante      = int.Parse(this.Lblnumcompro.Text);
                this.pagoemple.Mes                 = this.DptMes.SelectedValue;
                this.pagoemple.Anio                = this.Dptyear.SelectedValue;
                this.pagoemple.Quincena            = int.Parse(this.Dpquincena.SelectedValue);
                this.pagoemple.Moneda              = this.DptMoneda.SelectedValue;
                this.pagoemple.Fecha_registro      = fecha.Value;
                this.pagoemple.Id_colaborador      = this.DptColaborador.SelectedValue;
                this.pagoemple.Salario_quincenal   = SalarioQuincenal.Value;
                this.pagoemple.Comision            = comisionProductividad.Value;
                this.pagoemple.Prestamo            = prestamo.Value;
                this.pagoemple.Dias_sinGoce        = diasSinGoce.Value;
                this.pagoemple.Total_sinGoce       = totalsingoce.Value;
                this.pagoemple.Dias_feriados       = diasFeriados.Value;
                this.pagoemple.Total_feriados      = totalFeriados.Value;
                this.pagoemple.Horas_extras        = horasExtras.Value;
                this.pagoemple.Total_extras        = totalExtras.Value;
                this.pagoemple.Salario_neto        = salarioneto.Value;
                this.pagoemple.Porcen_caja         = porcentajeCCSS.Value;
                this.pagoemple.Total_caja          = totalCCSS.Value;
                this.pagoemple.Impuesto_renta      = impuestoRentas.Value;
                this.pagoemple.Otras_deduc         = otrasDeduccion.Value;
                this.pagoemple.Detalle_otras_deduc = this.txtDescripDedud.Text;
                this.pagoemple.Total_deduc         = totalDeducciones.Value;
                this.pagoemple.Saldo_anterior      = saldoAnterior.Value;
                this.pagoemple.Saldo               = saldo.Value;
                this.pagoemple.Total_depositado    = totalDepositado.Value;
                this.pagoemple.Id_banco            = this.DptBancos.SelectedValue;
                this.pagoemple.Estado              = "Activo";
                this.pagoemple.Id_centro_costos    = this.DptCentroCostos.SelectedValue;
                this.pagoemple.Pdf_comprobante     = this.file_pdf.FileBytes;
                this.pagoemple.Realname_pdf        = this.file_pdf.FileName;
                this.pagoemple.Opc                 = 4;
                this.pagoempleHelper               = new Pago_Empleados_Helper(pagoemple);
                this.pagoempleHelper.modificar_pago_empleado();
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true);
            }
            catch (Exception ex)
            {
                this.txtDescripDedud.Text = ex.Message;

                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }
Ejemplo n.º 3
0
        public void buscaNumCompro()
        {
            try
            {
                this.pagoemple       = new Pago_Empleados();
                this.pagoemple.Opc   = 5;
                this.pagoempleHelper = new Pago_Empleados_Helper(pagoemple);
                this.datos           = new DataTable();
                this.datos           = this.pagoempleHelper.Consulta_num_pago();

                if (datos.Rows.Count > 0)
                {
                    DataRow fila = datos.Rows[0];
                    numcomprobante = int.Parse(fila["Id_comprobante"].ToString()) + 1;
                }

                numcomprobante = 1;
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }
Ejemplo n.º 4
0
        protected void btn_Pago_Cola_Click(object sender, EventArgs e)
        {
            try
            {
                this.pagoemple = new Pago_Empleados();
                this.pagoemple.Id_comprobante = int.Parse(this.Lblnumcompro.Text);
                ValidaMes();
                muestrayear         = fecha.Value;
                yearcompleto        = muestrayear.Substring(0, 4);
                this.pagoemple.Mes  = muestrames;
                this.pagoemple.Anio = yearcompleto;
                dias        = fecha.Value;
                muestraDiaa = int.Parse(dias.Substring(8, 2));
                if (muestraDiaa < 15)
                {
                    this.pagoemple.Quincena = 1;
                }
                else
                {
                    this.pagoemple.Quincena = 2;
                }

                this.pagoemple.Moneda              = this.DptMoneda.SelectedValue;
                this.pagoemple.Fecha_registro      = fecha.Value;
                this.pagoemple.Id_colaborador      = this.DptColaborador.SelectedValue;
                this.pagoemple.Salario_quincenal   = SalarioQuincenal.Value;
                this.pagoemple.Comision            = comisionProductividad.Value;
                this.pagoemple.Prestamo            = prestamo.Value;
                this.pagoemple.Dias_sinGoce        = diasSinGoce.Value;
                this.pagoemple.Total_sinGoce       = totalsingoce.Value;
                this.pagoemple.Dias_feriados       = diasFeriados.Value;
                this.pagoemple.Total_feriados      = totalFeriados.Value;
                this.pagoemple.Horas_extras        = horasExtras.Value;
                this.pagoemple.Total_extras        = totalExtras.Value;
                this.pagoemple.Salario_neto        = salarioneto.Value;
                this.pagoemple.Porcen_caja         = porcentajeCCSS.Value;
                this.pagoemple.Total_caja          = totalCCSS.Value;
                this.pagoemple.Impuesto_renta      = impuestoRentas.Value;
                this.pagoemple.Otras_deduc         = otrasDeduccion.Value;
                this.pagoemple.Detalle_otras_deduc = this.txtDescripDedud.Text;
                this.pagoemple.Total_deduc         = totalDeducciones.Value;
                this.pagoemple.Saldo_anterior      = saldoAnterior.Value;
                this.pagoemple.Saldo            = saldo.Value;
                this.pagoemple.Total_depositado = totalDepositado.Value;
                this.pagoemple.Id_banco         = this.DptBancos.SelectedValue;
                this.pagoemple.Estado           = "Activo";
                this.pagoemple.Id_centro_costos = this.DptCentroCostos.SelectedValue;
                this.pagoemple.Pdf_comprobante  = this.file_pdf.FileBytes;
                if (this.file_pdf.FileName == "")
                {
                    this.pagoemple.Realname_pdf = "Pendiente de subir";
                }
                else
                {
                    this.pagoemple.Realname_pdf = this.file_pdf.FileName;
                }
                this.pagoemple.Opc   = 1;
                this.pagoempleHelper = new Pago_Empleados_Helper(pagoemple);
                this.pagoempleHelper.Agregar_pago_empleado();

                Limpiar();
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true);
                Response.Redirect("Consultar_Pagos_Empleados.aspx");
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }
Ejemplo n.º 5
0
        protected void grid_pagos_empleados_SelectedIndexChanged1(object sender, EventArgs e)
        {
            try
            {
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ModalDocumentos", "$('#ModalDocumentos').modal();", true);

                numcompro = int.Parse(grid_pagos_empleados.SelectedRow.Cells[1].Text);
                if (numcompro < 100)
                {
                    muestranumcompro = "00" + numcompro;
                }
                else
                {
                    muestranumcompro = numcompro.ToString();
                }
                this.LblComprobante.Text = muestranumcompro;
                this.Lblnombre.Text      = grid_pagos_empleados.SelectedRow.Cells[2].Text;;
                this.LblQuincena.Text    = grid_pagos_empleados.SelectedRow.Cells[5].Text + " Quincena " + "de " + grid_pagos_empleados.SelectedRow.Cells[3].Text + " " + "del " + grid_pagos_empleados.SelectedRow.Cells[4].Text;



                this.pagoemple                = new Pago_Empleados();
                this.pagoemple.Opc            = 3;
                this.pagoemple.Id_comprobante = int.Parse(grid_pagos_empleados.SelectedRow.Cells[1].Text);

                this.pagoempleHelper = new Pago_Empleados_Helper(pagoemple);
                this.datos           = new DataTable();
                this.datos           = this.pagoempleHelper.Consulta_num_pago();

                if (datos.Rows.Count >= 0)
                {
                    DataRow fila = datos.Rows[0];
                    idBanco = fila["Id_banco"].ToString();
                    buscaBanco();
                    this.LblBanco.Text            = "    " + nombre_banco;
                    this.LblMoneda.Text           = fila["Moneda"].ToString();
                    this.LblQuincenal.Text        = fila["Salario_quincenal"].ToString();
                    this.Lbldias_sin_goce.Text    = fila["Dias_sinGoce"].ToString();
                    this.Lbl_total_sin_goce.Text  = fila["Total_sinGoce"].ToString();
                    this.LblComision.Text         = fila["Comision"].ToString();
                    this.LblPretsamo.Text         = fila["Prestamos"].ToString();
                    this.LblDiasFeriados.Text     = fila["Dias_feriados"].ToString();
                    this.LblTotal_feriado.Text    = fila["Total_feriados"].ToString();
                    this.LblHoras_extras.Text     = fila["Horas_extras"].ToString();
                    this.LblTotal_extras.Text     = fila["Total_extras"].ToString();
                    this.LblSalario_neto.Text     = fila["Salario_neto"].ToString();
                    this.LblCCSS.Text             = fila["Porcen_caja"].ToString();
                    this.LblTotal_ccss.Text       = fila["Total_caja"].ToString();
                    this.LblISR.Text              = fila["Impuesto_renta"].ToString();
                    this.LblOtras_deduc.Text      = fila["Otras_deducc"].ToString();
                    this.LblConcepto.Text         = fila["Detalle_otras_deduc"].ToString();
                    this.LblTotal_Deduc.Text      = fila["Total_deduc"].ToString();
                    this.LblTotal_depositado.Text = fila["Total_depositado"].ToString();
                    this.LblSaldo_anterior.Text   = fila["Saldo_anterior"].ToString();;
                    this.LblSaldo.Text            = fila["Saldo"].ToString();
                    fecha_registro         = fila["Fecha_registro"].ToString();
                    this.LblID_colabo.Text = fila["Id_colaborador"].ToString();
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }