![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Помогите разобраться что неправильно [D7, XP]
kashmar © (2006-05-30 08:52:00)К этому есть таблица но почемуто нещетается Раннее начало что неправильно?
unit Unit1;
//unit UGraphic;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Menus, Unit2, StdCtrls, DB, DBTables, XPMan, ComCtrls;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
MainMenu1: TMainMenu;
N11: TMenuItem;
N21: TMenuItem;
Button1: TButton;
N1: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
procedure FormCreate(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
StringGrid1.ColWidths[9]:=200;
StringGrid1.Cells[0,0]:='Êîëè÷åñòâ& #238; ïðåäøåñòâóþùè 245; ðàáîò';
StringGrid1.Cells[1,0]:='Íà÷àëî ðàáîòû';
StringGrid1.Cells[2,0]:='Îêîí÷àíèå ðàáîòû';
StringGrid1.Cells[3,0]:='Ïðîäîëæèò& #229;ëüíîñòü';
StringGrid1.Cells[4,0]:='Ðàííåå íà÷àëî ðàáîòû';
StringGrid1.Cells[5,0]:='Ðàííåå îêîí÷àíèå ðàáîòû';
StringGrid1.Cells[6,0]:='Ïîçäíåå íà÷àëî ðàáîòû';
StringGrid1.Cells[7,0]:='Ïîçäíåå îêîí÷àíèå ðàáîòû';
StringGrid1.Cells[8,0]:='Ïîëíûé ðåçåðâ';
StringGrid1.Cells[9,0]:='Íàçâàíèå ðàáîòû';
StringGrid1.Cells[10,0]:='×àñòíûé ðåçåðâ âðåìåíè';
end;
procedure TForm1.N1Click(Sender: TObject);
begin
form2.Visible:=True;
Form2.Edit1.Clear;
Form2.Edit2.Clear;
Form2.Edit3.Clear;
end;
procedure TForm1.N2Click(Sender: TObject);
begin
form2.Visible:=true;
end;
procedure TForm1.N3Click(Sender: TObject);
begin
j:=j-1;
StringGrid1.Rows[StringGrid1.Row].Clear;
StringGrid1.RowCount:=j+1;
end;
procedure TForm1.Button1Click(Sender: TObject);
var i,j,r,max,min:integer;
begin
//ðàñ÷åò êîëè÷åñòâà ïðåäøåñòâóþùè 245; ðàáîò
stringgrid1.RowCount := stringgrid1.RowCount-1;
r:=0;
for i:=1 to stringgrid1.RowCount do
begin
for j:=1 to stringgrid1.RowCount do
begin
if stringgrid1.Cells[1,i]=stringgrid1.Cells[2,j]
then r:=r+1;
end;
stringgrid1.Cells[0,i]:=inttostr(r);
r:=0;
end;
//ðàñ÷åò ðàíííåãî íà÷àëà ðàáîòû
for i:=1 to StringGrid1.RowCount do
if StringGrid1.Cells[0,i]=inttostr(0)
then StringGrid1.Cells[4,i]:=StringGrid1.Cells[0,i];
max:=1000;
for i:=1 to StringGrid1.RowCount do
begin
for j:=1 to StringGrid1.RowCount do
begin
if StringGrid1.Cells[1,i]=StringGrid1.Cells[2,j]
then
if (strtoint(StringGrid1.cells[5,i])>max)=(strtoint(StringGrid1.cells[4,i])>max)
then
begin
max:=strtoint(StringGrid1.cells[5,i]);
StringGrid1.Cells[4,i]:=inttostr(max);
end;
max:=0;
end;
end;
//ðàñ÷åò ðàííåãî îêîí÷àíèÿ ðàáîòû
for i:=1 to StringGrid1.RowCount do
StringGrid1.Cells[5,i]:=inttostr(strtoint(StringGrid1.Cells[4,i])+strtoint(StringGrid1.Cells[3,i]));
//ðàñ÷åò ïîçäíåãî îêîí÷àíèÿ ðàáîòû
for i:=1 to StringGrid1.RowCount do
if StringGrid1.Cells[7,i]=inttostr(0)
then StringGrid1.Cells[4,i]:=StringGrid1.Cells[0,i];
min:=1000;
for i:=1 to StringGrid1.RowCount do
begin
for j:=1 to StringGrid1.RowCount do
begin
if StringGrid1.Cells[2,i]=StringGrid1.Cells[1,j]
then
if strtoint(StringGrid1.cells[6,i])DrawGraphic(massiv);
// fGraphic->ShowModal();
//delete fGraphic;
end.
К этому есть таблица но почемуто нещетается Раннее начало что неправильно?
evvcom (2006-05-30 09:30:00) [1]Кошмар, ты над нами издеваешься? Твои кракозябры даже Mail Reader, пытаясь разобрать, отнес к схеме "Кошмар". Совпадение? Сомневаюсь.
syte_ser78 (2006-05-30 08:57:00) [2]а что ты сумировать собрался?
'?aiiaa ia?aei ?aaiou' - 'Iicaiaa ieii?aiea ?aaiou';
ЮЮ (2006-05-30 08:55:00) [3]for i:=1 to StringGrid1.RowCount do
StringGrid1.Cells[6,i]
for i:= 0to StringGrid1.RowCount - 1do
StringGrid1.Cells[6,i]