コード例 #1
0
        private void BtnNuevo_Click(object sender, EventArgs e)
        {
            NewBlackout bout = new NewBlackout();

            bout.Tiporegistro        = "Nuevo";
            bout.path                = Path;
            bout.CalendarioPrincipal = this;
            bout.Blackouts           = Blackouts;
            PopUpMbox(bout);
        }
コード例 #2
0
        private void DGFechas_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (DGFechas.Rows[e.RowIndex].Cells[1].Value.ToString() == "")
            {
                MessageBox.Show("No se puede editar un registro no existente");
                return;
            }
            NewBlackout bout = new NewBlackout();

            bout.Tiporegistro        = "Editar";
            bout.index               = int.Parse(Convert.ToString(DGFechas.Rows[e.RowIndex].Cells[1].Value));
            bout.DTBlackout.Value    = Blackouts.Blackouts[bout.index].BlackoutBeginning;
            bout.DTEndBlackout.Value = Blackouts.Blackouts[bout.index].Ending;
            bout.path = Path;
            bout.CalendarioPrincipal = this;
            bout.Blackouts           = Blackouts;
            PopUpMbox(bout);
        }