Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BizObject.NewRo() w w/ default values
Message
 
À
23/06/2010 08:01:31
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01470167
Message ID:
01471125
Vues:
40
Thank you again, Tim. I had references to MM.2008 in there, but just updated them. I'll try stepping through now to see if I can figure out where things are going wrong.

Eric

>Hi Eric,
>
>You didn't attach but I believe your check so don't need it. I would suggest that you set a breakpoint in the code below and step into the mm method for NewRow so you can find out what is happening. If you haven't already setup your IDE to allow you to step into the mm code, there are instructions in the dev guide under Advanced Topics that show how to add the mm debug symbols to your VS. You should be able to see where the defaults object is being used to set the default value and then also where it is being overriden. Like is there hard coded values in the HookSetDefaultValues method of the business object that are being set also?
>Tim
>
>
>>Hi Tim,
>>
>>Check out the attachment - the defaults object looks good to me. It's only got one property numEventId which has the value I want. numEventID is the fieldname I need defaulted as well.
>>
>>Thanks,
>>
>>Eric
>>
>>>>Hey all,
>>>>
>>>>It's been a while since I rapped at ya, but things have been busy. I upgraded to VS2010 and MM 4.0 and things are working pretty well, but here's my current issue. I'm trying to create an object w/ a default value so I've created my bizObject and my defaultValues object and calling the bizObject.newRow(ds, "TableName", oDefaultValues) method but the default values aren't going in. (see attached pics for debug info).
>>>>
>>>>
>>>> protected void FeeAdd(object sender, EventArgs e)
>>>>    {
>>>>        // Retrieve the previous Order Detail DataSet
>>>>        DataSet ds = (DataSet)Session["dsFeeSchedule"];
>>>>
>>>>        // Add a new row to the DataSet
>>>>        GolfFeeDefaultValues oDefaults = new GolfFeeDefaultValues(iEventId);
>>>>
>>>>        oFee.NewRow(ds, oFee.TableName, oDefaults);
>>>>
>>>>        // Store the DataSet back into the session
>>>>        Session["dsFeeSchedule"] = ds;
>>>>
>>>>        // Set the new row for editing
>>>>        this.grdFeeSchedule.EditIndex =
>>>>           ds.Tables[this.oFee.TableName].Rows.Count - 1;
>>>>
>>>>        // Rebind the GridView
>>>>        this.BindControl(this.grdFeeSchedule);
>>>>    }
>>>>
>>>>
>>>>Thanks,
>>>>
>>>>Eric
>>>
>>>Hi Eric,
>>>
>>>Try putting a break point in the business object within the HookSetDefaultValues method to verify you are getting a valid DefaultValues object when that method runs.
>>>Tim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform