Exemple #1
0
        public override void Save()
        {
            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "DiagCard", Number);

            ExecSave();
        }
Exemple #2
0
        public override void Save()
        {
            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "Invoices", Number);

            Id = Convert.ToInt32(Provider.Insert("Invoice", Id, Car.Id, Number, DriverFromID, DriverToID, Date,
                                                 DateMoveForSQL, RegionFromID, RegionToID, File));
        }
Exemple #3
0
        public override void Save()
        {
            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "Documents", Name);

            int id;

            int.TryParse(Provider.Insert("CarDoc", Id, Car.Id, Name, File), out id);
            Id = id;
        }
Exemple #4
0
        public override void Save()
        {
            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "", "STS");

            Provider.Insert("STS", Car.Id, Number, Date, GiveOrg, File);

            STSList stsList = STSList.getInstance();

            stsList.Add(this);
        }
Exemple #5
0
        public override void Save()
        {
            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "ShipPart", Number);

            int id;

            int.TryParse(
                Provider.Insert("ShipPart", Id, Car.Id, Driver.Id, Number, DateRequestForSQL, DateSentForSQL, File).ToString(),
                out id);
            Id = id;
        }
Exemple #6
0
        public override void Save()
        {
            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "drivers", Driver.Id, "Passports", _number);

            int id;

            int.TryParse(
                Provider.Insert("Passport", Id, Driver.Id, LastName, FirstName, SecondName, Number, GiveOrg, GiveDate, Address,
                                File), out id);
            Id = id;

            PassportList.getInstance().Add(this);
        }
Exemple #7
0
        public override void Save()
        {
            int id;

            if (Id == 0)
            {
                int.TryParse(Provider.Insert("dtpFile", Id, DTP.Id, Name, File), out id);
                Id = id;
            }

            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "DTP", DTP.Id, string.Empty, Name);

            int.TryParse(Provider.Insert("dtpFile", Id, DTP.Id, Name, File), out id);
            Id = id;
        }
Exemple #8
0
        public override void Save()
        {
            int id;

            if (Id == 0)
            {
                int.TryParse(Provider.Insert("Repair", Id, Car.Id, _idRepairType, _idServiceStantion, Date, _cost, File),
                             out id);
                Id = id;
            }

            DeleteFile(File);

            File = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "Repair", Id.ToString());
            int.TryParse(Provider.Insert("Repair", Id, Car.Id, _idRepairType, _idServiceStantion, Date, _cost, File),
                         out id);
            Id = id;
        }
Exemple #9
0
        public override void Save()
        {
            DeleteFile(File);
            deleteFilePay();

            File    = WorkWithFiles.FileCopyById(File, "cars", Car.Id, "Violation", Number);
            FilePay = WorkWithFiles.FileCopyById(FilePay, "cars", Car.Id, "ViolationPay", Number);

            string datePay = string.Empty;

            if (DatePay != null)
            {
                datePay = string.Concat(DatePay.Value.Year.ToString(), "-", DatePay.Value.Month.ToString(), "-",
                                        DatePay.Value.Day.ToString());
            }

            int id;

            int.TryParse(Provider.Insert("Violation", Id, Car.Id, Date, Number, File, datePay,
                                         FilePay, _idViolationType, _sum, _sent, _noDeduction, Agreed.ToString()), out id);
            Id = id;
        }