void frm_PreRecord(object sender, RecordPositionEventArgs e) { if (_EventIndex > 0) { this.customDataGridView1.Rows[_EventIndex].Selected = false; _EventIndex--; this.customDataGridView1.Rows[_EventIndex].Selected = true; if (_EventIndex < this.customDataGridView1.FirstDisplayedScrollingRowIndex) { if (this.customDataGridView1.FirstDisplayedScrollingRowIndex >= this.customDataGridView1.DisplayedRowCount(false)) { this.customDataGridView1.FirstDisplayedScrollingRowIndex -= this.customDataGridView1.DisplayedRowCount(false); } else { this.customDataGridView1.FirstDisplayedScrollingRowIndex = 0; } } CardEventRecord record = this.GridView.Rows[_EventIndex].Tag as CardEventRecord; FrmSnapShotViewer frm = sender as FrmSnapShotViewer; if (record.IsExitEvent && record.LastDateTime != null) { frm.ShowImage(record.EventDateTime, record.LastDateTime.Value, record.CardID); } else { frm.ShowImage(record.EventDateTime, record.CardID); } } e.IsTopRecord = (_EventIndex == 0); }
private void customDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { if (e.ColumnIndex >= 0) { _EventIndex = e.RowIndex; CardPaymentInfo info = this.GridView.Rows[e.RowIndex].Tag as CardPaymentInfo; if (info.EnterDateTime.HasValue) { FrmSnapShotViewer frm = new FrmSnapShotViewer(); frm.PreRecord += new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord += new RecordPositionEventHandler(frm_NextRecord); frm.ShowImage(info.ChargeDateTime, info.EnterDateTime.Value, info.CardID); frm.ShowDialog(); frm.PreRecord -= new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord -= new RecordPositionEventHandler(frm_NextRecord); } } else if (OperatorInfo.CurrentOperator.Permit(Permission.ModifyCardPaymentRecord)) { CardPaymentInfo info = customDataGridView1.Rows[e.RowIndex].Tag as CardPaymentInfo; if (info != null && info.SettleDateTime == null) { FrmCardPaymentRecordDetail frm = new FrmCardPaymentRecordDetail(); frm.CardPaymentRecord = info; if (frm.ShowDialog() == DialogResult.OK) { ShowCardPaymentOnRow(info, e.RowIndex); } } } } }
private void gridCard_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { _EventIndex = e.RowIndex; CardInfo info = this.GridView.Rows[e.RowIndex].Tag as CardInfo; FrmSnapShotViewer frm = new FrmSnapShotViewer(); frm.PreRecord += new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord += new RecordPositionEventHandler(frm_NextRecord); frm.ShowImage(info.LastDateTime, info.CardID); frm.ShowDialog(); frm.PreRecord -= new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord -= new RecordPositionEventHandler(frm_NextRecord); } }
private void customDataGridview1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex >= 0) { _EventIndex = e.RowIndex; AlarmInfo info = this.GridView.Rows[e.RowIndex].Tag as AlarmInfo; FrmSnapShotViewer frm = new FrmSnapShotViewer(); frm.PreRecord += new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord += new RecordPositionEventHandler(frm_NextRecord); frm.ShowImage(info.AlarmDateTime, string.Empty); frm.ShowDialog(); frm.PreRecord -= new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord -= new RecordPositionEventHandler(frm_NextRecord); } }
void frm_NextRecord(object sender, RecordPositionEventArgs e) { if (_EventIndex < gridCard.Rows.Count - 1) { this.gridCard.Rows[_EventIndex].Selected = false; _EventIndex++; this.gridCard.Rows[_EventIndex].Selected = true; if (_EventIndex > this.gridCard.FirstDisplayedScrollingRowIndex + this.gridCard.DisplayedRowCount(false) - 1) { this.gridCard.FirstDisplayedScrollingRowIndex += this.gridCard.DisplayedRowCount(false); } CardInfo info = this.GridView.Rows[_EventIndex].Tag as CardInfo; FrmSnapShotViewer frm = sender as FrmSnapShotViewer; frm.ShowImage(info.LastDateTime, info.CardID); } }
private void frm_NextRecord(object sender, RecordPositionEventArgs e) { if (_EventIndex < customDataGridView1.Rows.Count - 1) { this.customDataGridView1.Rows[_EventIndex].Selected = false; _EventIndex++; this.customDataGridView1.Rows[_EventIndex].Selected = true; if (_EventIndex > this.customDataGridView1.FirstDisplayedScrollingRowIndex + this.customDataGridView1.DisplayedRowCount(false) - 1) { this.customDataGridView1.FirstDisplayedScrollingRowIndex += this.customDataGridView1.DisplayedRowCount(false); } CardPaymentInfo info = this.GridView.Rows[_EventIndex].Tag as CardPaymentInfo; FrmSnapShotViewer frm = sender as FrmSnapShotViewer; frm.ShowImage(info.ChargeDateTime, info.EnterDateTime.Value, info.CardID); } e.IsButtonRecord = (_EventIndex == GridView.Rows.Count - 1); }
private void customDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { _EventIndex = e.RowIndex; CardEventRecord record = this.GridView.Rows[e.RowIndex].Tag as CardEventRecord; FrmSnapShotViewer frm = new FrmSnapShotViewer(); frm.PreRecord += new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord += new RecordPositionEventHandler(frm_NextRecord); if (record.IsExitEvent && record.LastDateTime != null) { frm.ShowImage(record.EventDateTime, record.LastDateTime.Value, record.CardID); } else { frm.ShowImage(record.EventDateTime, record.CardID); } frm.ShowDialog(); frm.PreRecord -= new RecordPositionEventHandler(frm_PreRecord); frm.NextRecord -= new RecordPositionEventHandler(frm_NextRecord); } }
void frm_NextRecord(object sender, RecordPositionEventArgs e) { if (_EventIndex < customDataGridView1.Rows.Count - 1) { this.customDataGridView1.Rows[_EventIndex].Selected = false; _EventIndex++; this.customDataGridView1.Rows[_EventIndex].Selected = true; if (_EventIndex > this.customDataGridView1.FirstDisplayedScrollingRowIndex + this.customDataGridView1.DisplayedRowCount(false) - 1) { this.customDataGridView1.FirstDisplayedScrollingRowIndex += this.customDataGridView1.DisplayedRowCount(false); } CardEventRecord record = this.GridView.Rows[_EventIndex].Tag as CardEventRecord; FrmSnapShotViewer frm = sender as FrmSnapShotViewer; if (record.IsExitEvent && record.LastDateTime != null) { frm.ShowImage(record.EventDateTime, record.LastDateTime.Value, record.CardID); } else { frm.ShowImage(record.EventDateTime, record.CardID); } } e.IsButtonRecord = (_EventIndex == GridView.Rows.Count - 1); }
void frm_PreRecord(object sender, RecordPositionEventArgs e) { if (_EventIndex > 0) { this.gridCard.Rows[_EventIndex].Selected = false; _EventIndex--; this.gridCard.Rows[_EventIndex].Selected = true; if (_EventIndex < this.gridCard.FirstDisplayedScrollingRowIndex) { if (this.gridCard.FirstDisplayedScrollingRowIndex >= this.gridCard.DisplayedRowCount(false)) { this.gridCard.FirstDisplayedScrollingRowIndex -= this.gridCard.DisplayedRowCount(false); } else { this.gridCard.FirstDisplayedScrollingRowIndex = 0; } } CardInfo info = this.GridView.Rows[_EventIndex].Tag as CardInfo; FrmSnapShotViewer frm = sender as FrmSnapShotViewer; frm.ShowImage(info.LastDateTime, info.CardID); } e.IsTopRecord = (_EventIndex == 0); }
private void frm_PreRecord(object sender, RecordPositionEventArgs e) { if (_EventIndex > 0) { this.customDataGridview1.Rows[_EventIndex].Selected = false; _EventIndex--; this.customDataGridview1.Rows[_EventIndex].Selected = true; if (_EventIndex < this.customDataGridview1.FirstDisplayedScrollingRowIndex) { if (this.customDataGridview1.FirstDisplayedScrollingRowIndex >= this.customDataGridview1.DisplayedRowCount(false)) { this.customDataGridview1.FirstDisplayedScrollingRowIndex -= this.customDataGridview1.DisplayedRowCount(false); } else { this.customDataGridview1.FirstDisplayedScrollingRowIndex = 0; } } AlarmInfo info = this.GridView.Rows[_EventIndex].Tag as AlarmInfo; FrmSnapShotViewer frm = sender as FrmSnapShotViewer; frm.ShowImage(info.AlarmDateTime, string.Empty); } e.IsTopRecord = (_EventIndex == 0); }