Beispiel #1
0
 //Para crear nuevos
 public SubProductForTransaction(SubProduct subProduct, BasicTransaction transaction, int quantity, decimal unitPrice)
 {
     this.SubProduct  = subProduct;
     this.Transaction = transaction;
     this.Quantity    = quantity;
     this.UnitPrice   = unitPrice;
 }
Beispiel #2
0
 //Para levantar los datos
 public SubProductForTransaction(string id, SubProduct subProduct, BasicTransaction transaction, string quantity, string unitPrice, string creationDate, string modificationDate, string status)
 {
     this.Id               = new Guid(id);
     this.SubProduct       = subProduct;
     this.Transaction      = transaction;
     this.Quantity         = Convert.ToInt32(quantity);
     this.UnitPrice        = Convert.ToDecimal(unitPrice.Replace('.', CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator[0]));
     this.CreationDate     = DateTime.ParseExact(creationDate, "yyyyMMdd", CultureInfo.InvariantCulture);
     this.ModificationDate = DateTime.ParseExact(modificationDate, "yyyyMMdd", CultureInfo.InvariantCulture);
     this.Status           = (Status)Convert.ToInt32(status);
 }