New C# Component
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



New C# ComponentExpand / Collapse
Author
Message
Posted 05/03/2008 1:12:11 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:00:39 PM
Posts: 244, Visits: 816
I have seen the design of a VB component that inherits from BusinessBindingSource; however, I cannot see to create a C# component that does the same thing (my VB to C# translation skills are not always up to par).  My goal is to create an extended component for a specific business object.  The XBBS will be dropped onto an XtraReport as a datasource.  Any pointers would be appreciated?

Bill

Post #16113
Posted 05/03/2008 2:10:23 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:00:39 PM
Posts: 244, Visits: 816
After adding a new component to the project, I altered the code to look like this:

using Aspire.Model;
using MicroFour.StrataFrame.Business;
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Aspire.Shipping.Datasources
{
   
public partial class PackingListDS : BusinessBindingSource
   
{
       
public PackingListDS()
        {
            InitializeComponent();
           
this.BusinessObject = new PackingListBO();
        }
       
public PackingListDS(IContainer container)
        {
            container.Add(
this);
            InitializeComponent();
        }
    }
}

I did nothing to the designer.cs file.  Is this correct?  How do I get the component added to the toolbox?

Thanks,
Bill

Post #16114
Posted 05/03/2008 3:02:00 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:00:39 PM
Posts: 244, Visits: 816
The catch...close the solution.  Then, reopen it and add the item manually to the appropriate tab in the toolbox.

So far, so good...now, on to the report.

Post #16115
Posted 05/05/2008 10:12:24 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 3:24:00 PM
Posts: 3,733, Visits: 3,926
Yup...you got it figured out.  Looks good
Post #16140
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 3:39am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.