コード例 #1
0
        private void KKT_StatusCheck() //проверяет статус ОФД и ФН приотткрытии и закрытии смены
        {
            if (UpdateResult())
            {
                GetCashReg();
                DateTime dateTimePC = DateTime.Today;
                Drv.FNGetStatus();                                               //Запрос Статуса ФН
                string FNWarningFlags = Convert.ToString(Drv.FNWarningFlags, 2); //ФНФлагиПредупреждения
                FNWarningFlags = new string('0', 4 - FNWarningFlags.Length) + FNWarningFlags;
                toolStripStatus_FN.BackColor = WorkWithDKKT.CheckFNStatusInColor(FNWarningFlags);

                Drv.FNGetInfoExchangeStatus();                                       //Статус обмена с ОФД
                string ExchangeStatus = Convert.ToString(Drv.InfoExchangeStatus, 2); //СтатусИнфОбмена
                ExchangeStatus = new string('0', 5 - ExchangeStatus.Length) + ExchangeStatus;
                toolStripStatus_OFD.BackColor = WorkWithDKKT.CheckOFDStatusInColor(ExchangeStatus, dateTimePC, Drv.Date);

                Drv.GetECRStatus();                                                                                      //ПолучитьСостояниеККМ
                DateTime DateTime_KKT = DateTime.Parse(Drv.Date.Day + "." + Drv.Date.Month + "." + Drv.Date.Year + " "
                                                       + Drv.Time.Hour + ":" + Drv.Time.Minute + ":" + Drv.Time.Second); //Внутренняя дата время ККМ
                toolStripStatus_TimeKKT.BackColor = WorkWithDKKT.CheckTheTimeDiffereceInColor(DateTime.Now, DateTime_KKT);

                cB_FN_TaxType.Items.Clear();
                Undefiend.ConvertStringToItems(ShtrihKKT.GetTaxType(Drv), cB_FN_TaxType.Items);
            }
        }
コード例 #2
0
 private void LoadDefaultSettings()
 {
     Undefiend.ConvertStringToItems(Properties.Settings.Default.paymentItemsSign, comBoxPaymentItemSign.Items);
     Undefiend.ConvertStringToItems(Properties.Settings.Default.paymentTypeSign, comboBox2.Items);
     Undefiend.ConvertStringToItems(Properties.Settings.Default.taxItems, comBoxTaxItem.Items);
     Undefiend.ConvertStringToItems(Properties.Settings.Default.taxSystem, comBoxTaxSystem.Items);
     comBoxPaymentItemSign.SelectedIndex = Properties.Settings.Default.paymentItemSignDefault;
     comboBox2.SelectedIndex             = Properties.Settings.Default.paymentTypeSignDefault;
     comBoxTaxItem.SelectedIndex         = Properties.Settings.Default.taxItemsDeault;
     comBoxTaxSystem.SelectedIndex       = Properties.Settings.Default.taxSystemDeault;
 }
コード例 #3
0
        private void InitialRMK()
        {
            Size = new Size(878, 300);
            Text = AboutBox1.AssemblyProduct + String.Format(" v {0}", AboutBox1.AssemblyVersion) + " For id = " + Id;
            groupBox3.Location = groupBox4.Location = new Point(0, 40);
            tbFIO.Text         = Properties.Settings.Default.userFIO;
            tbINN.Text         = Properties.Settings.Default.userINN;

            arrayCheckBox[0]        = checkBox2;
            arrayPaymentItemSign[0] = cbPaymentItemSign_1;
            arrayPaymentItemSign[0].Items.Clear();
            Undefiend.ConvertStringToItems(Properties.Settings.Default.paymentItemsSign, arrayPaymentItemSign[0].Items);
            arrayPaymentItemSign[0].SelectedIndex = Properties.Settings.Default.paymentItemSignDefault;
            arrayNameProduct[0]       = tbNameProduct_1;
            arrayPrice[0]             = tbPrice_1;
            arrayQuantity[0]          = tbQuantity_1;
            arrayTax[0]               = cbTax1_1;
            arrayTax[0].SelectedIndex = 0;
            arraySumm[0]              = tbSumm1_1;
            XY = new int[] { arrayCheckBox[0].Location.X, arrayPaymentItemSign[0].Location.X, arrayNameProduct[0].Location.X,
                             arrayPrice[0].Location.X, arrayQuantity[0].Location.X, arrayTax[0].Location.X, arraySumm[0].Location.X };
        }