public EditContactViewModel(Company company)
        {
            if (company == null)
                throw new ArgumentNullException("company");

            Company = new CompanySummaryViewModel(company);
        }
Example #2
0
        public EditContactViewModel(Company company)
        {
            if (company == null)
            {
                throw new ArgumentNullException("company");
            }

            Company = new CompanySummaryViewModel(company);
        }
Example #3
0
        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>();
        }
Example #6
0
        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);
        }
Example #8
0
        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);
        }
Example #9
0
        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);
        }
Example #10
0
 public EditTaskViewModel(Company company) 
 {
     Company = new CompanySummaryViewModel(company);
     AssociatedCompanyId = company.Id;
     AvailableCategoryList = new List<string>();
 }
Example #11
0
 public EditTaskViewModel(Company company)
 {
     Company               = new CompanySummaryViewModel(company);
     AssociatedCompanyId   = company.Id;
     AvailableCategoryList = new List <string>();
 }