private void btnRent_Click( object sender, EventArgs e ) { NewRentDlg dlg = new NewRentDlg( m_nDressId ); if( dlg.ShowDialog() == DialogResult.OK ) RefreshRentDetail(); }
private void OnModify() { Point pt = dgvRent.CurrentCellAddress; if( pt.X <= 0 || pt.Y < 0 ) return; if( dgvRent.CurrentCell.Value == DBNull.Value ) return; if( Program.UserType == UserType.Customer ) return; DateTime YearMonth = (DateTime)dgvRent.CurrentRow.Cells[0].Value; DateTime date = new DateTime( YearMonth.Year, YearMonth.Month, pt.X ); NewRentDlg dlg = new NewRentDlg( m_nDressId, date ); if( dlg.ShowDialog() == DialogResult.OK ) RefreshRentDetail(); }