Esempio n. 1
0
        private void fillFields()
        {
            dtpDate.Value   = _violation.Date;
            tbNumber.Text   = _violation.Number;
            chbPaid.Checked = (_violation.DatePay != null);

            TextBox tbFile = ucFile.Controls["tbFile"] as TextBox;

            tbFile.Text = _violation.File;

            cbViolationType.SelectedValue = _violation.IDViolationType;
            tbSum.Text = _violation.Sum;

            ViolationTypes violationType = ViolationTypes.getInstance();

            cbViolationType.DataSource    = violationType.ToDataTable();
            cbViolationType.ValueMember   = "id";
            cbViolationType.DisplayMember = "Название";

            cbViolationType.SelectedValue = _violation.IDViolationType;
            tbSum.Text = _violation.Sum;

            TextBox tbFilePay = ucFilePay.Controls["tbFile"] as TextBox;

            tbFilePay.Text = _violation.FilePay;

            chbNoDeduction.Checked = _violation.NoDeduction;

            llDriver.Text = _violation.getDriver().GetName(NameType.Full);
            llCar.Text    = _violation.Car.ToString();
        }
Esempio n. 2
0
        private ToolStripMenuItem CreateViolationType()
        {
            ToolStripMenuItem item = CreateItem("Типы нарушений ПДД");

            item.Click += delegate
            {
                loadDictionary("ViolationType", "Справочник \"Типы нарушений ПДД\"");

                ViolationTypes violationType = ViolationTypes.getInstance();
                violationType.ReLoad();
            };
            return(item);
        }
Esempio n. 3
0
        internal override object[] getRow()
        {
            Driver driver = getDriver();

            ViolationTypes violationType = ViolationTypes.getInstance();

            InvoiceList invoiceList = InvoiceList.getInstance();
            Invoice     invoice     = invoiceList.getItem(Car);
            Regions     regions     = Regions.getInstance();
            string      regionName  = (invoice == null) ? regions.getItem(Convert.ToInt32(Car.regionUsingID)) : regions.getItem(Convert.ToInt32(invoice.RegionToID));

            return(new object[] { ID, Car.ID, Car.BBNumber, Car.Grz, regionName, Date, driver.GetName(NameType.Full), Number, DatePay,
                                  violationType.getItem(_idViolationType), _sum });
        }
Esempio n. 4
0
        internal object[] GetRowAccount()
        {
            string btnName = (Agreed) ? string.Empty : "Согласовать";

            return(new object[]
            {
                ID,
                Car.ID,
                Car.BBNumber,
                Car.Grz,
                Number,
                Date,
                getDriver().GetName(NameType.Full),
                ViolationTypes.getInstance().getItem(_idViolationType),
                _sum,
                btnName
            });
        }