Beispiel #1
0
    Int32 DisplayOrder(string ItemTypeFilter)
    {
        Int32              OrderID;  //var to store the primary key
        string             ItemName; //var to store the item name
        string             ItemType; // var to store the ItemType
        clsOrderCollection MyOrderCollection = new clsOrderCollection();

        //create an instance of the Order collection class
        MyOrderCollection.ReportByItemType(ItemTypeFilter);
        //create an instance of the Order collection class
        Int32 RecordCount;                                          //var to store the count of records
        Int32 Index = 0;                                            //var to store the index for the loop

        RecordCount = MyOrderCollection.Count;                      //get the count of records
        lstOrder.Items.Clear();                                     //clear the list box
        while (Index < RecordCount)                                 //while there are records to process
        {
            OrderID  = MyOrderCollection.OrderList[Index].OrderID;  //get the primary key
            ItemName = MyOrderCollection.OrderList[Index].ItemName; // get the ItemName
            ItemType = MyOrderCollection.OrderList[Index].ItemType; //get the ItemType
            //create a new entry for the list box
            ListItem NewEntry = new ListItem(ItemName + "  ,   " + ItemType, OrderID.ToString());
            lstOrder.Items.Add(NewEntry); //add the Order to the list
            Index++;                      //move the index to the next record
        }
        return(RecordCount);              // return the count of records found
    }
Beispiel #2
0
 public override string ToString()
 {
     return("订单ID:" + OrderID.ToString()
            + "\t" + cusName
            + "\t" + "商品数目:" + num
            + "\t" + "总价:" + moneySum);
 }
Beispiel #3
0
        public void addProduct(Product p)   //向订单中添加产品详情
        {
            ProductDetail detail_current = new ProductDetail(p.Price, p.Description);

            detail_list.Add(detail_current);

            TotalAmount += float.Parse(p.Price);
            OrderID.Append(p.PID).Append(DateTime.Now.Hour).Append(DateTime.Now.Minute).Append(DateTime.Now.Second); //生成订单id
            orderID = OrderID.ToString();
            total   = TotalAmount;
        }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Added By Evgeni
        lblOrderConfirmation.Text = lblOrderConfirmation.Text.Replace("№", "№ " + OrderID.ToString());

        if (IsPostBack)
        {
            return;
        }
        BindData();
    }
Beispiel #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         valOrderID.Text  = OrderID.ToString();
         valCustName.Text = CustName;
         valBrand.Text    = Brand;
         valModel.Text    = Model;
         valYear.Text     = Year;
         valColour.Text   = Colour;
         valPrice.Text    = "$" + Price.ToString("0,000.00");
     }
 }
