public EditContactViewModel(Company company) { if (company == null) throw new ArgumentNullException("company"); Company = new CompanySummaryViewModel(company); }
public EditContactViewModel(Company company) { if (company == null) { throw new ArgumentNullException("company"); } Company = new CompanySummaryViewModel(company); }
public ActionResult CompanySummary() { var entity = SessionHelper.CurrentEntity; var company = entity.Company; var session = SessionHelper.Session; var vm = new CompanySummaryViewModel(company); return(PartialView("CompanySummary", vm)); }
public TaskDisplayViewModel(Task task) { Id = task.Id; Name = task.Name; TaskDueDate = task.TaskDate; TaskDueDateString = task.TaskDate != null?task.TaskDate.Value.ToLongDateString() : string.Empty; CompletionDate = task.CompletionDate; Category = task.Category; Notes = task.Notes; AssociatedWith = task.ContactId == null ? task.Company.Name : task.Contact.Name; Company = new CompanySummaryViewModel(task.Company); Contact = new ContactSummaryViewModel(task.Contact); }
public EditTaskViewModel(Task task) { Id = task.Id; Name = task.Name; TaskDate = task.TaskDate; Completed = task.CompletionDate != null; AssociatedContactId = Convert.ToInt32(task.ContactId); Company = new CompanySummaryViewModel(task.Company); Contact = new ContactSummaryViewModel(task.Contact); Category = task.Category; Notes = task.Notes; AssociatedContactId = task.ContactId ?? 0; AvailableCategoryList = new List<string>(); }
public EditTaskViewModel(Task task) { Id = task.Id; Name = task.Name; TaskDate = task.TaskDate; Completed = task.CompletionDate != null; AssociatedContactId = Convert.ToInt32(task.ContactId); Company = new CompanySummaryViewModel(task.Company); Contact = new ContactSummaryViewModel(task.Contact); Category = task.Category; Notes = task.Notes; AssociatedContactId = task.ContactId ?? 0; AvailableCategoryList = new List <string>(); }
public EditContactViewModel(Contact contact) { if (contact == null) throw new ArgumentNullException("contact"); Id = contact.Id; Name = contact.Name; Title = contact.Title; DirectPhone = contact.DirectPhone; MobilePhone = contact.MobilePhone; Extension = contact.Extension; Email = contact.Email; Assistant = contact.Assistant; ReferredBy = contact.ReferredBy; Notes = contact.Notes; Company = new CompanySummaryViewModel(contact.Company); }
public EditContactViewModel(Contact contact) { if (contact == null) { throw new ArgumentNullException("contact"); } Id = contact.Id; Name = contact.Name; Title = contact.Title; DirectPhone = contact.DirectPhone; MobilePhone = contact.MobilePhone; Extension = contact.Extension; Email = contact.Email; Assistant = contact.Assistant; ReferredBy = contact.ReferredBy; Notes = contact.Notes; Company = new CompanySummaryViewModel(contact.Company); }
public ContactDisplayViewModel(Contact contact) { if (contact == null) { throw new ArgumentNullException("contact"); } Id = contact.Id; Name = contact.Name; Title = contact.Title; MobilePhone = contact.MobilePhone; Email = contact.Email; Assistant = contact.Assistant; ReferredBy = contact.ReferredBy; Notes = contact.Notes; JigsawId = contact.JigsawId; HasJigsawAccess = contact.HasJigsawAccess; Company = new CompanySummaryViewModel(contact.Company); DirectPhoneWithExtension = string.IsNullOrWhiteSpace(contact.Extension) ? contact.DirectPhone : string.Format("{0} Ext: {1}", contact.DirectPhone, contact.Extension); }
public EditTaskViewModel(Company company) { Company = new CompanySummaryViewModel(company); AssociatedCompanyId = company.Id; AvailableCategoryList = new List<string>(); }
public EditTaskViewModel(Company company) { Company = new CompanySummaryViewModel(company); AssociatedCompanyId = company.Id; AvailableCategoryList = new List <string>(); }