public async Task <ActionResult> Create(FormCollection collection)
        {
            String newEventID = await _contactOperations.AddContactItemAsync(collection["FileAs"],
                                                                             collection["GivenName"],
                                                                             collection["Surname"],
                                                                             collection["JobTitle"],
                                                                             collection["Email"],
                                                                             collection["MobilePhone"],
                                                                             collection["BusinessPhone"]);

            return(RedirectToAction("Index", new { newid = newEventID }));
        }
Пример #2
0
        public async Task <ActionResult> Create(FormCollection collection)
        {
            _O365ServiceOperationFailed = false;
            String newEventID = "";

            try
            {
                newEventID = await _contactOperations.AddContactItemAsync(collection["FileAs"],
                                                                          collection["GivenName"],
                                                                          collection["Surname"],
                                                                          collection["JobTitle"],
                                                                          collection["Email"],
                                                                          collection["MobilePhone"],
                                                                          collection["BusinessPhone"]);
            }
            catch (Exception)
            {
                _O365ServiceOperationFailed = true;
            }

            return(RedirectToAction("Index", new { newid = newEventID }));
        }