public bool InsertCustomerSupervisor(string fullName, string address, string street, string ward, string phone, int customerId, int districtId, int positionId) { try { if (CheckExistedSuporvisor(-1, phone)) return false; var o = new CustomerSupervisor { FullName = fullName, Address = address, Street = street, Ward = ward, Phone = phone, CustomerId = customerId, DistrictId = districtId, PositionId = positionId }; db.CustomerSupervisors.InsertOnSubmit(o); db.SubmitChanges(); return true; } catch { return false; } }
public bool InsertSupervisor(string FullName, string Address, string Street, string Ward, string Phone, int CustomerId, int DistrictId) { try { CustomerSupervisor o = new CustomerSupervisor(); o.FullName = FullName; o.Address = Address; o.Street = Street; o.Ward = Ward; o.Phone = Phone; o.CustomerId = CustomerId; o.DistrictId = DistrictId; db.CustomerSupervisors.InsertOnSubmit(o); db.SubmitChanges(); return true; } catch { return false; } }
private void detach_CustomerSupervisors(CustomerSupervisor entity) { this.SendPropertyChanging(); entity.Customer = null; }
private void attach_CustomerSupervisors(CustomerSupervisor entity) { this.SendPropertyChanging(); entity.SupervisorPosition = this; }
partial void DeleteCustomerSupervisor(CustomerSupervisor instance);
partial void UpdateCustomerSupervisor(CustomerSupervisor instance);
partial void InsertCustomerSupervisor(CustomerSupervisor instance);
private void attach_CustomerSupervisors(CustomerSupervisor entity) { this.SendPropertyChanging(); entity.District = this; }