Esempio n. 1
0
        void MostrarMarcaciones(DataTable dtMarcaciones)
        {
            int n_row = 0;

            FgLisPer.Rows.Count = 2;

            for (n_row = 0; n_row <= dtMarcaciones.Rows.Count - 1; n_row++)
            {
                FgLisPer.Rows.Count = FgLisPer.Rows.Count + 1;
                FgLisPer.SetData(FgLisPer.Rows.Count - 1, 1, dtMarcaciones.Rows[n_row]["c_codemp"].ToString());
                FgLisPer.SetData(FgLisPer.Rows.Count - 1, 2, dtMarcaciones.Rows[n_row]["d_fchmar"].ToString());
                FgLisPer.SetData(FgLisPer.Rows.Count - 1, 3, dtMarcaciones.Rows[n_row]["c_hormar"].ToString());
            }
        }
Esempio n. 2
0
        void MostrarDatos()
        {
            int    n_row   = 0;
            string c_dato  = "";
            double n_valor = 0;

            double n_horini = 0;
            double n_horfin = 0;

            LblApeNom.Text = c_apenomtra;
            LblNumDoc.Text = c_numdoc;
            LblFchTra.Text = c_fchtra;

            FgLisPer.Rows.Count = 2;
            if (dtTareas.Rows.Count != 0)
            {
                for (n_row = 0; n_row <= dtTareas.Rows.Count - 1; n_row++)
                {
                    FgLisPer.Rows.Count = FgLisPer.Rows.Count + 1;

                    c_dato = dtTareas.Rows[n_row]["c_des"].ToString();
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 1, c_dato);

                    n_valor = Convert.ToDouble(funFunciones.NulosN(dtTareas.Rows[n_row]["n_can"]));
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 2, n_valor.ToString("0.00"));

                    c_dato = dtTareas.Rows[n_row]["c_horini"].ToString();
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 3, c_dato);

                    c_dato = dtTareas.Rows[n_row]["c_horter"].ToString();
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 4, c_dato);

                    n_horini = funCon.HoraEnDecimal(dtTareas.Rows[n_row]["c_horini"].ToString() + ":00");
                    n_horfin = funCon.HoraEnDecimal(dtTareas.Rows[n_row]["c_horter"].ToString() + ":00");
                    n_valor  = n_horfin - n_horini;
                    c_dato   = funCon.DecimalEnHoras(n_valor);
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 5, c_dato);

                    n_valor = Convert.ToDouble(funFunciones.NulosN(dtTareas.Rows[n_row]["n_pretar"]));
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 6, n_valor);

                    n_valor = Convert.ToDouble(funFunciones.NulosN(dtTareas.Rows[n_row]["n_imptot"]));
                    FgLisPer.SetData(FgLisPer.Rows.Count - 1, 7, n_valor);
                }
            }


            //LblTot1.Text = funFlex.FlexSumarCol(FgLisPer, 6, 2, FgLisPer.Rows.Count - 1).ToString("0.00");
            LblTot2.Text = funFlex.FlexSumarCol(FgLisPer, 7, 2, FgLisPer.Rows.Count - 1).ToString("0.00");
        }
Esempio n. 3
0
        private void CmdVerTareas_Click(object sender, EventArgs e)
        {
            int    n_idpla  = 0;
            string c_fchcon = "";
            int    n_idper  = 0;

            n_idpla = Convert.ToInt32(DgLista.Columns[1].CellValue(DgLista.Row).ToString());

            if (TabDetalle.SelectedIndex == 0)
            {
                c_fchcon = FgLisPer.GetData(1, FgLisPer.Col).ToString();
                n_idper  = Convert.ToInt32(FgLisPer.GetData(FgLisPer.Row, 1).ToString());
            }
            else
            {
                c_fchcon = FgLisHor.GetData(1, FgLisHor.Col).ToString();
                n_idper  = Convert.ToInt32(FgLisHor.GetData(FgLisHor.Row, 11).ToString());
            }

            objRegistro.VerTareasDia(n_idpla, n_idper, Convert.ToDateTime(c_fchcon).ToString("dd/MM/yyyy"));
        }
Esempio n. 4
0
        void AsignarEntidad()
        {
            int n_row = 0;

            BE_Registro.n_idemp  = STU_SISTEMA.EMPRESAID;
            BE_Registro.n_id     = 0;
            BE_Registro.d_fchini = Convert.ToDateTime(TxtFchIni.Text);
            BE_Registro.d_fchfin = Convert.ToDateTime(TxtFchFin.Text);
            BE_Registro.d_fchimp = Convert.ToDateTime(TxtFchImp.Text);
            BE_Registro.n_idper  = Convert.ToInt32(CboRes.SelectedValue);
            BE_Registro.n_nummar = 0;

            for (n_row = 2; n_row <= FgLisPer.Rows.Count - 1; n_row++)
            {
                BE_PLA_MARCACIONDET entCarDet = new BE_PLA_MARCACIONDET();

                entCarDet.n_idmar  = 0;
                entCarDet.c_codemp = FgLisPer.GetData(n_row, 1).ToString();
                entCarDet.d_fchmar = Convert.ToDateTime(FgLisPer.GetData(n_row, 2));
                entCarDet.c_hormar = FgLisPer.GetData(n_row, 3).ToString();

                lstMarcDet.Add(entCarDet);
            }
        }
