Пример #1
0
        private void btnAddTractor_Click(object sender, RoutedEventArgs e)
        {
            if (objDeliveryChalan!=null)
            {
                objDeliveryChalan = new DELIVERY_CHALAN();
            }
            objDeliveryChalan.CUSTOMER_ID = Convert.ToInt32(cmbCustomer.SelectedValue);
            objDeliveryChalan.CUSTOMER = data.GetById<CUSTOMER>(s => s.CUSTOMER_ID == Convert.ToInt32(cmbCustomer.SelectedValue));
            objDeliveryChalan.TRACTOR_ID = Convert.ToInt32(cmbEngineNo.SelectedValue);
            objDeliveryChalan.TRACTOR_PURCHASE = data.GetById<TRACTOR_PURCHASE>(s => s.TRACTOR_ID == objDeliveryChalan.TRACTOR_ID);
            objDeliveryChalan.HYPOTHETICATION = txtHypothetication.Text;
            if (!string.IsNullOrEmpty(cmbDCNo.Text))
            {
                objDeliveryChalan.DC_DATE = dateOfDC.SelectedDate.Value;
                objDeliveryChalan.DC_NO = cmbDCNo.Text;
                objDeliveryChalan.IS_DC = chkDC.IsChecked.Value;
            }
            lstDeliveryChalan.Add(objDeliveryChalan);

            //lstSalesDetails.Add(TractorSaleInvoice);
            gridTractors.ItemsSource = lstDeliveryChalan;
            gridTractors.Items.Refresh();
            txtTractorSpecification.Clear();
            txtChassisNo.Clear();
            cmbEngineNo.Text = string.Empty;
            cmbTractorModel.Text = string.Empty;
        }
Пример #2
0
 public SellTractorView()
 {
     InitializeComponent();
     data = DataLayer.Instance;
     lstDeliveryChalan = new List<DELIVERY_CHALAN>();
     objDeliveryChalan = new DELIVERY_CHALAN();
 }
		private void detach_DELIVERY_CHALANs(DELIVERY_CHALAN entity)
		{
			this.SendPropertyChanging();
			entity.CUSTOMER = null;
		}
		private void detach_DELIVERY_CHALANs(DELIVERY_CHALAN entity)
		{
			this.SendPropertyChanging();
			entity.TRACTOR_PURCHASE = null;
		}
 partial void DeleteDELIVERY_CHALAN(DELIVERY_CHALAN instance);
 partial void UpdateDELIVERY_CHALAN(DELIVERY_CHALAN instance);
 partial void InsertDELIVERY_CHALAN(DELIVERY_CHALAN instance);
		private void detach_DELIVERY_CHALANs(DELIVERY_CHALAN entity)
		{
			this.SendPropertyChanging();
			entity.SALES_INVOICE = null;
		}