public ActionResult Index() { List <EmployeeModels> empList = ADOClient.GetAll(); TempData["Value"] = empList; //return RedirectToAction("Test"); return(View(empList)); }
protected bool DoCommonSetup() { if (!this.baseCommand.CheckAndPrintMissingOptions(this.requiredOptions)) { return(false); } if (requiredOptions.Contains(OptionDefinition.Url)) { this.client = new ADOClient(OptionDefinition.Url.ValueFrom(this.baseCommand)) { PersonalAccessToken = OptionDefinition.AccessToken.ValueFrom(this.baseCommand), }; this.client.ErrorReceived += (label, error) => Console.WriteLine($"WARNING: error countered during '{label}':\n{error}"); } return(true); }
public ActionResult Create(FormCollection collection) { try { EmployeeModels models = new EmployeeModels(); models.DepartmentId = Convert.ToInt32(collection["DepartmentId"]); models.RowStatus = Convert.ToInt32(collection["RowStatus"]); models.Salary = Convert.ToInt32(collection["Salary"]); models.EmpoyeeName = collection["EmpoyeeName"]; ADOClient.Add(models); // TODO: Add insert logic here return(RedirectToAction("Index")); } catch { return(View()); } }
// // GET: /Employee/Create public ActionResult Create(EmployeeModels models) { models.dpModels = ADOClient.GetAllDepartment(); return(View(models)); }