private void dgv_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (Util.isColumnMatch(sender, e, col_dgv_RequestButton)) { //case: //automatic reset hour jam 3 //last cutofftime is tgl 12 jam 3 //current time is tgl 13 jam 3.02 //new cutofftime is tgl 13 jam 3 if (!Settings.ManualQueueNoReset) { DateTime nextCutoffTimestamp = Settings.getAutomaticQueueNoResetTimestamp(DateTime.Now); if (Settings.QueueNoCutoffTimestamp < nextCutoffTimestamp) { Settings.QueueNoCutoffTimestamp = nextCutoffTimestamp; Queues.update_VoidTimestamp(nextCutoffTimestamp); } } _printString = Queues.add(Util.wrapClickedCellValueNullable <Guid>(col_dgv_QueueCategories_Id, e), Settings.QueueNoCutoffTimestamp); if (_printString != null) { Util.displayForm(null, new LIBUtil.Desktop.Forms.MessageBox_Form( () => Helper.printReceipt(_printString), "Printing..", 11, 3, false, false, false, Properties.Resources.Q)); } } }
private void QueueNoReset_Changed(object sender, EventArgs e) { Settings.ManualQueueNoReset = rbManualQueueNoReset.Checked; Settings.AutomaticQueueNoResetHour = in_AutomaticQueueNoResetHour.ValueInt; if (rbAutomaticQueueNoReset.Checked) { DateTime newCutoffTimestamp = Settings.getAutomaticQueueNoResetTimestamp(DateTime.Now); Settings.QueueNoCutoffTimestamp = newCutoffTimestamp; Queues.update_VoidTimestamp(newCutoffTimestamp); lblQueueNoCutoffTimestamp.Text = string.Format("Current Cut Off Time: {0:dd/MM/yy HH:mm}", newCutoffTimestamp); } }