Beispiel #1
0
        private async void dataGridView_Clientes_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                e.RowIndex >= 0)
            {
                ClienteEdit CE = new ClienteEdit(Guid.Parse(dataGridView_Clientes.Rows[e.RowIndex].Cells[0].Value.ToString()), this.IdUsuario);
                CE.ShowDialog();

                /*IFirebaseConfig config = new FirebaseConfig
                 * {
                 *  AuthSecret = "y9qo73rzWLMhKRHqAsgXpbO53XvE1GK0tf0Pm9O2",
                 *  BasePath = "https://monitoreo-360.firebaseio.com/"
                 * };
                 * IFirebaseClient client = new FirebaseClient(config);
                 * DateTime now = DateTime.Now;
                 * Random r = new Random();
                 * int aleatorio = r.Next(0, 10);
                 * var todo = new Alertas
                 * {
                 *  Activo = true,
                 *  CodigoDeAlarma = "BH",
                 *  Color = 2,
                 *  Fecha = now.Year+"-"+now.Month+"-"+now.Day+" "+now.Hour+":"+now.Minute+":"+now.Second+"."+now.Millisecond,
                 *  FechaRecibido ="",
                 *  Id= aleatorio,
                 *  Recibido=false,
                 *  Sensor="001",
                 *  Usuario="001",
                 *  UsuarioCreacion="001"
                 * };
                 * SetResponse response = await client.SetAsync("Alertas/20172017/"+ aleatorio, todo);
                 * Alertas result = response.ResultAs<Alertas>();*/
                //Guid Id = Guid.Parse(senderGrid.Name);
                //TODO - Button Clicked - Execute Code Here
            }
        }
 public ClienteAccesos(ClienteEdit formEdit)
 {
     InitializeComponent();
     this.formEdit = formEdit;
 }