Esempio n. 1
0
 private void RegistrarAcceso_Load(object sender, EventArgs e)
 {
     this.Dot = new Dotacion();
     if (!this.Dot.Recuperar_Dotacion_JS())
     {
         MessageBox.Show(this, "Se produjo un error al intentar obtener la dotación.\n\nDescripción del error:\n" + this.Dot.error_desc + "\n\nIntente actualizar nuevamente la dotación.", "Atención:", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         this.Close();
     }
 }
Esempio n. 2
0
        public static void ShowDetalle(string Lote_Id_Param, Dotacion Dot_Param, List <Edificio> Edif_Param)
        {
            var frm = new frmLoteControlAcceso();

            frm.Lote_Id         = Lote_Id_Param;
            frm.Dot             = Dot_Param;
            frm.Edif            = Edif_Param;
            frm.txtNroLote.Text = frm.Lote_Id;
            frm.Cargar_Registros_Lote();
            frm.Show();
        }
Esempio n. 3
0
        public DataTable Get_Registos_DataTable(Dotacion Dot, List <Edificio> Edif)
        {
            var table = new DataTable();

            string[] columns = { "id_registro", "nombre_apellido", "fecha", "es_ingreso", "usuario", "edificio" };
            foreach (var col in columns)
            {
                table.Columns.Add(col, typeof(string));
            }
            foreach (var reg in this.registros)
            {
                var row = table.NewRow();
                var per = Dot.personas.Find(p => p.id == reg.per_id);
                var edi = Edif.Find(e => e.id == reg.edif);
                row[0] = reg.id.ToString();
                row[1] = per.nom + " " + per.ape;
                row[2] = reg.fecha.ToString("dd/MM/yyyy HH:mm:ss");
                row[3] = (reg.es_ingreso? "VERDADERO":"FALSO");
                row[4] = reg.usu;
                row[5] = edi.nom + ", " + edi.loc + ", " + edi.prv;
                table.Rows.Add(row);
            }
            return(table);
        }