partial void DeleteSALES_INVOICE(SALES_INVOICE instance);
 partial void UpdateSALES_INVOICE(SALES_INVOICE instance);
 partial void InsertSALES_INVOICE(SALES_INVOICE instance);
		private void detach_SALES_INVOICEs(SALES_INVOICE entity)
		{
			this.SendPropertyChanging();
			entity.MASTER = null;
		}
		private void attach_SALES_INVOICEs(SALES_INVOICE entity)
		{
			this.SendPropertyChanging();
			entity.CUSTOMER = this;
		}
Esempio n. 6
0
 private void btnSaveTractor_Click(object sender, RoutedEventArgs e)
 {
     if (!chkDC.IsChecked.Value)
     {
         SALES_INVOICE TractorSaleInvoice = new SALES_INVOICE();
         TractorSaleInvoice.CUSTOMER_ID = lstDeliveryChalan.First().CUSTOMER_ID;
         TractorSaleInvoice.CUSTOMER = lstDeliveryChalan.First().CUSTOMER;
         TractorSaleInvoice.INVOICE_VAT_PERCENT = Convert.ToDecimal(string.IsNullOrEmpty(txtVatInPercent.Text) ? null : txtVatInPercent.Text);
         TractorSaleInvoice.INVOICE_DATE = dateOfInvoice.SelectedDate;
         TractorSaleInvoice.INVOICE_DISCOUNT = Convert.ToDecimal(string.IsNullOrEmpty(txtTradeDiscount.Text) ? null : txtTradeDiscount.Text);
         TractorSaleInvoice.INVOICE_GRANDTOTAL = Convert.ToDecimal(lblTotalAmount.Content);
         TractorSaleInvoice.SELL_TYPE = data.GetMasterId(CommonLayer.TYPE.TRACTOR.ToString());
         lstDeliveryChalan.ForEach(s => { s.HYPOTHETICATION = txtHypothetication.Text; s.IS_DC = chkDC.IsChecked.Value; TractorSaleInvoice.DELIVERY_CHALANs.Add(s); });
         data.Insert<SALES_INVOICE>(TractorSaleInvoice);
         MessageBox.Show("Invoice Generated Sucessfully.");
     }
     else
     {
         data.Insert<DELIVERY_CHALAN>(objDeliveryChalan);
         MessageBox.Show("DC Generated Sucessfully.");
     }
 }