// GET: /Projects/Create public ActionResult CreatePartial(long id) { if (id == 0) { tblProject childProject = new tblProject(); childProject.fldProjectID = 0; return PartialView("_PartialCreateProject", childProject); } else { tblProject parentProject = new tblProject(); tblProject childProject = new tblProject(); tblProjectDap newDap = new tblProjectDap(); parentProject = newDap.GetByfldProjectID(id); childProject.fldProjectID = parentProject.fldProjectID; childProject.fldProjectTreeID = parentProject.fldProjectTreeID; return PartialView("_PartialCreateProject",childProject); } }
private void frmErga_Single_Load(object sender, EventArgs e) { updateButtons(fState); FillCombos(); switch (fState) { case enums.formState.Add: break; case enums.formState.AddChild: break; case enums.formState.Update: case enums.formState.Delete: { tblProjectDap newDap = new tblProjectDap(); _tblProject = newDap.GetByfldProjectID(_fldProjectID); loadFormfromObject(_tblProject); FillGrids(); } break; } }
public tblProject GettblProjectByfldProjectID(Int64 fldProjectID) { using (var dap = new tblProjectDap(this)) { return dap.GetByfldProjectID(fldProjectID); } }
// // GET: /Projects/Edit/5 public ActionResult Edit(int id) { tblProject editProject = new tblProject(); tblProjectDap newDap = new tblProjectDap(); editProject = newDap.GetByfldProjectID(id); return View(editProject); // return PartialView("_PartialEditProject", editProject); }
// // GET: /Projects/Details/5 public ActionResult Details(int id) { tblProject editProject = new tblProject(); tblProjectDap newDap = new tblProjectDap(); editProject = newDap.GetByfldProjectID(id); return View(editProject); }