Beispiel #6
0
        public Dictionary <string, object> ToDictionary()
        {
            Dictionary <string, object> orderDictionary = new Dictionary <string, object>();

            string[] printOperatorID = GetIdFromNameIfPresent(PrintOperator, _NameLookup)?.ToArray();
            string[] shipperID       = GetIdFromNameIfPresent(Shipper, _NameLookup)?.ToArray();
            string[] channelID       = GetIdFromNameIfPresent(Channel, _ChannelLookup)?.ToArray();


            orderDictionary.AddIfNotNull(OrderIDKey, OrderID.ToString());
            orderDictionary.AddIfNotNull(DescriptionKey, Description);
            orderDictionary.AddIfNotNull(NotesKey, Notes);
            orderDictionary.AddIfNotNull(OrderNoteKey, OrderNote);
            orderDictionary.AddIfNotNull(CustomerKey, CustomerEmail);
            orderDictionary.AddIfNotNull(TotalPaymentKey, TotalPrice);
            orderDictionary.AddIfNotNull(ActualShippingKey, ShippingCost);
            orderDictionary.AddIfNotNull(SalesTaxKey, SalesTax);
            orderDictionary.AddIfNotNull(ShippingChargeKey, ShippingCharge);
            orderDictionary.AddIfNotNull(MaterialCostKey, MaterialCost);
            if (DueDate.Year > 2010)
            {
                orderDictionary.AddIfNotNull(DueDateKey, DueDate.ToString("d"));
            }
            if (ShipDate.Year > 2010)
            {
                orderDictionary.AddIfNotNull(ShippedDateKey, ShipDate.ToString("d"));
            }
            orderDictionary.AddIfNotNull(RushKey, Rush);
            orderDictionary.AddIfNotNull(PrintOperatorKey, printOperatorID);
            orderDictionary.AddIfNotNull(ShipperKey, shipperID);
            orderDictionary.AddIfNotNull(ShipperPayKey, ShipperPay);
            orderDictionary.AddIfNotNull(ChannelKey, channelID);
            orderDictionary.AddIfNotNull(AsanaTaskIDKey, AsanaTaskID);
            orderDictionary.AddIfNotNull(OptinSentTypeKey, OptinSentType);
            orderDictionary.AddIfNotNull(ValueOfInventoryKey, ValueOfInventory);
            orderDictionary.AddIfNotNull(AmountRefundedKey, AmountRefunded);

            return(orderDictionary);
        }
        void btnPIL_Click(object sender, EventArgs e)
        {
            NameValueCollection reportParams = new NameValueCollection();
            DataSet             dsPIL        = null;

            Orchestrator.Facade.ICollectDropLoadOrder facLoadOrder = new Orchestrator.Facade.CollectDrop();

            if (OrderID > 0)
            {
                #region Pop-up Report
                eReportType reportType = eReportType.PIL;
                dsPIL = facLoadOrder.GetPILData(OrderID.ToString());
                DataView dvPIL;

                if ((bool)dsPIL.Tables[0].Rows[0]["IsPalletNetwork"])
                {
                    reportType = Globals.Configuration.PalletNetworkLabelID;;

                    //Need to duplicate the rows for the Pallteforce labels
                    dsPIL.Tables[0].Merge(dsPIL.Tables[0].Copy(), true);
                    dvPIL = new DataView(dsPIL.Tables[0], string.Empty, "OrderId, PalletCount", DataViewRowState.CurrentRows);
                }
                else
                {
                    dvPIL = new DataView(dsPIL.Tables[0]);
                }
                Session[Orchestrator.Globals.Constants.ReportTypeSessionVariable] = reportType;

                Session[Orchestrator.Globals.Constants.ReportParamsSessionVariable]     = reportParams;
                Session[Orchestrator.Globals.Constants.ReportDataSessionTableVariable]  = dvPIL;
                Session[Orchestrator.Globals.Constants.ReportDataSessionSortVariable]   = String.Empty;
                Session[Orchestrator.Globals.Constants.ReportDataMemberSessionVariable] = "Table";

                // Show the user control
                Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", "<script language=\"javascript\">window.open('" + Page.ResolveClientUrl("../reports/reportviewer.aspx?wiz=true") + "');</script>");
                #endregion
            }
        }
        void btnCreateDeliveryNote_Click(object sender, EventArgs e)
        {
            NameValueCollection reportParams = new NameValueCollection();
            DataSet             dsDelivery   = null;

            Orchestrator.Facade.IOrder facOrder = new Orchestrator.Facade.Order();

            if (OrderID > 0)
            {
                dsDelivery = facOrder.GetDeliveryNoteDataForOrderIDs(OrderID.ToString());

                //-------------------------------------------------------------------------------------
                //									Load Report Section
                //-------------------------------------------------------------------------------------
                Session[Orchestrator.Globals.Constants.ReportTypeSessionVariable]       = eReportType.DeliveryNote;
                Session[Orchestrator.Globals.Constants.ReportParamsSessionVariable]     = reportParams;
                Session[Orchestrator.Globals.Constants.ReportDataSessionTableVariable]  = dsDelivery;
                Session[Orchestrator.Globals.Constants.ReportDataSessionSortVariable]   = String.Empty;
                Session[Orchestrator.Globals.Constants.ReportDataMemberSessionVariable] = "Table";

                // Show the user control
                Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", "<script language=\"javascript\">window.open('" + Page.ResolveClientUrl("../reports/reportviewer.aspx?wiz=true") + "');</script>");
            }
        }
