Ejemplo n.º 1
0
        public InvoiceData(Invoice invoice)
            : this()
        {
            if (invoice == null)
            {
                return;
            }

            this.InvoiceId = invoice.InvoiceId;
            this.Project = new ProjectData(invoice.Task.Project);
            this.Task = new TaskData(invoice.Task);
            this.PreparedDate = invoice.PreparedDate;
            this.Description = invoice.Description;
            this.Amount = invoice.Amount;
            this.CreatedBy = new UserData(invoice.CreatedByUser);
            this.CreatedDate = invoice.CreatedDate;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Invoices EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToInvoices(Invoice invoice)
 {
     base.AddObject("Invoices", invoice);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new Invoice object.
 /// </summary>
 /// <param name="invoiceId">Initial value of the InvoiceId property.</param>
 /// <param name="number">Initial value of the Number property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 /// <param name="taskId">Initial value of the TaskId property.</param>
 /// <param name="preparedDate">Initial value of the PreparedDate property.</param>
 /// <param name="amount">Initial value of the Amount property.</param>
 /// <param name="isArchived">Initial value of the IsArchived property.</param>
 /// <param name="notes">Initial value of the Notes property.</param>
 /// <param name="modifiedBy">Initial value of the ModifiedBy property.</param>
 /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
 /// <param name="createdBy">Initial value of the CreatedBy property.</param>
 /// <param name="createdDate">Initial value of the CreatedDate property.</param>
 public static Invoice CreateInvoice(global::System.Int32 invoiceId, global::System.String number, global::System.String description, global::System.Int32 taskId, global::System.DateTime preparedDate, global::System.Decimal amount, global::System.Boolean isArchived, global::System.String notes, global::System.Int32 modifiedBy, global::System.DateTime modifiedDate, global::System.Int32 createdBy, global::System.DateTime createdDate)
 {
     Invoice invoice = new Invoice();
     invoice.InvoiceId = invoiceId;
     invoice.Number = number;
     invoice.Description = description;
     invoice.TaskId = taskId;
     invoice.PreparedDate = preparedDate;
     invoice.Amount = amount;
     invoice.IsArchived = isArchived;
     invoice.Notes = notes;
     invoice.ModifiedBy = modifiedBy;
     invoice.ModifiedDate = modifiedDate;
     invoice.CreatedBy = createdBy;
     invoice.CreatedDate = createdDate;
     return invoice;
 }