Example #1
0
        private void Save()
        {
            jobchargeBindingSource.EndEdit();
            JobCharge jobcharge = jobchargeBindingSource.Current as JobCharge;

            //BindingList<JobCharge> OrderList = (BindingList<JobCharge>)userBindingSource.DataSource;
            //JobCharge JobCharge = OrderList[userBindingSource.Position];

            JobCharge.SaveEntity(jobcharge);

            BindingList <JobCharge> orderList = new BindingList <JobCharge>(JobCharge.GetEntityList());

            jobchargeBindingSource.DataSource = orderList;

            MessageBox.Show("JobCharge was saved.");
        }
Example #2
0
        private void SetupBindings()
        {
            BindingList <JobCharge> jobchargeList = new BindingList <JobCharge>(JobCharge.GetEntityList());

            jobchargeBindingSource.DataSource = jobchargeList;
        }