Exemple #1
0
 protected void btnGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         String   existeUsuario;
         String   existeActividad;
         String   existeMiembro;
         String   usuario;
         String   miembro;
         String   actividad;
         DateTime fechaActividad;
         foreach (GridViewRow row in gdvAsistencias.Rows)
         {
             existeUsuario   = row.Cells[0].Text;
             existeActividad = row.Cells[1].Text;
             existeMiembro   = row.Cells[2].Text;
             usuario         = row.Cells[3].Text;
             actividad       = row.Cells[5].Text;
             miembro         = row.Cells[7].Text;
             fechaActividad  = Convert.ToDateTime(row.Cells[4].Text);
             if (existeUsuario.Equals("S") && existeActividad.Equals("S") && existeMiembro.Equals("S"))
             {
                 bdAPJO.ingresarAsistenciaArchivo(S, miembro, fechaActividad.ToString("yyyy-MM-dd HH:mm:ss"), actividad, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), usuario, "", "", "");
             }
         }
         mst.mostrarMsjNtf(dic.msjSeHanIngresado);
     }
     catch (Exception ex)
     {
         mst.mostrarMsj(dic.msjNoSeRealizoExcp + ex.Message.ToString());
     }
 }
Exemple #2
0
        protected void llenarTblDiferencias()
        {
            int       totalGastos          = bdTS.rsmTotalGastos(S, F);
            DataTable dtTotalOcupaciones   = bdTS.rsmTotalesOcupaciones(S, F);
            DataTable dtTotalIngresosExtra = bdTS.rsmTotalIngresosExtra(S, F);

            if (dtTotalOcupaciones.Rows.Count > 0 && dtTotalIngresosExtra.Rows.Count > 0)
            {
                try
                {
                    gstLblTotalAportesOcupaciones.Text  = (L.Equals("es") ? "Total de Aportes de Ocupaciones" : "Total of Occupations Contributions") + " (Q):";
                    gstLblTotalIngresosOcupaciones.Text = (L.Equals("es") ? "Total de Ingresos de Ocupaciones" : "Total of Occupations Incomes") + " (Q):";
                    gstLblTotalIngresosExtra.Text       = (L.Equals("es") ? "Total de Ingresos Extra" : "Total of Additional Incomes") + " (Q):";
                    gstLblGastoMen.Text          = (L.Equals("es") ? "Total de Gastos" : "Total of Expenses") + " (Q):";
                    gstLblGastoMen2.Text         = (L.Equals("es") ? "Total de Gastos" : "Total of Expenses") + " (Q):";
                    gstLblDiferenciaAporte.Text  = "Total (Q):";
                    gstLblDiferenciaIngreso.Text = "Total (Q):";

                    int totalIngresosOcupaciones = Int32.Parse(dtTotalOcupaciones.Rows[0]["TotalIngresos"].ToString());
                    int totalAportesOcupaciones  = Int32.Parse(dtTotalOcupaciones.Rows[0]["TotalAportes"].ToString());
                    int totalIngresosExtra       = Int32.Parse(dtTotalIngresosExtra.Rows[0]["TotalIngresos"].ToString());
                    gstLblVTotalAportesOcupaciones.Text  = "+" + totalAportesOcupaciones + "";
                    gstLblVTotalIngresosOcupaciones.Text = "+" + totalIngresosOcupaciones + "";
                    gstLblVTotalIngresosExtra.Text       = "+" + totalIngresosExtra + "";
                    gstLblVGastoMen.Text          = "-" + totalGastos + "";
                    gstLblVGastosMen2.Text        = "-" + totalGastos + "";
                    gstLblVDiferenciaAporte.Text  = "<b>" + (totalAportesOcupaciones - totalGastos) + "</b>";
                    gstLblVDiferenciaIngreso.Text = "<b>" + ((totalIngresosOcupaciones + totalIngresosExtra) - totalGastos) + "</b>";
                    tblDiferenciaAporte.Visible   = true;
                    tblDiferenciaIngresos.Visible = true;
                }
                catch (Exception ex)
                {
                    mst.mostrarMsj(dic.msjNoSeRealizoExcp + ex.Message.ToString() + ".");
                }
            }
        }