Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Doubt Regarding DataAccessLayer
posted

Hi..

I m doing one project in wpf and using infragistics grid.,.here i m proceeding in a 3 tier architecture.

i m displaying data in a listbox.this works fine.now i want to delete selected record in the listbox when the user clicks delete button.can u suggest some answer for this.i m little bit confusing when we use dataaccess layer.

can u suggest me any links which will give information about wpf projects developed using 3 tier architecture.

Here my method in the class for DeleteCustomer is shown below.

 

 

 

 

public

void DeleteCustomer(CustomerDataObject customer)

{

 

 

NorthwindDataSet.TblCustomerRow custRow = NorthwindDataProvider.NorthWindDataSet.TblCustomer.FindByCustomerId(customer.CustID);

 

 

custRow.Delete();

adapter.Update(

NorthwindDataProvider.NorthwindDataSet.TblCustomer);

 

 

// throw new NotImplementedException();

}

 

Here CustomerDataObject is one class having CustomerId,CustomerName as properties.

Now i want to call this method in window.xaml.cs file when the user selects in the listbox selected

item and clicks deletebutton then that row should be deleted and updated in the database also.

How to call this deleteCustomer Method here.

Please give reply for this.

and suggest some links which can explain 3 tier architecture  wpf applications developing..

 

Thanks in advance..

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    You can call the delete method in the click event of the button and delete the object from the DataSet(Northwind).

    I really do not see any Infragistics controls related question in this post.

    Please give us more information on what the issue is.

    Regards,

    Alex.

Children
No Data