示例#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 button1_Click(object sender, EventArgs e)
 {
     Properties.Settings.Default.paymentItemSignDefault = comBoxPaymentItemSign.SelectedIndex;
     Properties.Settings.Default.paymentTypeSignDefault = comboBox2.SelectedIndex;
     Properties.Settings.Default.taxItemsDeault         = comBoxTaxItem.SelectedIndex;
     Properties.Settings.Default.taxSystemDeault        = comBoxTaxSystem.SelectedIndex;
     Properties.Settings.Default.paymentItemsSign       = Undefiend.ConvertItemsToString(comBoxPaymentItemSign.Items);
     Properties.Settings.Default.paymentTypeSign        = Undefiend.ConvertItemsToString(comboBox2.Items);
     Properties.Settings.Default.taxItems  = Undefiend.ConvertItemsToString(comBoxTaxItem.Items);
     Properties.Settings.Default.taxSystem = Undefiend.ConvertItemsToString(comBoxTaxSystem.Items);
     Properties.Settings.Default.Save();
 }
示例#4
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 };
        }
示例#5
0
 private void button1_Click(object sender, EventArgs e)
 {
     Undefiend.SendMail("Ошибка работы", LAllCode.Text);
     Close();
 }
示例#6
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            int Poz = arrayCheckBox.Length;

            if (Poz >= NumberOfPosition)
            {
                bAdd.Visible = false;
            }
            int Y = bAdd.Location.Y;

            Array.Resize(ref arrayCheckBox, Poz + 1);
            Array.Resize(ref arrayPaymentItemSign, Poz + 1);
            Array.Resize(ref arrayNameProduct, Poz + 1);
            Array.Resize(ref arrayPrice, Poz + 1);
            Array.Resize(ref arrayQuantity, Poz + 1);
            Array.Resize(ref arrayTax, Poz + 1);
            Array.Resize(ref arraySumm, Poz + 1);
            arrayCheckBox[Poz] = new CheckBox {
                Size     = arrayCheckBox[0].Size, Text = Convert.ToString(Poz + 1) + '.',
                Checked  = true,
                Location = new Point(XY[0], Y)
            };
            arrayCheckBox[Poz].CheckedChanged += new EventHandler(CBox_ChekedChanged);
            arrayPaymentItemSign[Poz]          = new ComboBox {
                Size          = arrayPaymentItemSign[0].Size,
                Location      = new Point(XY[1], Y),
                DropDownStyle = ComboBoxStyle.DropDownList
            };
            Undefiend.CopyToFromObjectCollection(arrayPaymentItemSign[0].Items, arrayPaymentItemSign[Poz].Items);
            arrayPaymentItemSign[Poz].SelectedIndex = arrayPaymentItemSign[0].SelectedIndex;
            arrayNameProduct[Poz] = new TextBox {
                Size     = arrayNameProduct[0].Size,
                Location = new Point(XY[2], Y),
                Text     = ""
            };
            arrayPrice[Poz] = new TextBox {
                Size     = arrayPrice[0].Size,
                Location = new Point(XY[3], Y),
                Text     = ""
            };
            arrayPrice[Poz].TextChanged += new EventHandler(TextBoxPrice_TextChanged);
            arrayQuantity[Poz]           = new TextBox {
                Size     = arrayQuantity[0].Size,
                Location = new Point(XY[4], Y),
                Text     = ""
            };
            arrayQuantity[Poz].TextChanged += new EventHandler(TextBoxQuantity_TextChanged);
            arrayTax[Poz] = new ComboBox {
                Size          = arrayTax[0].Size,
                Location      = new Point(XY[5], Y),
                DropDownStyle = ComboBoxStyle.DropDownList
            };
            Undefiend.CopyToFromObjectCollection(arrayTax[0].Items, arrayTax[Poz].Items);
            arrayTax[Poz].SelectedIndex = arrayTax[0].SelectedIndex;
            arraySumm[Poz] = new TextBox {
                Size     = arraySumm[0].Size,
                Location = new Point(XY[6], Y),
                ReadOnly = true,
                Text     = "0,00"
            };
            arraySumm[Poz].TextChanged += new EventHandler(TextBoxSumm_TextChanged);

            SuspendLayout();
            panel2.Controls.Add(arrayCheckBox[Poz]);
            panel2.Controls.Add(arrayPaymentItemSign[Poz]);
            panel2.Controls.Add(arrayNameProduct[Poz]);
            panel2.Controls.Add(arrayPrice[Poz]);
            panel2.Controls.Add(arrayQuantity[Poz]);
            panel2.Controls.Add(arrayTax[Poz]);
            panel2.Controls.Add(arraySumm[Poz]);
            ResumeLayout(false);
            PerformLayout();
            bAdd.Location = new Point(bAdd.Location.X, bAdd.Location.Y + 30);
            if (bAdd.Location.Y + 64 > panel2.Size.Height)
            {
                panel2.Size = new Size(panel2.Size.Width, panel2.Size.Height + 30);
            }
        }
示例#7
0
 private void Test()
 {
     Array.Resize(ref arrayPaimentItemSign, 1);
     arrayPaimentItemSign = Undefiend.AddDictToArray(WorkWithDKKT.DicItems.getDicPaimentItemSign(), arrayPaimentItemSign);
 }
示例#8
0
 private void button1_Click(object sender, EventArgs e)
 {
     Undefiend.SendMail(tbSubject.Text, tbMessage.Text);
     Close();
 }