예제 #1
0
        public DTP_AddEdit(DTP dtp)
        {
            InitializeComponent();

            dtpFileList = DTPFileList.getInstance();

            _dtp = dtp;
        }
예제 #2
0
        public DataTable ToDataTable(DTP dtp)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("id");
            dt.Columns.Add("Название");

            foreach (var item in dictionary)
                dt.Rows.Add(new object[2] { item.Key, item.Value });

            dt.Rows.Add(dtp.getCulpit());

            return dt;
        }
예제 #3
0
 public DTPFile(DTP dtp)
 {
     DTP = dtp;
     File = string.Empty;
 }
예제 #4
0
 public DTPFile(DTP dtp)
 {
     DTP  = dtp;
     File = string.Empty;
 }
예제 #5
0
        public void showNotice(DTP dtp)
        {
            _excelDoc = openDocumentExcel("Извещение о страховом случае");

            Owners owners = Owners.getInstance();

            _excelDoc.setValue(7, 4, owners.getItem(Convert.ToInt32(_car.ownerID)));
            _excelDoc.setValue(8, 5, "а/я 34, 196128");
            _excelDoc.setValue(9, 6, "320-40-04");

            DriverCarList driverCarList = DriverCarList.getInstance();
            Driver driver = driverCarList.GetDriver(_car, dtp.Date);

            PassportList passportList = PassportList.getInstance();
            Passport passport = passportList.getLastPassport(driver);

            if (passport.Number != string.Empty)
            {
                string number = passport.Number;
                string[] numbers = number.Split(' ');

                _excelDoc.setValue(11, 2, numbers[0]);
                _excelDoc.setValue(11, 5, numbers[1]);

                _excelDoc.setValue(12, 2, passport.GiveOrg);
                _excelDoc.setValue(13, 3, passport.GiveDate.ToShortDateString());
            }

            PolicyList policyList = PolicyList.getInstance();
            Policy policy = policyList.getItem(_car, PolicyType.КАСКО);
            _excelDoc.setValue(15, 5, policy.Number);

            _excelDoc.setValue(17, 5, string.Concat(_car.Mark.Name, " ", _car.info.Model));
            _excelDoc.setValue(19, 5, _car.Grz);
            _excelDoc.setValue(21, 5, _car.vin);

            _excelDoc.setValue(23, 5, dtp.Date.ToShortDateString());

            _excelDoc.setValue(28, 1, driver.GetName(NameType.Full));

            Regions regions = Regions.getInstance();

            _excelDoc.setValue(30, 2, regions.getItem(Convert.ToInt32(dtp.IDRegion)));
            _excelDoc.setValue(32, 13, dtp.Damage);
            _excelDoc.setValue(34, 1, dtp.Facts);

            SsDTP ssDTP = SsDTPList.getInstance().getItem(_car.Mark);

            _excelDoc.setValue(63, 11, ssDTP.ServiceStantion);

            DateTime date = DateTime.Today;
            MyDateTime myDate = new MyDateTime(date.ToShortDateString());

            _excelDoc.setValue(71, 3, string.Concat("« ", date.Day.ToString(), " »"));
            _excelDoc.setValue(71, 4, myDate.MonthToStringGenitive());
            _excelDoc.setValue(71, 8, date.Year.ToString().Substring(2, 2));

            _excelDoc.Show();
        }
예제 #6
0
 public DataTable ToDataTable(DTP dtp)
 {
     return createTable(list.Where(f => f.DTP.ID == dtp.ID));
 }