コード例 #1
0
        private void populateDgvQueue()
        {
            DataTable datatable;

            try
            {
                datatable = Queues.get(true, null, null, MAXDISPLAYEDQUEUE, null, null, Settings.QueueNoCutoffTimestamp);
                if (pnlHeader.BackColor == _HeaderColor_ERROR)
                {
                    pnlHeader.BackColor = _HeaderColor_DEFAULT;
                }
            }
            catch {
                //save default header color
                if (pnlHeader.BackColor != _HeaderColor_ERROR)
                {
                    _HeaderColor_DEFAULT = pnlHeader.BackColor;
                }

                //set header color to error
                pnlHeader.BackColor = _HeaderColor_ERROR;

                return;
            }

            Util.populateDataGridView(dgv, datatable);

            Guid newCalledId;

            if (datatable.Rows.Count > 0)
            {
                //highlight first row only
                //dgv.Rows[0].DefaultCellStyle.ForeColor = LASTCALLEDHIGHLIGHTCOLOR;
                //if (dgv.Rows.Count > 1)
                //    dgv.Rows[1].DefaultCellStyle.ForeColor = dgv.DefaultCellStyle.ForeColor;

                DataRow row = datatable.Rows[0];
                newCalledId = (Guid)row[Queues.COL_DB_Id];
                if (_lastCalledId != newCalledId)
                {
                    showLargeCallDisplay(datatable.Rows[0]);

                    _lastCalledId = newCalledId;
                    _CALL_QueueNumber.Add(row[Queues.COL_CallNo].ToString());
                    _CALL_CounterName.Add(row[Queues.COL_DB_CounterAddresses_Name].ToString());

                    if (!_isSoundPlaying)
                    {
                        bgwCaller.RunWorkerAsync();
                    }
                }
            }
        }
コード例 #2
0
ファイル: Settings_Form.cs プロジェクト: setiawri/Queue
 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);
     }
 }
コード例 #3
0
ファイル: Queues.cs プロジェクト: setiawri/Queue
        public static void clearQueueIfStartOfDay()
        {
            DataTable datatable = Queues.get(true, null, null, 1);

            if (datatable.Rows.Count > 0)
            {
                DateTime lastdate = Util.wrapNullable <DateTime>(datatable.Rows[0], Queues.COL_DB_Timestamp);
                if (lastdate.Date < DateTime.Now.Date)
                {
                    Queues.deleteAll();
                }
            }
        }
コード例 #4
0
        private void btnCallPrevious_Click(object sender, EventArgs e)
        {
            if (!ddlCalled.isValidSelectedValue())
            {
                Util.inputError <LIBUtil.Desktop.UserControls.Dropdownlist>(ddlCalled, "Pilih nomor antrian");
            }
            else
            {
                Queues.call((Guid)ddlCalled.SelectedValue, Helper.counter.Id);
            }

            showLastCalled(((DataRowView)ddlCalled.SelectedItem)[Queues.COL_CallNo].ToString());
        }
コード例 #5
0
 private void populateData()
 {
     for (int i = 0; i < _counterAddresses.Rows.Count; i++)
     {
         CounterCallStatus counter = ((CounterCallStatus)tlpCounters.Controls[i]);
         foreach (DataRow row in Queues.getLastCalledForEachCounter().Rows)
         {
             if (LIBUtil.Util.wrapNullable <Guid>(row, Queues.COL_DB_CounterAddresses_Id) == counter.CounterAddressId)
             {
                 counter.QueueNo = LIBUtil.Util.wrapNullable <string>(row, Queues.COL_CallNo);
                 break;
             }
         }
     }
 }
コード例 #6
0
ファイル: Settings_Form.cs プロジェクト: setiawri/Queue
 private void btnResetQueueNumber_Click(object sender, EventArgs e)
 {
     Queues.resetQueueNumber();
 }
コード例 #7
0
ファイル: Settings_Form.cs プロジェクト: setiawri/Queue
 private void btnResetQueues_Click(object sender, EventArgs e)
 {
     Queues.deleteAll();
 }