//Returns a string that displays a customer's properties public override string ToString() { string strOutput = ""; strOutput += "RESERVATION DETAILS" + Environment.NewLine + "Check in date: " + CheckInDate.ToLongDateString() + Environment.NewLine + "Number of nights: " + NumberOfNights.ToString() + Environment.NewLine + "Room type: " + RoomType + Environment.NewLine + "Number of rooms: " + NumberOfRooms.ToString() + Environment.NewLine + "Room price: " + RoomPrice.ToString("C2") + Environment.NewLine + "Subtotal: " + SubTotal.ToString("C2") + Environment.NewLine + "Tax (7%): " + Tax.ToString("C2") + Environment.NewLine + "Convenience Fee: " + ConvenienceFee.ToString("C2") + Environment.NewLine + "Total: " + Total.ToString("C2") + Environment.NewLine + Environment.NewLine + "CUSTOMER DETAILS" + Environment.NewLine + "First Name: " + FirstName + Environment.NewLine + "Last Name: " + LastName + Environment.NewLine + "Credit Card Number: " + CreditCardNumber + Environment.NewLine + "Credit Card Type: " + CreditCardType + Environment.NewLine + "Phone: " + Phone + Environment.NewLine + "Email: " + Email + Environment.NewLine; return(strOutput); }
private void btnRemoveItem_Click(object sender, EventArgs e) { if (lstOrder.Items.Count != 0) { foreach (ListViewItem lvItem in lstOrder.SelectedItems) { double SubTotal; double Total; String Price = lvItem.SubItems[1].Text; SubTotal = System.Convert.ToDouble(txtSubTotal.Text); Total = System.Convert.ToDouble(txtTotal.Text); SubTotal = SubTotal - Convert.ToDouble(Price); txtSubTotal.Text = SubTotal.ToString(); txtVATAdded.Text = ((SubTotal / 100) * 20).ToString(); double VATPrice = Convert.ToDouble(txtVATAdded.Text); Total = (SubTotal + VATPrice); txtTotal.Text = Total.ToString(); lstOrder.Items.Remove(lvItem); } } else { MessageBox.Show("No Items"); } }
public void DisplayTotal() { Console.WriteLine("Subtotal: " + SubTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("Tax: " + Tax.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("Grand Total: " + GrandTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("-".PadRight(100, '-')); }
//Devuelve una cadena que muestra las propiedades de un cliente public override string ToString() { string strOutput = ""; strOutput += "DETALLES DE RESERVA" + Environment.NewLine + "Fecha de entrada: " + CheckInDate.ToLongDateString() + Environment.NewLine + "Numero de noches: " + NumberOfNights.ToString() + Environment.NewLine + "Tipo de cuarto: " + RoomType + Environment.NewLine + "Numero de cuartos: " + NumberOfRooms.ToString() + Environment.NewLine + "Precio de cuarto: " + RoomPrice.ToString("C2") + Environment.NewLine + "Subtotal: " + SubTotal.ToString("C2") + Environment.NewLine + "Iva (19%): " + Tax.ToString("C2") + Environment.NewLine + "Gravamen de Hospedaje: " + ConvenienceFee.ToString("C2") + Environment.NewLine + "Total: " + Total.ToString("C2") + Environment.NewLine + Environment.NewLine + "DETALLES DE CLIENTE" + Environment.NewLine + "Nombres: " + FirstName + Environment.NewLine + "Apellidos: " + LastName + Environment.NewLine + "Numero de TDC: " + CreditCardNumber + Environment.NewLine + "Tipo de tarjeta: " + CreditCardType + Environment.NewLine + "Telefono: " + Phone + Environment.NewLine + "Email: " + Email + Environment.NewLine; return(strOutput); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (AccountNumber == null ? 0 : AccountNumber.GetHashCode()); hash = hash * 23 + (BillToAddressId == default(int) ? 0 : BillToAddressId.GetHashCode()); hash = hash * 23 + (Comment == null ? 0 : Comment.GetHashCode()); hash = hash * 23 + (CreditCardApprovalCode == null ? 0 : CreditCardApprovalCode.GetHashCode()); hash = hash * 23 + (CreditCardId == null ? 0 : CreditCardId.GetHashCode()); hash = hash * 23 + (CurrencyRateId == null ? 0 : CurrencyRateId.GetHashCode()); hash = hash * 23 + (CustomerId == default(int) ? 0 : CustomerId.GetHashCode()); hash = hash * 23 + (DueDate == default(DateTime) ? 0 : DueDate.GetHashCode()); hash = hash * 23 + (Freight == default(decimal) ? 0 : Freight.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (OnlineOrderFlag == default(bool) ? 0 : OnlineOrderFlag.GetHashCode()); hash = hash * 23 + (OrderDate == default(DateTime) ? 0 : OrderDate.GetHashCode()); hash = hash * 23 + (PurchaseOrderNumber == null ? 0 : PurchaseOrderNumber.GetHashCode()); hash = hash * 23 + (RevisionNumber == default(byte) ? 0 : RevisionNumber.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); hash = hash * 23 + (SalesOrderNumber == null ? 0 : SalesOrderNumber.GetHashCode()); hash = hash * 23 + (SalesPersonId == null ? 0 : SalesPersonId.GetHashCode()); hash = hash * 23 + (ShipDate == null ? 0 : ShipDate.GetHashCode()); hash = hash * 23 + (ShipMethodId == default(int) ? 0 : ShipMethodId.GetHashCode()); hash = hash * 23 + (ShipToAddressId == default(int) ? 0 : ShipToAddressId.GetHashCode()); hash = hash * 23 + (Status == default(byte) ? 0 : Status.GetHashCode()); hash = hash * 23 + (SubTotal == default(decimal) ? 0 : SubTotal.GetHashCode()); hash = hash * 23 + (TaxAmt == default(decimal) ? 0 : TaxAmt.GetHashCode()); hash = hash * 23 + (TerritoryId == null ? 0 : TerritoryId.GetHashCode()); hash = hash * 23 + (TotalDue == default(decimal) ? 0 : TotalDue.GetHashCode()); return(hash); } }
public override string ToString() {//Override the default tostring method for use in dispalying confirmation message and for the member information search page string strResults = "Type: " + Type + Environment.NewLine; strResults += "First Name: " + FirstName + Environment.NewLine; strResults += "Last Name: " + LastName + Environment.NewLine; strResults += "Start Date: " + StartDate + Environment.NewLine; strResults += "End Date: " + EndDate + Environment.NewLine; strResults += "Sub Total: " + SubTotal.ToString("C2") + Environment.NewLine; strResults += "Training: " + Additional_Features_Training + Environment.NewLine; strResults += "Locker Rental: " + Additional_Features_LockerRental + Environment.NewLine; strResults += "Total Cost: " + TotalCost.ToString("C2") + Environment.NewLine; strResults += "Phone Number: (" + PhoneNumber.Substring(0, 3) + ")" + "-" + PhoneNumber.Substring(3, 3) + "-" + PhoneNumber.Substring(6, 4) + Environment.NewLine; strResults += "Email: " + Email + Environment.NewLine; strResults += "Gender: " + Gender + Environment.NewLine; strResults += "Age: " + Age.ToString() + " Years old" + Environment.NewLine; strResults += "Weight: " + Weight.ToString() + "lbs" + Environment.NewLine; strResults += "Credit Card Type: " + Credit_Card_Type + Environment.NewLine; strResults += "Credit Card Number: " + Credit_Card_Number + Environment.NewLine; strResults += "Athletic Performance: " + PFG_AthleticPerformance + Environment.NewLine; strResults += "Overall Health: " + PFG_OverallHealth + Environment.NewLine; strResults += "Strength Training: " + PFG_StrengthTraining + Environment.NewLine; strResults += "Weight Loss: " + PFG_WeightManagment + Environment.NewLine; strResults += Environment.NewLine; return(strResults); }
public void PrintCheckReceipt(List <Product> orderItems, Check check) { foreach (var item in orderItems) { Console.WriteLine("{0,-30} {1,5}", item.Name, $"${item.Price}"); } Console.WriteLine("{0,-30} {1,5}", "Subtotal:", SubTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Sales Tax:", SalesTax.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Grand Total:", GrandTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Check Payment - Tender Amount:", GrandTotal.ToString("C", CultureInfo.CurrentCulture)); Console.Write("Account Number: "); var checkNum = check.CheckNumber.ToCharArray(); for (int i = 0; i < checkNum.Length; i++) { if (i < checkNum.Length - 4) { Console.Write("x"); } else { Console.Write(checkNum[i]); } } }
private void PolpulatePaymentInfo() { this.SubTotal = 0; foreach (DataGridViewRow item in dgvSalesInfo.Rows) { if (item.Cells[8].Value != null) { SubTotal += int.Parse(item.Cells[8].Value.ToString()); } } txtAmount.Text = SubTotal.ToString(); int taxAmt = this.clsPOS.SEL_Tax(); int scAmt = this.clsPOS.SEL_ServiceCharges(); ServiceCharnge = scAmt; long tax = (SubTotal / 100) * taxAmt; Tax = int.Parse(tax.ToString()); txtTax.Text = Tax.ToString(); txtServiceCharges.Text = scAmt.ToString(); GrandTotal = SubTotal + Tax + ServiceCharnge; txtTotal.Text = GrandTotal.ToString(); }
//Luowei public ActionResult PendingApprovalOrderDetails() { //EVERYPAGE if (Session["user"] == null) { return(RedirectToAction("Login")); } Employee e = (Employee)Session["user"]; if (e.RoleID < 3) { return(RedirectToAction("NotAuthorized")); } //EVERYPAGE ViewBag.user = e; ViewBag.slist = BusinessLogic.GetSuplierListInPO(); int intgetid = Convert.ToInt32(this.Request.QueryString["oid"]); if (this.Request.QueryString["oid"] != null) { ViewBag.slist = BusinessLogic.GetSuplierListInPOByID(intgetid); } ViewBag.po = BusinessLogic.getPurchaseOrderID(intgetid); ViewBag.odlist = BusinessLogic.listorderdetails(intgetid); List <SubTotal> sublist = new List <SubTotal>(); List <PurchaseOrderDetail> polist = BusinessLogic.listorderdetails(intgetid); SubTotal sub; List <Supplier> supplierlist = BusinessLogic.getSupplierlist(); foreach (var item in supplierlist) { sub = new SubTotal(item.SupplierID); sublist.Add(sub); } foreach (var item in polist) { foreach (var i in sublist) { if (item.Supplier == i.SupplierName) { i.Stotal = i.Stotal + Convert.ToDouble(item.Qty) * Convert.ToInt32(item.Catalogue.AveragePrice); } } } double gtotal = 0; foreach (var i in sublist) { gtotal = gtotal + i.Stotal; } ViewBag.gtotal = gtotal; ViewBag.subtotal = sublist; return(View()); }
private void ResetButton_Click(object sender, EventArgs e) { PaymentDue.Clear(); VATAmount.Clear(); SubTotal.Clear(); HoursText.ResetText(); DevelopmentOptions.SelectedIndex = -1; }
private void btnFilter_Click(object sender, EventArgs e) { if (uvValidar.Validate(true, false).IsValid) { var id2 = cbCustomerOrganization.SelectedValue.ToString().Split('|'); frmBuscarServicioPendiente frm = new frmBuscarServicioPendiente(id2[0], id2[1]); frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.Cancel) { return; } if (frm._ListaFacturacionList == null) { return; } _ListaFacturacionDetalle = frm._ListaFacturacionList; DateTime?FechaInicio = frm._FechaInicio; DateTime?FechaFin = frm._FechaFin; var Result = oFacturacionBL.LlenarGrillaSigesfot("", id2[0], id2[1], FechaInicio.Value.Date, FechaFin.Value.Date, -1); _EmpresaCliente = id2[0]; _EmpresaSede = id2[1]; _FechaInicio = FechaInicio.Value.Date; _FechaFin = FechaFin.Value.Date; double Total = double.Parse(Result.Sum(p => p.Total).ToString()); double Igv; double SubTotal; if (Total > 700) { txtDetraccion.Text = (Total * 0.1).ToString(); } else { txtDetraccion.Text = "0.00"; } Igv = (Total * 1.18) - Total; SubTotal = Total - Igv; txtTotalFacturar.Text = Total.ToString(); txtIgv.Text = Igv.ToString(); txtSubTotal.Text = SubTotal.ToString(); grdData.DataSource = _ListaFacturacionDetalle; } else { MessageBox.Show("Por favor corrija la información ingresada. Vea los indicadores de error.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void PrintOrderTotals(List <Product> orderList) { CalcualateSubtotal(orderList); CalculateGrandTotal(); CalculateSalesTax(); Console.WriteLine("\n\nTotal"); Console.WriteLine("{0,-30} {1,5}", "Subtotal:", SubTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Sales Tax:", SalesTax.ToString("C", CultureInfo.CurrentCulture));; Console.WriteLine("{0,-30} {1,5}", "Grand Total:", GrandTotal.ToString("C", CultureInfo.CurrentCulture)); }
public string GetReceipt() { string output = ToString(); output += "==================\n"; output += $"subtotal: {SubTotal.ToString("C")}\n"; output += $" 6% Tax: {Tax.ToString("C")}\n"; output += $" Total: {Total.ToString("C")}\n"; return(output); }
public void PrintCashReceipt(List <Product> orderItems, Cash cash) { foreach (var item in orderItems) { Console.WriteLine("{0,-30} {1,5}", item.Name, $"${item.Price}"); } Console.WriteLine("{0,-30} {1,5}", "Subtotal:", SubTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Sales Tax:", SalesTax.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Grand Total:", GrandTotal.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Amount Tendered:", cash.AmountGiven.ToString("C", CultureInfo.CurrentCulture)); Console.WriteLine("{0,-30} {1,5}", "Change:", cash.Change.ToString("C", CultureInfo.CurrentCulture)); }
protected SubTotal BuildSubTotal(string description, List <Quinlan.Data.Models.Collectible> query) { var subTotal = new SubTotal { Description = description, NumItems = query.Count(), TotalCost = query.Sum(x => x.Cost ?? 0), TotalValue = query.Sum(x => x.Value ?? 0) }; return(subTotal); }
private void Cancel_Click(object sender, RoutedEventArgs e) { CustName.Clear(); InvoiceNo.Clear(); OrderNo.Clear(); InvoiceDate.Clear(); DueDate.Clear(); SubTotal.Clear(); Adjustment.Clear(); Total.Clear(); CustNotes.Clear(); TermAndCondns.Clear(); }
private void Cancel_Click(object sender, RoutedEventArgs e) { CustName.Clear(); SalesOrderNo.Clear(); ReferenceNo.Clear(); SalesOrderDate.Clear(); ShipmentDate.Clear(); SubTotal.Clear(); Adjustment.Clear(); Total.Clear(); CustNotes.Clear(); TermAndCondns.Clear(); }
private void Cancel_Click(object sender, RoutedEventArgs e) { VendorName.Clear(); PurchaseOrderNo.Clear(); ReferenceNo.Clear(); Date.Clear(); DeliveryDate.Clear(); SubTotal.Clear(); Adjustment.Clear(); Total.Clear(); CustNotes.Clear(); TermAndCondns.Clear(); RadioOrg.IsChecked = true; }
private void PolpulatePaymentInfo() { this.SubTotal = 0; foreach (DataGridViewRow item in dgvProductInfo.Rows) { if (item.Cells[6].Value != null) { SubTotal += long.Parse(item.Cells[6].Value.ToString()); } } //SubTotal = SubTotal - subtotalfirst; txtTotal.Text = SubTotal.ToString(); }
/// <summary> /// Returns true if OrderSummary instances are equal /// </summary> /// <param name="other">Instance of OrderSummary to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrderSummary other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PartnerOrderNumber == other.PartnerOrderNumber || PartnerOrderNumber != null && PartnerOrderNumber.Equals(other.PartnerOrderNumber) ) && ( PlaceOrderTime == other.PlaceOrderTime || PlaceOrderTime != null && PlaceOrderTime.Equals(other.PlaceOrderTime) ) && ( Currency == other.Currency || Currency != null && Currency.Equals(other.Currency) ) && ( SubTotal == other.SubTotal || SubTotal != null && SubTotal.Equals(other.SubTotal) ) && ( TaxTotal == other.TaxTotal || TaxTotal != null && TaxTotal.Equals(other.TaxTotal) ) && ( ShippingTotal == other.ShippingTotal || ShippingTotal != null && ShippingTotal.Equals(other.ShippingTotal) ) && ( Channel == other.Channel || Channel != null && Channel.Equals(other.Channel) )); }
/// <summary> /// Format the result according to the spec /// </summary> /// <returns>The formatted result</returns> public override string ToString() { var sb = new StringBuilder(); sb.AppendLine($"Subtotal: {SubTotal.ToCustomFormatString()}"); foreach (var offer in Offers) { sb.AppendLine($"{offer.Description}: {offer.PriceDelta.ToCustomFormatString()}"); } if (!Offers.Any()) { sb.AppendLine("(No offers available)"); } sb.AppendLine($"Total: {Total.ToCustomFormatString()}"); return(sb.ToString()); }
/// <summary> /// Here is the *MAGIC TRICK* ! /// Rather than attempting align parameters via string formats - we use /// MAGIC STRINGS that no one in their right mind would ever use; defined /// from the ReceiptPieces class. /// /// The conundrum to this approach is ; Any data extracted for receipts /// must be 1) Labeled in ReceiptPieces and 2) Addressed to proper assignment /// here. /// </summary> /// <param name="input"></param> /// <param name="line"></param> /// <returns></returns> private string ProcessReceiptFormat(string input, Line line = null) { string output = input.Replace(ReceiptPieces.Company, Company); if (line != null) { output = output.Replace(ReceiptPieces.LinePrice, line.Bike.DiscountMarker.discount(line.Quantity).ToString("C")); output = output.Replace(ReceiptPieces.LineQuantity, line.Quantity.ToString()); output = output.Replace(ReceiptPieces.BikeBrand, line.Bike.Brand); output = output.Replace(ReceiptPieces.BikeModel, line.Bike.Model); } output = output.Replace(ReceiptPieces.Total, Total.ToString("C")); output = output.Replace(ReceiptPieces.SubTotal, SubTotal.ToString("C")); output = output.Replace(ReceiptPieces.Tax, Taxes.ToString("C")); return(output); }
private void ExecSubTotal() { // 그룹우선순위기준:A가 더큰 범위이다 // DB 정렬은 A,B ASC // InitGrid는 A,B 순서 // flex.Unbinding = dt; // ExecSubTotal 은 B(XXSUB2),A(XXSUB1) // 컬럼명[UserData] // 소계: XXSUB1 누계:XXACC1 총계 :XXGRA0 _flexM.Redraw = false; // 금액을 나타낼 컬럼지정 List <string> sumList = new List <string>(); sumList.Add("AM_1");// sumList.Add("AM_2"); SubTotals sts = new SubTotals(); sts.FirstRow = _flexM.Rows.Fixed + 2; //첫 행은 제외하기 위해 SubTotal st = null; //소계 st = sts.NewTotal(); st.Type = TotalEnum.SubTotal; st.GroupCol = _flexM.Cols["actyear"].Index; st.TotalColName = sumList.ToArray(); sts.Add(st); _flexM.DoSubTotal(sts); for (int i = _flexM.Rows.Fixed + 2; i < _flexM.Rows.Count; i++) { //그룹화된 행여부가져오기. true이면 그룹화된 행이다 if (_flexM.Rows[i].IsNode) { //UserData 컬럼에 해당 그룹행 명칭이 지정된다. switch (D.GetString(_flexM.Rows[i].UserData).Substring(0, 6)) { case "XXSUB1": _flexM[i, "actyear"] = "소계월"; break; } } } }
private void DgvListado_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { DgvMostrarDetalle.DataSource = NIngreso.ListarDetalle(Convert.ToInt32(DgvListado.CurrentRow.Cells["ID"].Value)); decimal Total, SubTotal; decimal Impuesto = Convert.ToDecimal(DgvListado.CurrentRow.Cells["Impuesto"].Value); Total = Convert.ToDecimal(DgvListado.CurrentRow.Cells["Total"].Value); SubTotal = Total / (1 + Impuesto); txtSubTotalD.Text = SubTotal.ToString("#0.00#"); txtTotalImpuestoD.Text = (Total - SubTotal).ToString("#0.00#"); txtTotalD.Text = Total.ToString("#0.00#"); PanelMostrar.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void clear_Click(object sender, EventArgs e) { Cust_search.Clear(); CustName.Clear(); PhoneNumber.Clear(); Cust_address.Clear(); custEmail.Clear(); Product_search.Clear(); Product_Name.Clear(); ProductID.Clear(); Total_Amt.Text = "0"; SubTotal.Clear(); Discount.Text = "0"; GST.Clear(); PaidAmount.Clear(); ReturnAmount.Clear(); Quantity.Text = "0"; Amount.Text = "0"; AddedProducts.DataSource = null; }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (EmployeeId == default(int) ? 0 : EmployeeId.GetHashCode()); hash = hash * 23 + (Freight == default(decimal) ? 0 : Freight.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (OrderDate == default(DateTime) ? 0 : OrderDate.GetHashCode()); hash = hash * 23 + (RevisionNumber == default(byte) ? 0 : RevisionNumber.GetHashCode()); hash = hash * 23 + (ShipDate == null ? 0 : ShipDate.GetHashCode()); hash = hash * 23 + (ShipMethodId == default(int) ? 0 : ShipMethodId.GetHashCode()); hash = hash * 23 + (Status == default(byte) ? 0 : Status.GetHashCode()); hash = hash * 23 + (SubTotal == default(decimal) ? 0 : SubTotal.GetHashCode()); hash = hash * 23 + (TaxAmt == default(decimal) ? 0 : TaxAmt.GetHashCode()); hash = hash * 23 + (TotalDue == default(decimal) ? 0 : TotalDue.GetHashCode()); hash = hash * 23 + (VendorId == default(int) ? 0 : VendorId.GetHashCode()); return(hash); } }
public override int GetHashCode() { unchecked { var hashCode = AddressId.GetHashCode(); hashCode = (hashCode * 397) ^ (AnalyticsData != null ? AnalyticsData.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingAddress != null ? BillingAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ClientDetails != null ? ClientDetails.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (CustomerHash != null ? CustomerHash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CustomerId.GetHashCode(); hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ HasUncommitedChanges.GetHashCode(); hashCode = (hashCode * 397) ^ Id.GetHashCode(); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Note != null ? Note.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ProcessedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (ProcessorName != null ? ProcessorName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ScheduledAt.GetHashCode(); hashCode = (hashCode * 397) ^ ShipmentsCount.GetHashCode(); hashCode = (hashCode * 397) ^ (ShippingAddress != null ? ShippingAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ShopifyOrderId.GetHashCode(); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SubTotal != null ? SubTotal.GetHashCode() : 0); hashCode = (hashCode * 397) ^ SubtotalPrice.GetHashCode(); hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0); hashCode = (hashCode * 397) ^ TaxLines.GetHashCode(); hashCode = (hashCode * 397) ^ (TotalDiscounts != null ? TotalDiscounts.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TotalLineItemsPrice != null ? TotalLineItemsPrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TotalPrice != null ? TotalPrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TotalRefunds != null ? TotalRefunds.GetHashCode() : 0); hashCode = (hashCode * 397) ^ TotalTax.GetHashCode(); hashCode = (hashCode * 397) ^ TotalWeight.GetHashCode(); hashCode = (hashCode * 397) ^ (TransactionId != null ? TransactionId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); return(hashCode); } }
public Boolean Guardar_Compra() { Boolean Guardado = false; String Sentencia; DataManager.CLS.DBOperacion Operacion = new DataManager.CLS.DBOperacion(); NumberFormatInfo nfi = new NumberFormatInfo(); nfi.NumberDecimalSeparator = "."; try { Sentencia = @"Insert into DetalleMovimiento(idMovimiento, idProducto, Fecha, Costo, CantidadEntrada, Gravado, MontoIVA, SubTotal) Values("; Sentencia += "'" + IDMovimiento + "',"; Sentencia += "'" + IDProducto + "',"; Sentencia += "'" + Fecha + "',"; Sentencia += "'" + Costo.ToString(nfi) + "',"; Sentencia += "'" + CEntrada.ToString(nfi) + "',"; Sentencia += "'" + Gravado.ToString(nfi) + "',"; Sentencia += "'" + IVA.ToString(nfi) + "',"; Sentencia += "'" + SubTotal.ToString(nfi) + "');"; if (Operacion.Insertar(Sentencia.ToString(nfi)) > 0) { MessageBox.Show("Registro Insertado con Éxito", "Confirmacion", MessageBoxButtons.OK, MessageBoxIcon.Information); Guardado = true; } else { MessageBox.Show("No se pudo realizar el registro", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning); Guardado = false; } } catch { MessageBox.Show("Error al insertar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Guardado = false; } return(Guardado); }
void ReleaseDesignerOutlets() { if (Generosity != null) { Generosity.Dispose(); Generosity = null; } if (GenerositySlider != null) { GenerositySlider.Dispose(); GenerositySlider = null; } if (SubTotal != null) { SubTotal.Dispose(); SubTotal = null; } if (SubTotalTextField != null) { SubTotalTextField.Dispose(); SubTotalTextField = null; } if (TableViewButton != null) { TableViewButton.Dispose(); TableViewButton = null; } if (TipLabel != null) { TipLabel.Dispose(); TipLabel = null; } }
private void CalcularTotales(double pTotal) { double Total = pTotal; double Igv; double SubTotal; if (Total > 700) { txtDetraccion.Text = (Total * 0.1).ToString(); } else { txtDetraccion.Text = "0.00"; } Igv = (Total * 1.18) - Total; SubTotal = Total; txtTotalFacturar.Text = (Total + Igv).ToString(); txtIgv.Text = Igv.ToString(); txtSubTotal.Text = SubTotal.ToString(); grdData.DataSource = _ListaFacturacionDetalle; }