CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Insert more then one record into DB in one round

Print topic Send  topic

Author Message
rado

Posts: 221
Posted: 07/02/2009, 9:23 AM

I would like to make a kind of payment schedule for renting purpose that suppose to work on this way

1. User select date range (from - to) (example (January 1 2009 - June 31 2009) and price per month ($455.00)
2. Based on this selection I have to calculate how many monts are in selected date range (in my example is "6")
3. I would like to dynamically create 6 controls that will have label of each month (January, February,March, April,May,June) and beside each month control with price that will be automatically inserted with price entered in step 1.
January, $455.00
February, $455.00
March, $455.00
April, $455.00
May, $455.00
June $455.00
4. So when I click "Add" button I would like to insert 6 records (one record per month)

Any help will be really, really, really appreciate.

Thanks,

Rado
View profile  Send private message
rado

Posts: 221
Posted: 07/02/2009, 6:42 PM

Anybody with idea how to get this done?

Thanks,

Rado
View profile  Send private message
ckroon

Posts: 869
Posted: 07/02/2009, 9:23 PM

Newb here but you might try making an Editable grid with 6 empty rows..
Then Force the Values into the "Month" Textboxes....
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
Waspman

Posts: 948
Posted: 07/03/2009, 1:17 AM

You're on the right track...

3 forms;

One for date and price entry which calculates the months and puts the results into session variables.

Second to display results with 24(assuming 12 month max) labels populated by sessions.

And one that puts sessions values into hidden fields and displays just the submit button "Accept" or whatever. This is the only form that submits anything.

?T:-)

OH, and I'd use an update panel
_________________
http://www.waspmedia.co.uk
View profile  Send private message
rado

Posts: 221
Posted: 07/03/2009, 6:12 AM

Thanks ckroon and Waspman.

The bigest question is how dynamically create the controls based on number of number of months? Is this even possibile with code charge?

Rado
View profile  Send private message
Waspman

Posts: 948
Posted: 07/03/2009, 8:14 AM

Not sure I'd do that, depends on your scheme.

I have 12 fixed fields tagged by year, since they're hidden it doesn't really matter.

The labels in the second form are either populated or not, so they are sort of dynamic.

T
_________________
http://www.waspmedia.co.uk
View profile  Send private message

Add new topic Subscribe to topic   


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

Web Database

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.