private void Show() { if (this.ModelName.Visible) { IList all = Flows_ModelFile.Init().GetAll(null, null); this.ModelFileList.Items.Add(new ListItem("请从以下 模板表单库中 选择一项 (酌情 可不选) ", "0")); foreach (object current in all) { Flows_ModelFileInfo flows_ModelFileInfo = current as Flows_ModelFileInfo; this.ModelFileList.Items.Add(new ListItem(flows_ModelFileInfo.FormTitle, string.Concat(flows_ModelFileInfo.id))); } this.GetFirtNode(); this.Model_Type.Items.Add(new ListItem("不属于任何分类", "0")); int i = 0; int count = this.li.Count; while (i < count) { Flows_Model_TypeInfo flows_Model_TypeInfo = this.li[i]; this.Model_Type.Items.Add(new ListItem(flows_Model_TypeInfo.Sh, string.Concat(flows_Model_TypeInfo.id))); i++; } this.ViewState["max count"] = 0; this.ViewState["current count"] = 0; this.ViewState["isadd"] = 0; this.ViewState["fm"] = 0; } }
public void Delete(int id) { Flows_ModelFileInfo flows_ModelFileInfo = new Flows_ModelFileInfo(); flows_ModelFileInfo.id = id; this.control.DeleteEntity(flows_ModelFileInfo); }
protected void Save_Btn(object sender, EventArgs e) { if (!string.IsNullOrEmpty(base.Request.QueryString["fmf"])) { Flows_ModelFileInfo flows_ModelFileInfo = Flows_ModelFile.Init().GetById(Convert.ToInt32(base.Request.QueryString["fmf"])); flows_ModelFileInfo.FormTitle = this.FormTitle.Value; flows_ModelFileInfo.AddTime = DateTime.Now; flows_ModelFileInfo.CreatorDepName = this.DepName; flows_ModelFileInfo.CreatorID = Convert.ToInt32(this.Uid); flows_ModelFileInfo.CreatorRealName = this.RealName; flows_ModelFileInfo.DocBody = this.DocBody.Value; Flows_ModelFile.Init().Update(flows_ModelFileInfo); string str = HttpContext.Current.Server.HtmlEncode("您好!模板表单编辑成功!"); base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=" + base.Request.Url.AbsoluteUri + "&tip=" + str); } else { Flows_ModelFileInfo flows_ModelFileInfo = new Flows_ModelFileInfo(); flows_ModelFileInfo.AddTime = DateTime.Now; flows_ModelFileInfo.CreatorDepName = this.DepName; flows_ModelFileInfo.CreatorID = Convert.ToInt32(this.Uid); flows_ModelFileInfo.CreatorRealName = this.RealName; flows_ModelFileInfo.FormTitle = this.FormTitle.Value; flows_ModelFileInfo.DocBody = this.DocBody.Value; Flows_ModelFile.Init().Add(flows_ModelFileInfo); string str = HttpContext.Current.Server.HtmlEncode("您好!模板表单添加成功!"); base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=" + base.Request.Url.AbsoluteUri + "&tip=" + str); } }
private void Show(string id) { Flows_ModelFileInfo byId = Flows_ModelFile.Init().GetById(Convert.ToInt32(id)); this.FormTitle.Value = byId.FormTitle; this.DocBody.Value = byId.DocBody; }
public void Update(Flows_ModelFileInfo Flows_ModelFile_) { this.control.UpdateEntity(Flows_ModelFile_, Flows_ModelFile_.id); }
public void Add(Flows_ModelFileInfo Flows_ModelFile_) { this.control.AddEntity(Flows_ModelFile_); }
protected void Select_btn(object sender, EventArgs e) { DropDownList dropDownList = sender as DropDownList; this.kind_show.Visible = true; if (dropDownList.SelectedValue.Contains(",")) { this.Attachword.Visible = true; string text = dropDownList.SelectedValue.Split(new char[] { ',' })[0]; string text2 = dropDownList.SelectedValue.Split(new char[] { ',' })[1]; if (text2 != "0") { Flows_ModelFileInfo byId = Flows_ModelFile.Init().GetById(Convert.ToInt32(text2)); this.DocBody.Value = byId.DocBody; if (byId.FilePath.Contains("|")) { List<TmpInfo> list = new List<TmpInfo>(); string formTitle = byId.FormTitle; string[] array = byId.FilePath.Split(new char[] { '|' }); for (int i = 0; i < array.Length; i++) { if (array[i].Trim() != "") { TmpInfo tmpInfo = new TmpInfo(); int num = array[i].LastIndexOf('/') + 1; string text3 = array[i].Substring(num, array[i].Length - num); string text4 = array[i].Replace("~", ""); tmpInfo.Tmp1 = formTitle; tmpInfo.Tmp2 = text3; tmpInfo.Tmp3 = text4; list.Add(tmpInfo); if (this.LoadOriginalFile == "" && text3.Contains(".")) { string[] array2 = text3.Split(new char[] { '.' }); if (array2[array2.Length - 1].ToLower().Contains("doc")) { this.url = this.url.ToLower().Replace("/manage/flow", ""); this.LoadOriginalFile = this.url + text4; } } } } } } IList all = Flows_ModelStep.Init().GetAll("Flow_ModelID=" + text, "order by id asc"); Flows_ModelInfo byId2 = Flows_Model.Init().GetById(Convert.ToInt32(text)); if (!string.IsNullOrEmpty(byId2.Remark)) { this.nts.Visible = true; this.nts.Attributes.Add("title", byId2.Remark); } this.rpt_steps.DataSource = all; this.rpt_steps.DataBind(); } }
public void Update(Flows_ModelFileInfo com) { Flows_ModelFile.dal.Update(com); }
public void Add(Flows_ModelFileInfo com) { Flows_ModelFile.dal.Add(com); }