예제 #1
0
        private void repositoryItemButtonEdit1_Click(object sender, EventArgs e)
        {
            var customer = this.OrderVM.Orders[gridView.FocusedRowHandle]?.Customer;

            if (customer != null)
            {
                var edit = new CustomerEdit(customer);
                if (edit.ShowDialog() == DialogResult.OK)
                {
                    gridControl.RefreshDataSource();
                }
            }
        }
예제 #2
0
        private void EditCustomer(object p)
        {
            CustomerModel customer     = (CustomerModel)p;
            CustomerEdit  customerEdit = new CustomerEdit(customer.GetShallowCopy());

            if ((customerEdit.ShowDialog() ?? true) && customerEdit.DialogResult.Value == true)
            {
                CustomerModel changedCustomer = ((CustomerEditViewModel)customerEdit.DataContext).Customer;
                var           cust            = Customers.Where(c => c.IdCustomer == customer.IdCustomer);
                foreach (CustomerModel customerModel in cust)
                {
                    customerModel.Reload(dbAccess);
                }
            }
        }
예제 #3
0
파일: Screen.cs 프로젝트: dogangsn/SIS
        public void CustomerEdit(SIS.Data.FormOpenType _FormOpenType, int _id)
        {
            CustomerEdit _CustomerEdit = new CustomerEdit();

            _CustomerEdit._FormOpenType = _FormOpenType;
            if (_FormOpenType == Data.FormOpenType.New)
            {
                _CustomerEdit.__dl_Customers = new Model.Models.GMP.Customer.CustomersDTO();
            }
            else
            {
                _getValue.Id = _id;
                //_CustomerEdit.__dl_Customers = bl._repository.Run<CustomersService, CustomersDTO>(x => x.Get_Customers(_getValue));
            }
            _CustomerEdit.ShowDialog();
        }