Invoice Category
Entity:
public
class InvoiceCategory
{
[Key]
Public int
InvoiceCategoryID { get; set; }
[Required]
public string CategoryName { get; set;
}
}
Invoice
Item Entity
public
class InvoiceItem
{
[Key]
public int InvoiceItemID {
get; set; }
[Required]
public int InvoiceID
{ get; set; }
[Required]
[Display(Name = "Date
Completed")]
[DataType(DataType.Date)]
public DateTime? Date {
get; set; }
[StringLength(50)]
public string
InvoiceCategory { get; set; }
[Required]
[StringLength(200)]
public string Description { get; set;
}
[Required]
[StringLength(20)]
public
string Unit { get; set; }
[Required]
[DataType(DataType.Currency)]
[DisplayFormat(ApplyFormatInEditMode = false,
DataFormatString = "{0:c}")]
public decimal Price { get; set;
}
[Required]
[DefaultValue(1)]
public
decimal? Quantity { get; set; }
public virtual Invoice Invoice {
get; set; }
}
Invoice
Category Edit
View
@model
Accounts.Models.InvoiceCategory
Settings
Invoice
Categories
asp-action="Edit">
class="text-danger">
No comments:
Post a Comment