public static tb_node_model GetOneNode(DbConn PubConn, int id) { tb_node_dal dal = new tb_node_dal(); DataRow dr = dal.GetOneNode(PubConn, id); tb_node_model model = CreateModelForNode(dr); return(model); }
public ActionResult Update(int id) { return(this.Visit(EnumUserRole.Admin, () => { tb_node_dal dal = new tb_node_dal(); using (DbConn PubConn = DbConn.CreateConn(Config.TaskConnectString)) { PubConn.Open(); tb_node_model model = dal.GetOneNode(PubConn, id); return View(model); } })); }