public ActionResult Write() { try { CCommand command = new CCommand(); if (Request["idx"] != null && int.Parse(Request["idx"]) > 0) { DaoCommand daoCommand = new DaoCommand(); command = daoCommand.getCommandOne(int.Parse(Request["idx"])); //ViewBag.status = new DaoCode().getCodeList("status", 0, null, 0); } ViewBag.command = command; } catch (Exception e) { throw new Exception(e.Message); } return View("~/VIews/Command/CommandWrite.cshtml"); }
public ActionResult View() { try { if (Request["idx"] != null && int.Parse(Request["idx"]) > 0) { DaoCommand daoCommand = new DaoCommand(); CCommand command = daoCommand.getCommandOne(int.Parse(Request["idx"])); ViewBag.command = command; if ( command.ord_emp_no.Equals( Session["emp_no"] ) ) { ViewBag.IsAuth = true; } else { ViewBag.IsAuth = false; } ViewBag.status = new DaoCode().getCodeList("status", 0, null, 0); } } catch (Exception e) { throw new Exception(e.Message); } return View("~/VIews/Command/CommandView.cshtml"); }