Beispiel #9
0
    private void ConstructMail()
    {
        //invoice and delivery address of the mail
        string imagePath  = System.Configuration.ConfigurationManager.AppSettings["web-graphics"].ToString();
        string headerPath = imagePath + "mail_header.gif";
        string footerPath = imagePath + "mail_footer.gif";
        string addHeader  = @"
<style type='text/css'>
<!--
body {
	background-color: #e2e2e2;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #000000;
}
-->
</style></head>

<body leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0'>
<center>
  <br />
  <br />
  <table width='680' border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td><img src='" + headerPath + @"' width='680' height='83' /></td>
  </tr>
  <tr>
    <td bgcolor='#FFFFFF'><table width='680' border='0' cellspacing='0' cellpadding='8'>
      <tr>
        <td align='left' valign='top'>";
        string addFooter  = @"</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><img src='" + footerPath + @"' width='680' height='29' /></td>
  </tr>
</table></center>
</body>";

        string productTypeImage = "";
        string productDescMail  = "";
        string productPriceMail = "";
        string productDisMail   = "";
        string productVatMail   = "";
        string productQtyMail   = "";
        string productTotalMail = "";

        string[] colorArray  = { "white", "#EFEFEF" };
        string   mailAddress = "<table width=100% align = \"center\" border=\"0\">" +
                               "<tr>" +
                               "<td width=200px align=\"left\" style=\"align: left;\"><b>" + "Invoice Address" +
                               "</b></td>" +
                               "<td width=90px align=\"left\">" +
                               "</td>" +
                               "<td width=200px align=\"left\" style=\"align: left;\"><b>" + "Delivery Address" +
                               "</b></td>" +
                               "</tr>" +
                               "<tr>" +
                               "<td align=\"left\" style=\"align: left;\">" + invoiceAddress +
                               "</td>" +
                               "<td align=\"left\">&nbsp;&nbsp;&nbsp;" +
                               "</td>" +
                               "<td align=\"left\" style=\"align: left;\">" + deliveryAddress +
                               "</td>" +
                               "</tr></table>";

        //create the body of the mail
        string product = "<table cellpadding=3 cellspacing=0 width=650px align=\"center\" border=\"0\">" +
                         "<tr><td colspan=7 align=left style='font-size:15px;'><font color=red><b>Order No#" + OrderID.ToString() + "</b></font> </td><tr>" +
                         "<tr><td colspan=7 width=650>" +
                         mailAddress +
                         "</td></tr>" +
                         "<tr><td colspan=5>&nbsp;</td></tr>" +
                         "<tr style='background-color:#DEDEDE;'>" +
                         "<td  width=100px align=\"left\"><b>" + "Product Type" +
                         "</b></td>" +
                         "<td  width=200px align=\"left\"><b>" + "Product Description" +
                         "</b></td>" +
                         "<td  width=125px align=\"right\"><b>" + "Price (excl.VAT)" +
                         "</b></td>" +
                         "<td  width=100px align=\"right\"><b>" + "Discount (%)" +
                         "</b></center></td>" +
                         "<td  width=100px align=\"right\"><b>" + "Quantity" +
                         "</b></center></td>" +
                         "<td  width=125px align=\"right\"><b>" + "Net Price" +
                         "</b></center></td>" +
                         "<td  width=100px align=\"right\" style=\"align: right;\"><b>" + "VAT (%)" +
                         "</b></td>" +
                         "</tr>" +
                         "<tr>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "<td align=\"center\">" +
                         "</td>" +
                         "</tr>";
        int colorIndex = 0;

        foreach (Order order in cartTable)
        {
            //string path = Request.Url.ToString();
            //string articleTypePath = path.Substring(0, path.LastIndexOf('/') + 1) + "graphics/";
            productTypeImage = Functions.GetArticleTypeImage(order.productType);

            //productDescMail = dr["ProductDescription"].ToString();
            productDescMail = @"<table>
                                    <tr>
                                        <td>                                                                    
                                            <b>" + order.productdescription + @"</b>                                                                    
                                        </td>
                                    </tr>
                                        <td>
                                            " + order.subtitle + @"
                                        </td>
                                    <tr>
                                        <td>
                                            <i>" + order.publisherName + @"</i>
                                        </td>
                                    </tr> 
                                </table>";



            productPriceMail = order.price.ToString();
            productDisMail   = order.discountpc.ToString();
            productQtyMail   = order.quantity.ToString();
            productTotalMail = order.productdescription.ToString();
            productVatMail   = order.vatpc.ToString();

            product += "<td width=100px style='background-color:" + colorArray[colorIndex] + "' align=\"left\" style=\"align: left;\">" + productTypeImage +
                       "</center></td>" +
                       "<td width=200px  style='background-color:" + colorArray[colorIndex] + "' align=\"left\" style=\"align: left;\">" + productDescMail +
                       "</center></td>" +
                       "<td  width=125px style='background-color:" + colorArray[colorIndex] + "' align=\"right\" style=\"align: right;\">" + productPriceMail +
                       "</center></td>" +
                       "<td  width=100px style='background-color:" + colorArray[colorIndex] + "' align=\"right\" style=\"align: right;\">" + productDisMail +
                       "</center></td>" +
                       "<td width=100px style='background-color:" + colorArray[colorIndex] + "' align=\"right\" style=\"align: right;\">" + productQtyMail +
                       "</center></td>" +
                       "<td width=125px style='background-color:" + colorArray[colorIndex] + "' align=\"right\" style=\"align: right;\">" + productTotalMail +
                       "</center></td>" +
                       "<td width=100px style='background-color:" + colorArray[colorIndex] + "' align=\"right\" style=\"align: right;\">" + productVatMail +
                       "</center></td>" +
                       "</tr>";
            if (colorIndex == 0)
            {
                colorIndex = 1;
            }
            else
            {
                colorIndex = 0;
            }
        }
        //grandTotoal = Convert.ToDouble(Session["gtotal"].ToString().Replace(',','.'));
        //total = Convert.ToDouble(Session["total"].ToString().Replace(',', '.'));
        //vat = Convert.ToDouble(Session["vat"].ToString().Replace(',', '.'));
        string grandTotalStr = ViewState["GrandTotalPrice"].ToString();

        string totalStr = ViewState["TotalNetPrice"].ToString();
        string vatStr   = ViewState["TotalVat"].ToString();

        string totalShippingCost = ViewState["TotalShippingCosts"].ToString();

        product += "<tr style='width:650px;background-color:#DEDEDE;'><td colspan=\"6\" align=\"right\">Total (excl.VAT) :" +
                   "</td>" +
                   "<td colspan=\"1\" align=\"right\">" + euroUnicode + " " + string.Format("{0:F2}", totalStr) +
                   "</td>" +
                   "</tr>" +
                   "<tr style='background-color:#DEDEDE;'><td colspan=\"6\" align=\"right\">VAT :" +
                   "</td>" +
                   "<td colspan=\"1\" align=\"right\">" + euroUnicode + " " + string.Format("{0:F2}", vatStr) +
                   "</td>" +
                   "</tr>" +
                   "<tr style='background-color:#DEDEDE;'><td colspan=\"6\" align=\"right\">Total Shippingcost : " +
                   "</td>" +
                   "<td colspan=\"1\" align=\"right\"><b>" + euroUnicode + " " + string.Format("{0:F2}", totalShippingCost) +
                   "</b></td>" +
                   "</tr>" +
                   "<tr style='background-color:#DEDEDE;'><td colspan=\"6\" align=\"right\"><b>Total Price</b> <b>:</b>" +
                   "</td>" +
                   "<td colspan=\"1\" align=\"right\"><b>" + euroUnicode + " " + string.Format("{0:F2}", grandTotalStr) +
                   "</b></td>" +
                   "</tr>" +
                   "</table>";
        // create a table and insert all the tables into it
        string maintainEmail = "<table  align = \"center\" border=\"0\">" +

                               "<tr><td align=\"center\">" + product + "</td><tr>" +
                               "<tr><td align=\"left\">" + disclaimer + "</td><tr>" +
                               "</table>";

        addHeader += maintainEmail + addFooter;
        //Response.Write(addHeader);
        senMail(addHeader);//send the mail
    }
