public ActionResult Edit(Int32 id) { BL.Emp emp = unitOfWork.EmpRepository.GetByID(id) as BL.Emp; IEnumerable <BL.Dep> DepList = unitOfWork.DivisionRepository.GetAll(); ViewBag.DepList = DepList; return(View(emp)); }
private void button1_Click(object sender, EventArgs e) { BL.Emp newEmp = new BL.Emp(); newEmp.DepId = 1; newEmp.PosId = 1; empBindingSource.DataSource = newEmp; empDataGridView.BeginEdit(false); EditMode = true; }
public ActionResult ShowPass(Int32 id) { BL.Emp emp = unitOfWork.EmpRepository.GetByID(id) as BL.Emp; return(PartialView(emp)); }