Программная реализация курьерского заказа

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

emp.dohour.hourthencurrent.dohour.min>=temp.dohour.minthen;:=current;:=current.next;(i);;i=1then.next:=listZak;:=temp;.next:=current;.next:=temp;;;;;;;">{Добавление нового заказа}TMainWind.AddZakButtonClick(Sender: TObject);,current,prev:Tzakaz;:integer;.ShowModal;(NewOrderUnit.ifAddButClick=true) then:=NewOrderUnit.newZak;.addToCour:=false;(temp);ListZak=nil then:=temp;.number:=1;.next:=nil;:=1;:=ListZak;current=temp.dohour.min then;:=current;:=current.next;(i);;i=1 then.next:=listZak;:=temp;.next:=current;.next:=temp;;;;;;;

nildocurrCour.dotime.hour>tempCour.dotime.hourthencurrCour.dotime.hour=tempCour.dotime.hourthencurrCour.dotime.min>=tempCour.dotime.minthen;:=currCour;:=currCour.next;(j);;j=1then.next:=ListCour;:=tempCour;.next:=currCour;.next:=tempCour;;;;;;;">{Добавление нового курьера}TMainWind.AddCourButtonClick(Sender: TObject);,CurrCour,PrevCour:TCourier;:integer;.ShowModal;(NewCourierUnit.ifAddButClick=true) then:=NewCourierUnit.NewCour;ListCour=nil then:=tempCour;.number:=1;.next:=nil;:=1;:=ListCour;currCour=tempCour.dotime.min then;:=currCour;:=currCour.next;(j);;j=1 then.next:=ListCour;:=tempCour;.next:=currCour;.next:=tempCour;;;;;;;

nildo(f1,currZak.number);(f1,currZak.name);(f1,currZak.adress);(f1,currZak.othour.hour);(f1,currZak.othour.min);(f1,currZak.dohour.hour);(f1,currZak.dohour.min);(f1,currZak.volume);(f1,currZak.ves);:=currZak.next;;(f1);(f1,courier.txt);(f1);:=listCour;currCurnil do(f1,currCur.number);(f1,currCur.fiocour);(f1,currCur.ottime.hour);(f1,currCur.ottime.min);(f1,currCur.dotime.hour);(f1,currCur.dotime.min);(f1,currCur.volume);(f1,currCur.weight);:=currCur.next;;(f1);;

nil)then.next:=nil;(f1);;;(f1,courier.txt);(f1);:=nil;noteof(f1)do(currCur);(f1,currCur.number);(f1,currCur.fiocour);(f1,currCur.ottime.hour);(f1,currCur.ottime.min);(f1,currCur.dotime.hour);(f1,currCur.dotime.min);(f1,currCur.volume);(f1,currCur.weight);.NowWeight:=0;.NowVolume:=0;.PointZak:=nil;(prevCur=nil)then:=currCur.next:=currCur;:=currCur;;(prevCurnil) do(currZak);:=currZak.next;;;;;

{Вывод списка курьеров в форму}

nildo.Items.Add(IntToStr(CurrCourList.number)+)+CurrCourList.fiocour);.Items.Add(Hour:+IntToStr(CurrCourList.ottime.hour)+Min:+IntToStr(CurrCourList.ottime.min));.Items.Add(Hour:+IntToStr(CurrCourList.dotime.hour)+Min:+IntToStr(CurrCourList.dotime.min));.Items.Add(IntToStr(CurrCourList.Volume));.Items.Add(IntToStr(CurrCourList.Weight));:=CurrCourList.next;;;">procedure TMainWind.DisplayCourList;:TCourier;.Clear;.Clear;.Clear;.Clear;.Clear;:=ListCour;CurrCourList<>nil do.Items.Add(IntToStr(CurrCourList.number)+)+CurrCourList.fiocour);.Items.Add(Hour:+IntToStr(CurrCourList.ottime.hour)+ Min:+IntToStr(CurrCourList.ottime.min));.Items.Add(Hour:+IntToStr(CurrCourList.dotime.hour)+ Min:+IntToStr(CurrCourList.dotime.min));.Items.Add(IntToStr(CurrCourList.Volume));.Items.Add(IntToStr(CurrCourList.Weight));:=CurrCourList.next;;;

//вывод списка заказов в таблицу//

