CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Updateable grid to enter Qty. to order

Print topic Send  topic

Author Message
TonyE
Posted: 07/09/2002, 10:26 AM

I am designing a parts ordering system similar to the bookstore example.
The difference I try to accomplish is the following:

The user should be able to order an item directly from the grid form. The grid form should include a text field for the Quantity and an [Order button]
This would make it more "user-friendly" since it eliminates 1 click.
My grid should look like the following:

[Item_id], [Description], [Price], [Text field for Qty], [Order button]
Item_id, Description, Price is from the “item” table.

If a user enters the Quantity in the text field and clicks on the purchase button next to it, a new record should be created in the “order” table with the Item_id, Quantity and UserID.

Has anybody an idea on how to do that in CCStudio.

I am using PHP and MySql

All help would be appreciated since I am not sure where to start

TonyE
Nicole
Posted: 07/10/2002, 2:17 AM

Tony,
I believe that approach for editable grid creation is the similar for CC and CCS. Please refer to the article http://www.gotocode.com/art.asp?art_id=50&
The difference is in events and functions, i.e.
Use Before Show Row events instead CC Before Show event, use Page After Initialize instead Page Open event.
To access field value use code like:
global $form_name;
$temp = $form_name->field_name->Value;
To set field value:
$form_name->field_name->SetValue(“any value”);

Execute query:
$sql = "select bug_id from bugs";
global $form_name;
$form_name->ds->query($sql);

or

$conn = new clsDB<connection_name>();
$conn->query($sql);
Jeroen
Posted: 07/10/2002, 6:20 AM

I had the same question at the same moment, and also a parts ordering system. What a coinscidence!

But what I want to know is how to change the userid session check. Because I'm not using the login function like the BookStore uses. I've made a session with md5(uniqid()) as a value and I've put it in After Initiallize. Is this ok, or is there a better way?

And another question:

When I don't want to show a grid or record when some variable is set, where do I place this? I can put a if(!isset($variable)) directly in the code, but then the grey area disapears and when I add another grid it doesn't put the code in place because I've edited the code.

I work with CCS, PHP.
Jeroen
Posted: 07/17/2002, 6:20 AM

I've tried to get it to work, but I can't. Nicole, or someone else, can you explain me how to get this to work?

I use PHP and MySQL with CCS. I have 3 fields in a table called shopping: session, partid and quantity. I want people to be able to change the quantity of the parts in a grid. The parts are selected by session.

I've made the form, but I'm stuck with the input. I don't know how to assign partid with the name, because in the grid there is no partid shown. I show a partnumber in the grid which I get from another table. And I use alt rows.
This makes it all a bit more complicated for me.
Jeroen
Posted: 07/17/2002, 6:31 AM

I've tried to get it to work, but I can't. Nicole, or someone else, can you explain me how to get this to work?

I use PHP and MySQL with CCS. I have 3 fields in a table called shopping: session, partid and quantity. I want people to be able to change the quantity of the parts in a grid. The parts are selected by session.

I've made the form, but I'm stuck with the input. I don't know how to assign partid with the name, because in the grid there is no partid shown. I show a partnumber in the grid which I get from another table. And I use alt rows.
This makes it all a bit more complicated for me.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.