private void cmdAssignmentJobList_Click(object sender, EventArgs e) { var centralDal = CssContext.Instance.GetDAL(string.Empty) as DAL; var gateway = new CentralGateway(centralDal); var contact = gateway.FindContact(_contactID, CssContext.Instance.Host.EmployeeId); var assignments = contact.Client.Assignments; string assignmentsString = string.Join(",", assignments.Select(a => a.Name + " (" + a.AssignmentId.ToString() + ")").ToArray()); MessageBox.Show(assignmentsString); }
private void CreateClientWithExtraFields(object Sender, SideBarEventArgs e) { var centralDAL = CssContext.Instance.GetDAL(string.Empty) as DAL; var centralGateway = new CentralGateway(centralDAL); var contact = new Organisation() { Name = "Extra Field Test" }; centralGateway.Save(contact); centralGateway.ConvertContactToClient(contact, "EF001", CssContext.Instance.Host.EmployeeId); contact = (Organisation)centralGateway.FindContact(contact.ContactId, CssContext.Instance.Host.EmployeeId); CssContext.Instance.Host.OpenClient(contact.Client.ClientId); }