//构造函数 public CustomerForm(BathDBDataContext dc, Customer customer) { db = dc; if (customer != null) { newCustomer = false; m_Customer = customer; } InitializeComponent(); }
//构造函数 public payAccountForm(BathDBDataContext dc, Customer _customer) { db = dc; m_customer = _customer; InitializeComponent(); }
private void dgvPays_show(Customer c) { dgvCustomerPays.Rows.Clear(); var pays = db.CustomerPays.Where(x => x.customerId == c.id); foreach (var p in pays) { dgvCustomerPays.Rows.Add(p.id, p.cash, p.bank, p.date, p.payEmployee, p.note); } BathClass.set_dgv_fit(dgvCustomerPays); }
private void dgvActs_show(Customer c) { dgvActs.Rows.Clear(); var acts = db.Account.Where(x => x.zero != null && x.abandon == null && x.name == c.id.ToString()); foreach (var a in acts) { dgvActs.Rows.Add(a.id, a.text, a.payTime, a.payEmployee, a.zero); } BathClass.set_dgv_fit(dgvActs); }
partial void DeleteCustomer(Customer instance);
partial void UpdateCustomer(Customer instance);
partial void InsertCustomer(Customer instance);