public ActionResult CreateApplication(CreateAppSettingModel cm) { try { OperationsOnDatabase db = new OperationsOnDatabase(); db.CreateApplication(cm.ApplicationName, cm.SelectedUserName); return(RedirectToAction("successPage")); } catch (Exception) { throw; } }
public ActionResult CreateApplication() { try { List <string> usernames = new List <string>(); DatabaseModel dbm = new DatabaseModel(); CreateAppSettingModel cm = new CreateAppSettingModel(); foreach (var temp in dbm.Person.ToList()) { if (temp.UserStatus == "Active") { usernames.Add(temp.Username); } } cm.Usernames = new SelectList(usernames); return(View(cm)); } catch (Exception e) { log.Error("Error Create Application class in project controller" + e.Message); throw new Exception(e.Message); } }