Procedure TMainWind.DisplayZakList;:TZakaz;:integer;i:=0 to ListZakStringGrid.RowCount-1 do.Rows[i].Clear;ListZakStringGrid do[0,0]:=;[1,0]:=;[2,0]:=;[3,0]:= ;[4,0]:= :;[5,0]:=:;[7,0]:=;[8,0]:=nildoListZakStringGriddo[0,currZak.number]:=IntToStr(currZak.number);[1,currZak.number]:=currZak.name;[2,currZak.number]:=currZak.adress;[3,currZak.number]:=IntToStr(currZak.othour.hour);[4,currZak.number]:=IntToStr(currZak.othour.min);[5,currZak.number]:=IntToStr(currZak.dohour.hour);[6,currZak.number]:=IntToStr(currZak.dohour.min);[7,currZak.number]:=IntToStr(currZak.ves);[8,currZak.number]:=IntToStr(currZak.volume);;:=currZak.next;;;">;;:=ListZak;currZak<>nil doListZakStringGrid do[0,currZak.number]:=IntToStr(currZak.number);[1,currZak.number]:=currZak.name;[2,currZak.number]:=currZak.adress;[3,currZak.number]:=IntToStr(currZak.othour.hour);[4,currZak.number]:=IntToStr(currZak.othour.min);[5,currZak.number]:=IntToStr(currZak.dohour.hour);[6,currZak.number]:=IntToStr(currZak.dohour.min);[7,currZak.number]:=IntToStr(currZak.ves);[8,currZak.number]:=IntToStr(currZak.volume);;:=currZak.next;;;

nildo.number:=i;:=CurrCourList.next;(i);;;">{Присваивание номеров курьерам}TMainWind.Number;:Tcourier;:integer;:=1;:=ListCour;CurrCourList<>nil do.number:=i;:=CurrCourList.next;(i);;;

nildo.number:=i;:=CurrZakList.next;(i);;;TMainWind.FIOCourListBoxClick(Sender:TObject);:TCurZakaz;:Tcourier;FIOCourListBox.ItemIndex>=0then.ItemIndex:=FIOCourListBox.ItemIndex;.ItemIndex:=FIOCourListBox.ItemIndex;.ItemIndex:=FIOCourListBox.ItemIndex;.ItemIndex:=FIOCourListBox.ItemIndex;.Clear;:=GetCourierByIndex(FIOCourListBox.ItemIndex,prev).PointZak;(curZaknil)do.Lines.Add(curZak.zak.name+ +curZak.zak.adress+ :+IntToStr(curZak.zak.othour.hour)+.+IntToStr(curZak.zak.othour.min)+ :+IntToStr(curZak.zak.dohour.hour)+.+IntToStr(curZak.zak.dohour.min)+ :+IntToStr(curZak.zak.ves)+ :+IntToStr(curZak.zak.volume));:=curZak.next;;;;

nil)do:=CurCour;:=curCour.next;(i);;:=curCour;;TMainWind.OtTimeCourListBoxClick(Sender:TObject);:TCurZakaz;:Tcourier;OtTimeCourListBox.ItemIndex>=0then.ItemIndex:=OtTimeCourListBox.ItemIndex;.ItemIndex:=OtTimeCourListBox.ItemIndex;.ItemIndex:=OtTimeCourListBox.ItemIndex;.ItemIndex:=OtTimeCourListBox.ItemIndex;.Clear;:=GetCourierByIndex(OtTimeCourListBox.ItemIndex,prev).PointZak;(curZaknil)do.Lines.Add(curZak.zak.name+ +curZak.zak.adress+ :+IntToStr(curZak.zak.othour.hour)+.+IntToStr(curZak.zak.othour.min)+ :+IntToStr(curZak.zak.dohour.hour)+.+IntToStr(curZak.zak.dohour.min)+ :+IntToStr(curZak.zak.ves)+ =0then.ItemIndex:=DoTimeCourListBox.ItemIndex;.ItemIndex:=DoTimeCourListBox.ItemIndex;.ItemIndex:=DoTimeCourListBox.ItemIndex;.ItemIndex:=DoTimeCourListBox.ItemIndex;.Clear;:=GetCourierByIndex(DoTimeCourListBox.ItemIndex,prev).PointZak;(curZak<>nil)do.Lines.Add(curZak.zak.name