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(Core.EnumUserRole.Admin, () => { tb_node_dal dal = new tb_node_dal(); using (DbConn PubConn = DbConfig.CreateConn(Config.TaskConnectString)) { PubConn.Open(); tb_node_model model = dal.GetOneNode(PubConn, id); return View(model); } }); }