/// <summary> /// 流程修改数据显示 /// </summary> void editbind() { try { Tunnel.BLL.Tunnel_flow bf = new Tunnel.BLL.Tunnel_flow(); Tunnel.Model.Tunnel_flow mf = new Tunnel.Model.Tunnel_flow(); mf = bf.GetModel(int.Parse(Request.Params["editid"])); if (mf.f_sort != 0 && tfc.Exists(mf.f_sort)) { DropDownList1.SelectedValue = mf.f_sort.ToString(); } if (mf.f_bum != 0 && bt.Exists(mf.f_bum)) { DropDownList2.SelectedValue = mf.f_bum.ToString(); } if (mf.f_form != 0 && btf.Exists(mf.f_form)) { DropDownList4.SelectedValue = mf.f_form.ToString(); } TextBox1.Text = mf.f_name; TextBox2.Text = mf.f_depict; RadioButtonList1.SelectedValue = mf.f_isfile.ToString(); RadioButtonList2.SelectedValue = mf.f_state.ToString(); //RadioButtonList3.SelectedValue = mf.f_stype.ToString(); } catch { Tunnel.Common.Message.back("不正确的ID!"); } }
void bind() { Tunnel.BLL.Tunnel_flow bflow = new Tunnel.BLL.Tunnel_flow(); DataSet ds = bflow.GetList("f_sort<>18"); //Repeater1.DataSource = ds; //Repeater1.DataBind(); }
void RepeaterBind(string where) { Tunnel.BLL.Tunnel_flow bflow = new Tunnel.BLL.Tunnel_flow(); string bwhere = ""; ul.UsbnLogin = tm.GetModel(ul.LoginID); if (ul.JiaoSe(ul.LoginID) != "系统管理员") { if (string.IsNullOrEmpty(where)) { bwhere = "f_bum=" + ul.UsbnLogin.m_bum; } else { bwhere = " and f_bum=" + ul.UsbnLogin.m_bum; } } else { bwhere = ""; } where += bwhere; DataSet ds = bflow.GetList(where); Repeater1.DataSource = ds; Repeater1.DataBind(); }
/// <summary> /// 初始化绑定公文流程 /// </summary> void DropDownListBind() { Tunnel.BLL.Tunnel_flow bflow = new Tunnel.BLL.Tunnel_flow(); DataSet ds = bflow.GetList("f_sort=18"); DropDownList1.DataSource = ds; DropDownList1.DataTextField = "f_name"; DropDownList1.DataValueField = "f_id"; DropDownList1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (!string.IsNullOrEmpty(Request.Params["delid"])) { string id = Request.Params["delid"]; Tunnel.BLL.Tunnel_flow bf = new Tunnel.BLL.Tunnel_flow(); bf.Delete(int.Parse(Tunnel.Data.DESEncrypt.Decrypt(id))); Tunnel.Common.Message.Show("删除成功!"); } RepeaterBind(""); } }
protected void Button1_Click(object sender, EventArgs e) { Tunnel.Model.Tunnel_flow mt = new Tunnel.Model.Tunnel_flow(); Tunnel.BLL.Tunnel_flow bt = new Tunnel.BLL.Tunnel_flow(); mt.f_sort = int.Parse(DropDownList1.SelectedValue); mt.f_name = TextBox1.Text.Trim(); mt.f_isfile = int.Parse(RadioButtonList1.SelectedValue); mt.f_bum = int.Parse(DropDownList2.SelectedValue); mt.f_depict = TextBox2.Text.Trim(); mt.f_form = int.Parse(DropDownList4.SelectedValue); mt.f_state = int.Parse(RadioButtonList2.SelectedValue); mt.f_stype = 0;// int.Parse(RadioButtonList3.SelectedValue); bt.Add(mt); Tunnel.Common.Message.ShowAndReLoad("添加成功!", "Tunnel_LiuList.aspx?id=" + mt.f_sort); }
protected void Button1_Click(object sender, EventArgs e) { Tunnel.Model.Tunnel_flow mt = new Tunnel.Model.Tunnel_flow(); Tunnel.BLL.Tunnel_flow bt = new Tunnel.BLL.Tunnel_flow(); mt.f_sort = int.Parse(DropDownList1.SelectedValue); mt.f_name = TextBox1.Text.Trim(); mt.f_isfile = int.Parse(RadioButtonList1.SelectedValue); mt.f_bum = int.Parse(DropDownList2.SelectedValue); mt.f_depict = TextBox2.Text.Trim(); mt.f_form = int.Parse(DropDownList4.SelectedValue); mt.f_state = int.Parse(RadioButtonList2.SelectedValue); mt.f_stype = 0;//int.Parse(RadioButtonList3.SelectedValue); mt.f_id = int.Parse(Request.Params["editid"]); bt.Update(mt); Tunnel.Common.Message.Show("修改成功!", "Flow_Manage.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.ShowInit(""); Tunnel.BLL.Tunnel_flow tf = new Tunnel.BLL.Tunnel_flow(); DataSet dds = tf.GetList("f_sort=18"); ListItem list = new ListItem(); //list.Text = "所有流程类型"; //list.Value = "0"; //DropDownList1.Items.Add(list); foreach (DataRow drds in dds.Tables[0].Rows) { list = new ListItem(); list.Text = drds["f_name"].ToString(); list.Value = drds["f_id"].ToString(); DropDownList1.Items.Add(list); } if (!string.IsNullOrEmpty(Request.Params["delid"])) { mb = tb.GetModel(Convert.ToInt32(Request.Params["delid"])); if ("issure".Equals(Request.Params["mod"])) { tmt.Title = mb.b_title; tmt.TypeId = 5; tmt.HtmlSource = fc.From_Content(mb.b_formcontent, mb.b_content, true);//取得替换后的表单数据 tmt.UserId = mb.b_user; Tunnel.BLL.Tunnel_information bllf = new Tunnel.BLL.Tunnel_information(); int relt = -1; relt = bllf.Add(tmt); } tb.Delete(mb.b_id); Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE FROM TUNNEL_EXAM WHERE E_GID=" + mb.b_id); Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE FROM Tunnel_Advice WHERE A_GID=" + mb.b_id); Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE FROM Tunnel_Remind WHERE m_type=1 and m_typeid=" + mb.b_id); Tunnel.Common.Del_File delfile = new Tunnel.Common.Del_File(); delfile.FileDelete(mb.b_file); Tunnel.Common.Message.Show("操作成功!"); } } }