예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmAccessGroup frm = new FrmAccessGroup();

            frm.GetAccesses        += GetAccessesHandler;
            frm.GetAccessTimeZones += GetAccessTimeZonesHandler;
            frm.Left = this.Left + this.Width;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                DataGridViewRow row = this.gridView.Rows[this.gridView.Rows.Add()];
                ShowItemOnGrid(row, frm.TimeZone);
            }
        }
예제 #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (gridView.SelectedRows.Count == 1)
     {
         AccessTimeZone timezone = gridView.SelectedRows[0].Tag as AccessTimeZone;
         FrmAccessGroup frm      = new FrmAccessGroup();
         frm.GetAccesses        += GetAccessesHandler;
         frm.GetAccessTimeZones += GetAccessTimeZonesHandler;
         frm.Left     = this.Left + this.Width;
         frm.TimeZone = timezone;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             ShowItemOnGrid(gridView.SelectedRows[0], frm.TimeZone);
         }
     }
 }