Beispiel #1
0
 public ActionResult Register(CompanyCreateModel m)
 {
     try
     {
         Company client = new Company();
         client.Name = m.Name;
         // client.TicketStartNumber = Convert.ToInt32(m.TicketStartNumber);
         CRMUser user = new CRMUser()
         {
             Username = m.EmailId, Password = m.Password
         };
         CompanyManager <Company> clientManager = new CompanyManager <Company>(new CompanyStore <Company>());
         clientManager.CreateClient <CRMUser>(client, user);
         return(View("RegisterSuccess"));
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("CC", ex.Message);
         return(View(m));
     }
 }