Esempio n. 5
0
        void MostrarPago(DataTable dtPagos)
        {
            double n_total   = 0;
            int    n_row     = 0;
            int    n_fil     = 2;
            string c_dato    = "";
            int    n_col     = 0;
            int    n_numdias = Convert.ToInt32((Convert.ToDateTime(TxtFchFin.Text) - Convert.ToDateTime(TxtFchIni.Text)).ToString(@"dd"));

            n_numdias = n_numdias + 1;
            DateTime d_fecha = Convert.ToDateTime(TxtFchIni.Text);

            FgLisPer.Cols.Count = 5;

            for (n_col = 1; n_col <= n_numdias; n_col++)
            {
                FgLisPer.Cols.Count = FgLisPer.Cols.Count + 1;
                FgLisPer.Cols[FgLisPer.Cols.Count - 1].DataType = typeof(Double);
                FgLisPer.Cols[FgLisPer.Cols.Count - 1].Format   = "0.00";
                FgLisPer.Cols[FgLisPer.Cols.Count - 1].Width    = 70;
                c_dato = d_fecha.ToString("yyy-MM-dd");
                FgLisPer.SetData(0, FgLisPer.Cols.Count - 1, "Dia " + n_col.ToString());
                FgLisPer.SetData(1, FgLisPer.Cols.Count - 1, c_dato);
                d_fecha = d_fecha.AddDays(1);
            }

            //MOSTRAMOS EL IMPORTE A PAGAR
            for (n_row = 0; n_row <= dtPagos.Rows.Count - 1; n_row++)
            {
                FgLisPer.Rows.Count = FgLisPer.Rows.Count + 1;

                c_dato = dtPagos.Rows[n_row]["n_idper"].ToString();
                FgLisPer.SetData(n_fil, 1, c_dato);

                c_dato = (n_fil - 1).ToString();
                FgLisPer.SetData(n_fil, 2, c_dato);

                c_dato = dtPagos.Rows[n_row]["c_numdocide"].ToString();
                FgLisPer.SetData(n_fil, 3, c_dato);

                c_dato = dtPagos.Rows[n_row]["c_apenom"].ToString();
                FgLisPer.SetData(n_fil, 4, c_dato);

                int n_col2 = 5;
                for (n_col2 = 5; n_col2 <= FgLisPer.Cols.Count - 1; n_col2++)
                {
                    c_dato = FgLisPer.GetData(1, n_col2).ToString();
                    if (ExisteColumna(c_dato, dtPagos) == true)
                    {
                        c_dato = Convert.ToDouble(funFunciones.NulosN(dtPagos.Rows[n_row][c_dato])).ToString("0.00");
                        FgLisPer.SetData(n_fil, n_col2, c_dato);
                    }
                }

                n_fil = n_fil + 1;
            }

            FgLisPer.Cols.Count = FgLisPer.Cols.Count + 1;
            FgLisPer.Cols[FgLisPer.Cols.Count - 1].DataType = typeof(Double);
            FgLisPer.Cols[FgLisPer.Cols.Count - 1].Format   = "0.00";
            funFlex.Flex_FixUnirFilas(FgLisPer, FgLisPer.Cols.Count - 1, 0, 1, "Total", 70);

            for (n_row = 2; n_row <= FgLisPer.Rows.Count - 1; n_row++)
            {
                n_total = 0;
                n_total = funFlex.FlexSumarRow(FgLisPer, n_row, 5, FgLisPer.Cols.Count - 2);
                FgLisPer.SetData(n_row, FgLisPer.Cols.Count - 1, n_total.ToString("0.00"));
            }

            n_total = funFlex.FlexSumarCol(FgLisPer, FgLisPer.Cols.Count - 1, 2, FgLisPer.Rows.Count - 1);

            FgLisPer.Rows.Count = FgLisPer.Rows.Count + 1;
            FgLisPer.SetData(FgLisPer.Rows.Count - 1, FgLisPer.Cols.Count - 2, "TOTAL ==>");
            FgLisPer.SetData(FgLisPer.Rows.Count - 1, FgLisPer.Cols.Count - 1, n_total.ToString("0.00"));
            FgLisPer.AllowSorting = C1.Win.C1FlexGrid.AllowSortingEnum.SingleColumn;
        }