Beispiel #1
0
        private String GetCustomerString()
        {        
            CurrentDayPickup r = CurrentPickup;
            IQuerySurface  db = new DispatchAR.DispatchDB();
       
        //var qry  = from  cust in db.CUSTOMERS 
        //           where cust.CustomerID=r.CDPCustomerID
        //              select cust;

        /**************** 
            String CustomerString = "";

            qry.WHERE("CustomerID", r.CDPCustomerID);
            CollectionOfOneCustomer = controller.FetchByQuery(qry);


            //error checking
            if (CollectionOfOneCustomer.Count != 1)
            {
                string htmlobj;
                htmlobj = qry.Inspect();
                StringBuilder ss = new StringBuilder();
                ss.AppendLine("Cannot See Details");
                ss.AppendLine(CurrentPickup.CurrentDayPickupID.ToString());
                ss.Append(htmlobj);
                CustomerString = ss.ToString();
            }
         * ***********************/

            String CustomerString = "";
            //foreach (var cust in qry)  // there is only one
            //{
            //    StringBuilder CustStringBuilder = new StringBuilder();
            //    CustStringBuilder.AppendLine(cust.CustomerName + " (" + cust.CustomerID + ")");
            //    CustStringBuilder.AppendLine(cust.Address1);
            //    //s.AppendLine(.Address2)
            //    CustStringBuilder.AppendLine(cust.City + ", " + cust.State);
            //    CustStringBuilder.AppendLine("");
            //    CustStringBuilder.Append("Contact: ");
            //    CustStringBuilder.AppendLine(cust.Contact);
            //    CustStringBuilder.Append("Closing Time: ");
            //    CustStringBuilder.AppendLine(cust.ClosingTime);
            //    CustStringBuilder.Append("Phone: ");
            //    CustStringBuilder.AppendLine(cust.Phone);
            //    CustomerString = CustStringBuilder.ToString();
            //  }
            return CustomerString;
        }
Beispiel #2
0
        private void GetPickupsForThisInstance()
        {
            var db = new DispatchDB();
            var AllPickupsToday = from cdp in db.CurrentDayPickups
                                  select cdp;
            DailyCount = AllPickupsToday.Count();

            var qry = from cdp in db.CurrentDayPickups
                      where cdp.CDPDefaultRouteID == this.Tag
                      select cdp;

            PickupsThisRoute = qry.ToList<CurrentDayPickup>();
        }
Beispiel #3
0
 public frmDeleteDrivers()
 {
     InitializeComponent();
     driver = (DriverBLL)WinClient.ApplicationContext["DriverBLL"];
     db = new DispatchDB();
 }