Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Re: Help
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01236253
Message ID:
01237059
Views:
17
Fred,

>this.customer.NewEntity();
>int test = (int) this.customer.GetPrimaryKeyValue();
>this.customer.SaveEntity();

Looks like I found an issue with version 2.4 and custom auto-increment values. I'll contact you directly via e-mail to help resolve this.

>We would also like to know if this is the recommended way to utilize stored procedures for inserting data.
>
>public LocationEntity SaveLocation(LocationEntity entity)
>{
> LocationEntity locationEntity = this.CreateEntityObject();
> locationEntity = this.GetEntity("LocationInsert",
> this.CreateParameter("@Address", entity.Address),
> this.CreateParameter("@CategoryID", entity.CategoryID),
>
> return locationEntity;
>}

You can do it this way, but if you have the Business Layer Generator create your select, insert, update, and delete stored procedures for you you can just do this:

LocationEntity locationEntity = this.NewEntity();
locationEntity.Address = "My Address";
locationEntity.CategoryID = 2;
this.SaveEntity();

>Finally, we are using this code with mmRADGrid and was wondering if this is correct.
>
>if (e.CommandName.Trim().ToString() == "Insert")
>{
> mmTextBox txtName = e.Item.FindControl("txtName") as mmTextBox;
> mmTextBox txtAddress = e.Item.FindControl("txtAddress") as mmTextBox;
>
> location.NewEntity();
> this.location.Entity.Name = txtName.Text.Trim().ToString();
> this.location.Entity.Address = txtAddress.Text.Trim().ToString();
>
> this.location.SaveLocation(this.location.Entity);
>}

Yes, that works well.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform