Пример #1
0
        private void btnAddComplaint_Click(object sender, RoutedEventArgs e)
        {
            JOB_COMPLAINT complaint = new JOB_COMPLAINT();
            complaint.ACTION_TAKEN = txtActionOnComplaint.Text;
            complaint.ACTUAL_COMPLAINT = txtComplaint.Text;
            complaint.LABOUR_CHARGES = Convert.ToDecimal(txtLabourEstimation.Text);
            jobCard.JOB_COMPLAINTs.Add(complaint);

            gridComplaint.ItemsSource = jobCard.JOB_COMPLAINTs.Select((s, i) => new { SlNo = ++i, Complaint = s.ACTUAL_COMPLAINT, Action = s.ACTION_TAKEN, Charge = s.LABOUR_CHARGES }).ToList();

            txtActionOnComplaint.Clear();
            txtComplaint.Clear();
            txtLabourEstimation.Clear();
        }
 partial void DeleteJOB_COMPLAINT(JOB_COMPLAINT instance);
 partial void InsertJOB_COMPLAINT(JOB_COMPLAINT instance);
 partial void UpdateJOB_COMPLAINT(JOB_COMPLAINT instance);
		private void detach_JOB_COMPLAINTs(JOB_COMPLAINT entity)
		{
			this.SendPropertyChanging();
			entity.JOB_CARD = null;
		}