if loginform.showModal=mrok then
begin
loginform.Hide;
loginform.free;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end
else
Application.Terminate;
begin
loginform.Hide;
loginform.free;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end
else
Application.Terminate;
Application.Initialize;
Application.CreateForm(Tloginform, loginform);
if loginform.showModal=mrok then
begin
loginform.Hide;
loginform.free;
Application.CreateForm(TMainForm, MainForm);
end
else
exit;
Application.CreateForm(Tdatamodule1, datamodule1);
Application.CreateForm(TForm2, Form2);
Application.CreateForm(Thunit, hunit);
Application.CreateForm(Tcoin, coin);
Application.CreateForm(Thsize, hsize);
Application.CreateForm(Thdept, hdept);
Application.CreateForm(Thcolor, hcolor);
Application.CreateForm(Thpg, hpg);
Application.CreateForm(Thbank, hbank);
Application.CreateForm(Tinextype, inextype);
Application.CreateForm(Tstorehouse, storehouse);
Application.CreateForm(Tproducerii, producerii);
Application.CreateForm(Tproduceredit, produceredit);
Application.CreateForm(Tproviderii, providerii);
Application.CreateForm(Tcustomerii, customerii);
Application.CreateForm(Tshippingii, shippingii);
Application.CreateForm(Tproductii, productii);
Application.CreateForm(Temployeeii, employeeii);
Application.CreateForm(Tjmdii, jmdii);
Application.CreateForm(Temployeeedit, employeeedit);
Application.CreateForm(Tproductedit, productedit);
Application.CreateForm(Tjmdedit, jmdedit);
Application.CreateForm(Tshippingedit, shippingedit);
Application.CreateForm(Tcustomeredit, customeredit);
Application.CreateForm(Tprovideredit, provideredit);
Application.Run;
Application.Terminate;
if loginform.showModal=mrOK then
begin
loginform.Hide;
loginform.free;
Application.CreateForm(TMainForm, MainForm);
end
elseif loginform.showModal=mrCancel then
begin
Application.Terminate;
end