private void ShowInfo(int fc_id) { Tunnel.BLL.Tunnel_flowclass bll = new Tunnel.BLL.Tunnel_flowclass(); Tunnel.Model.Tunnel_flowclass model = bll.GetModel(fc_id); this.TextBox1.Text = model.fc_name; this.TextBox2.Text = model.Fc_desin; }
protected void Button1_Click(object sender, EventArgs e) { Tunnel.Model.Tunnel_flowclass mf = new Tunnel.Model.Tunnel_flowclass(); Tunnel.BLL.Tunnel_flowclass bf = new Tunnel.BLL.Tunnel_flowclass(); mf.fc_id = int.Parse(Tunnel.Data.DESEncrypt.Decrypt(Request.Params["id"])); mf.fc_name = TextBox1.Text.Trim(); mf.Fc_desin = TextBox2.Text; bf.Update(mf); Tunnel.Common.Message.Show("修改成功!", "FlowClass_Manage.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { Tunnel.Model.Tunnel_flowclass mf = new Tunnel.Model.Tunnel_flowclass(); Tunnel.BLL.Tunnel_flowclass bf = new Tunnel.BLL.Tunnel_flowclass(); mf.fc_name = TextBox1.Text.Trim(); mf.Fc_desin = TextBox2.Text; if (bf.Add(mf) > 0) { Tunnel.Common.Message.Show("添加成功!"); } }
/// <summary> /// 获得数据列表 /// </summary> public List <Tunnel.Model.Tunnel_flowclass> DataTableToList(DataTable dt) { List <Tunnel.Model.Tunnel_flowclass> modelList = new List <Tunnel.Model.Tunnel_flowclass>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Tunnel.Model.Tunnel_flowclass model; for (int n = 0; n < rowsCount; n++) { model = new Tunnel.Model.Tunnel_flowclass(); //model.fc_id=dt.Rows[n]["fc_id"].ToString(); model.fc_name = dt.Rows[n]["fc_name"].ToString(); model.Fc_desin = dt.Rows[n]["Fc_desin"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(Tunnel.Model.Tunnel_flowclass model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Tunnel.Model.Tunnel_flowclass model) { return(dal.Add(model)); }