Beispiel #10
0
 public override string ToString()
 {
     return(OrderID.ToString(CultureInfo.InvariantCulture));
 }
        private void button1_Click(object sender, EventArgs e)
        {
            String ProductID, OrderID, ID, CustomerNumber, Amount, Price, ProductName;

            ProductID      = textBox1.Text;
            OrderID        = textBox2.Text;
            ID             = textBox3.Text;
            CustomerNumber = textBox4.Text;
            Amount         = textBox5.Text;
            Price          = textBox6.Text;
            ProductName    = textBox7.Text;
            if (ProductID.Length == 0 || ProductID.Length > 30)
            {
                errorProvider1.SetError(textBox1, " Please Enter Valid ProductID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (OrderID.Length == 0 || OrderID.Length > 30)
            {
                errorProvider1.SetError(textBox2, " Please Enter Valid OrderID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (ID.Length == 0 || ID.Length > 30)
            {
                errorProvider1.SetError(textBox3, " Please Enter Valid ID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (CustomerNumber.Length == 0)
            {
                errorProvider1.SetError(textBox4, " Please Enter Valid CustomerID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (Amount.Length == 0)
            {
                errorProvider1.SetError(textBox5, " Please Enter Valid Amount ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (Price.Length == 0)
            {
                errorProvider1.SetError(textBox6, " Please Enter Valid Price ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (ProductName.Length == 0 || ProductName.Length > 30)
            {
                errorProvider1.SetError(textBox7, " Please Enter Valid ProductName ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else
            {
                con.Open();
                errorProvider1.Clear();
                cmd.Connection = con;
                SqlCommand myCommand = new SqlCommand("insert into Orders values ('" +
                                                      ProductID.ToString() + "','" + OrderID.ToString() + "','" + ID.ToString() + "','" + Int32.Parse(CustomerNumber.ToString())
                                                      + "','" + Int32.Parse(Amount.ToString()) + "','" + float.Parse(Price.ToString()) + "','" + ProductName.ToString() + "')", con);
                int success = myCommand.ExecuteNonQuery();
                if (success == 1)
                {
                    MessageBox.Show(success + " row has been inserted ");
                }
                con.Close();
            }
        }
Beispiel #12
0
 public override string ToString()
 {
     return(OrderID.ToString() + "\t" + OrderDateTime);
 }
Beispiel #13
0
 //method GetOrderID()
 public string GetOrderID()
 {
     OrderID = Guid.NewGuid().ToString();
     return
         (OrderID.ToString());
 }
Beispiel #14
0
 public override string ToString() => OrderID.ToString();
        public virtual string AsString()
        {
            StringBuilder builder = new StringBuilder(string.Format("Order number {0} contains:\n", OrderID.ToString()));

            builder.Append(string.Join("\n\t", OrderedProducts.Select(p => p.Quantity + " times " + p.Product.Description)));
            builder.Append(string.Format("\nFor a total value of {0}", OrderedProducts.Sum(p => p.Product.UnitPrice * p.Quantity).ToString()));
            builder.Append(string.Format("\nOrder finalised at {0}", OrderDate.ToString()));

            return(builder.ToString());
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack || OrderID == 0 || (Order = OrderService.GetOrder(OrderID)) == null)
            {
                return;
            }

            var sb = StaticBlockService.GetPagePartByKeyWithCache("OrderSuccessTop");

            if (sb == null || (!CustomerContext.CurrentCustomer.IsAdmin && !sb.Enabled))
            {
                SbOrderSuccessTopText = string.Empty;
            }
            else
            {
                SbOrderSuccessTopId   = sb.StaticBlockId;
                SbOrderSuccessTopText = sb.Content ?? string.Empty;

                SbOrderSuccessTopText = SbOrderSuccessTopText.Replace("#ORDER_ID#", OrderID.ToString());
            }

            if (SettingsOrderConfirmation.SuccessOrderScript.IsNotEmpty())
            {
                string orderScript = SettingsOrderConfirmation.SuccessOrderScript
                                     .Replace("#ORDER_ID#", Order.OrderID.ToString())
                                     .Replace("#ORDER_SUM#", Order.Sum.ToString("#.##"))
                                     .Replace("#CUSTOMER_EMAIL#", HttpUtility.HtmlEncode(Order.OrderCustomer.Email))
                                     .Replace("#CUSTOMER_FIRSTNAME#", HttpUtility.HtmlEncode(Order.OrderCustomer.FirstName))
                                     .Replace("#CUSTOMER_LASTNAME#", HttpUtility.HtmlEncode(Order.OrderCustomer.LastName))
                                     .Replace("#CUSTOMER_PHONE#", HttpUtility.HtmlEncode(Order.OrderCustomer.MobilePhone))
                                     .Replace("#CUSTOMER_ID#", Order.OrderCustomer.CustomerID.ToString());

                var regex    = new Regex("<<(.*)>>");
                var match    = regex.Match(orderScript);
                var products = new StringBuilder();

                if (match.Groups.Count > 0 && match.Groups[1].Value.IsNotEmpty())
                {
                    var productLine = match.Groups[1].Value;
                    foreach (var item in Order.OrderItems)
                    {
                        products.Append(
                            productLine.Replace("#PRODUCT_ARTNO#", HttpUtility.HtmlEncode(item.ArtNo))
                            .Replace("#PRODUCT_NAME#", HttpUtility.HtmlEncode(item.Name))
                            .Replace("#PRODUCT_PRICE#", item.Price.ToString("#.##"))
                            .Replace("#PRODUCT_AMOUNT#", item.Amount.ToString("#.##")));
                    }

                    orderScript = orderScript.Replace("<<" + productLine + ">>", products.ToString());
                }

                lSuccessScript.Text = orderScript;
            }

            LoadGoogleAnalytics(Order);

            if (GoogleTagManager.Enabled)
            {
                TagManager.PageType   = GoogleTagManager.ePageType.purchase;
                TagManager.TotalValue = Order.OrderItems.Sum(item => item.Price * item.Amount);

                TagManager.Transaction = new Transaction()
                {
                    TransactionAffiliation = SettingsMain.ShopName,
                    TransactionId          = Order.OrderID,
                    TransactionTotal       = Order.Sum - Order.ShippingCost,
                    TransactionShipping    = Order.ShippingCost,
                    TransactionProducts    =
                        new List <TransactionProduct>(
                            Order.OrderItems.Select(
                                item =>
                                new TransactionProduct()
                    {
                        Name     = item.Name,
                        Price    = item.Price,
                        Quantity = item.Amount,
                        SKU      = item.ArtNo,
                        Category =
                            CategoryService.GetCategory(
                                ProductService.GetFirstCategoryIdByProductId((int)item.ProductID)).Name
                    }))
                };
            }
            TrialService.TrackEvent(TrialEvents.CheckoutOrder, OrderID.ToString());
        }
Beispiel #17
0
        /// <summary>
        ///  Initializes a new instance of the Order class to the value indicated
        ///  by the given parameters.
        /// </summary>
        //public Order(int orderID, int branchID, KOSHER kosher, CreditCard creditCard, int clientID, PAYMENT paymentType, bool delivery)
        //{
        //    OrderID = orderID;
        //    Time = DateTime.Now;
        //    BranchID = branchID;
        //    Kosher = kosher;
        //    CreditCard = creditCard;
        //    ClientID = clientID;
        //    PaymentType = paymentType;
        //    Delivery = delivery;
        //}

        /// <summary>
        ///     Converts the value of this instance to its equivalent string representation.
        /// </summary>
        ///
        /// <returns>
        ///     The string representation of the order's properties.
        /// </returns>
        public override string ToString()
        {
            return(OrderID.ToString());
        }
Beispiel #18
0
 /// <
 /// mary>
 ///     Initializes a new instance of the Branch class to the value indicated
 ///     by the given parameters.
 /// </summary>
 ///
 /// <param name="orderID">The OrderID of the ordered order.</param>
 /// <param name="dishID"> The DishID of the ordered dish.</param>
 /// <param name="amount"> Amount of dishes orderd.</param>
 ///public Ordered_Dish(int orderID=0, int dishID=0, int amount=0)
 //{
 //    ItemID = 0;
 //    OrderID = orderID;
 //    DishID = dishID;
 //    Amount = amount;
 //}
 /// <summary>
 ///     Converts the value of this instance to its equivalent string representation.
 /// </summary>
 ///
 /// <returns>
 ///     The string representation of the ordered-dish's properties.
 /// </returns>
 public override string ToString()
 {
     return(ItemID.ToString() + " " + OrderID.ToString() + " " + DishID.ToString() + " " + Amount.ToString());
 }
Beispiel #19
0
 public override string ToString()
 {
     return(OrderID.ToString() + " " + ShipCity);
 }
Beispiel #20
0
 public override string ToString()
 {
     return("ID: " + OrderID.ToString() + " Total: " + TotalAmount);
 }
Beispiel #21
0
 public override string ToString()
 {
     return(OrderID.ToString() + " " + ProductID.ToString());
 }
Beispiel #22
0
 public void Dispose()
 {
     _AllList.Remove(this);
     _AllByPrimaryKey.Remove(OrderID.ToString() + "_" + ProductID.ToString());
 }
Beispiel #23
0
        /// <summary>
        /// Load lại danh sách bàn theo Khu vực
        /// </summary>
        private void LoadTableMapping()
        {
            if (cboArea.Value == null)
            {
                return;
            }
            Guid areaID;

            if (!Guid.TryParse(cboArea.Value.ToString(), out areaID))
            {
                return;
            }
            var tableMapping = new BLArea().GetTableMappingByAreaID(areaID, dteOrderDate.DateTime);

            if (tableMapping == null || tableMapping.Rows.Count == 0)
            {
                MessageBoxCommon.ShowExclamation("Khu vực <" + ((Desktop.Entity.DictionaryDataSet.AreaRow)((System.Data.DataRowView)bsArea.Current).Row).AreaName + "> ngày <" + dteOrderDate.DateTime.ToString("dd-MM-yyyy") + "> không có bàn trống nên không thể thay đổi khu vực");
                return;
            }
            else
            {
                dsBusiness.AreaTableMapping.Clear();
                dsBusiness.AreaTableMapping.Merge(tableMapping);
                bsTableMapping.DataSource = dsBusiness;
                if (FormActionMode == ActionMode.AddNew && BookingID != Guid.Empty)
                {
                    bsTableMapping.Filter = "TableStatus = 0 OR TableID = " + "'" + TableID.ToString() + "'";
                }
                else
                {
                    bsTableMapping.Filter = "TableStatus = 0 OR (TableStatus = 1 AND TableID = " + "'" + TableID.ToString() + "' AND OrderID = '" + OrderID.ToString() + "')";
                }
                if (bsTableMapping.Find(ColumnName.TableID, TableID) == -1)
                {
                    cboTableMapping.Value = ((Desktop.Entity.BusinessDataSet.AreaTableMappingRow)dsBusiness.AreaTableMapping.Rows[0]).TableID;
                }
                else
                {
                    cboTableMapping.Value = TableID;
                }
            }
        }