public bool SaveInvoiceDetail(List<InvoiceDetailModel> invoiceDetailModellist, int invoiceid)
        {
            try
               {
               using (_context= new HSSNInventoryEntities() )
               {
                   foreach (var rowData in invoiceDetailModellist)
                   {
                       var model = new InvoiceDetail()
                       {

                           ProductId = rowData.ProductId,
                           InvoiceId =invoiceid ,
                           Quantity = rowData.Quantity,
                           Rate = rowData.Rate,

                       };
                       _context.Entry(model).State = EntityState.Added;

                   }
                   _context.SaveChanges();
                   return true;
               }
               }
               catch (Exception)
               {

               throw;
               }
        }
Пример #2
0
		private void detach_InvoiceDetails(InvoiceDetail entity)
		{
			this.SendPropertyChanging();
			entity.ClientDetail = null;
		}
Пример #3
0
		private void attach_InvoiceDetails(InvoiceDetail entity)
		{
			this.SendPropertyChanging();
			entity.PersonalDetail = this;
		}
Пример #4
0
 partial void DeleteInvoiceDetail(InvoiceDetail instance);
Пример #5
0
 partial void UpdateInvoiceDetail(InvoiceDetail instance);
Пример #6
0
 partial void InsertInvoiceDetail(InvoiceDetail instance);