Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Separating Biz tier and UI
Message
 
 
To
04/05/2009 17:12:26
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01397788
Message ID:
01397860
Views:
49
>>John, Is it possible that different Code Camps have different projects or all of them have this Bird Watcher project?
>
>
>They are all the same. The article was based on that code solution.

Are you sure? May be I downloaded the wrong project? This one has nothing to do with the Orders system you were building in the article. It has 6 different projects in it, that's why it's too advanced for me.

For my current project I progressed a bit to the point that
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SDC.Business
{
    public class OrderBiz()
    {
    }
 /// <summary>
        /// Has Changes
        ///     are there any changes to the data?
        /// </summary>
        /// <returns>True/False</returns>
        public bool HasChanges(OrderDataSet.OrderDataTable dt)
        {
            bool retVal = false;

            DataTable dtChanged = dt.GetChanges();
            if (dtChanged != null && dtChanged.Rows.Count > 0)
            {
                retVal = true;
            }

            return retVal;

        }
------------------------------------------------------------------------------------
Where the OrdersTableAdapter ta should come from? My DS are in the Buziness Project now and I removed again the Data project.
/// <summary>
        /// Find
        ///     returns all orders matching the search criteria.
        /// </summary>
        /// <param name="customerName">Customer name</param>
        /// <param name="startDate">Order start date</param>
        /// <param name="endDate">Order end date</param>
        /// <returns>Order Table</returns>
        public OrderDataSet.OrderDataTable Find(Int32 orderNo, 
                                           DateTime startDate, 
                                           DateTime endDate)
        {
            OrderDataSet.OrdersDataTable dt = new 
            OrderDataSet.OrdersDataTable();

            OrdersTableAdapter ta = new OrdersTableAdapter(); //This line shows in red in intellisense


            if (customerName.Equals("ANY"))
            {
                customerName = string.Empty;
            }

            ta.FillBy(dt, startDate, endDate, 
            "%"+customerName+"%");

            return dt;
        }
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform