Пример #1
0
		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;
			}
		}
Пример #2
0
 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);
     }
 }
Пример #3
0
    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;
    }
Пример #4
0
    private void Show()
    {
        string text = "1=1";

        if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"]))
        {
            string text2 = text;
            text = string.Concat(new string[]
            {
                text2,
                " and (FormTitle like '%",
                base.Request.QueryString["keywords"],
                "%' or FilePath like '%",
                base.Request.QueryString["keywords"],
                "%')"
            });
        }
        IList all      = Flows_ModelFile.Init().GetAll(text, "order by id desc");
        int   pageSize = 50;
        int   num      = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num == 0)
        {
            num = 1;
        }
        PagedDataSource pagedDataSource = new PagedDataSource();

        pagedDataSource.DataSource       = all;
        pagedDataSource.AllowPaging      = true;
        pagedDataSource.PageSize         = pageSize;
        pagedDataSource.CurrentPageIndex = num - 1;
        this.rpt.DataSource = pagedDataSource;
        this.rpt.DataBind();
        if (string.IsNullOrEmpty(base.Request.QueryString["keywords"]))
        {
            this.Page2.sty("meneame", num, pagedDataSource.PageCount, "?page=");
        }
        if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"]))
        {
            this.Page2.sty("meneame", num, pagedDataSource.PageCount, "?keywords=" + base.Request.QueryString["keywords"] + "&page=");
        }
        this.rpt.DataSource = pagedDataSource;
        this.rpt.DataBind();
        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + all.Count + "</span> 条 记录数据";
    }
Пример #5
0
    protected void Del_Btn(object obj, EventArgs e)
    {
        LinkButton        linkButton        = obj as LinkButton;
        RepeaterItem      repeaterItem      = linkButton.Parent as RepeaterItem;
        HtmlInputCheckBox htmlInputCheckBox = repeaterItem.FindControl("chk") as HtmlInputCheckBox;
        int num = Convert.ToInt32(htmlInputCheckBox.Value);

        Flows_ModelFile.Init().Delete(num);
        string cmdText = "update Flows_Model set ModelFileID='0' where ModelFileID='" + num + "'";

        MsSqlOperate.ExecuteNonQuery(CommandType.Text, cmdText, null);
        this.Show();
    }
Пример #6
0
 protected void Del_All(object sender, EventArgs e)
 {
     foreach (RepeaterItem repeaterItem in this.rpt.Items)
     {
         HtmlInputCheckBox htmlInputCheckBox = repeaterItem.FindControl("chk") as HtmlInputCheckBox;
         if (htmlInputCheckBox.Checked)
         {
             int num = Convert.ToInt32(htmlInputCheckBox.Value);
             Flows_ModelFile.Init().Delete(num);
             string cmdText = "update Flows_Model set ModelFileID='0' where ModelFileID='" + num + "'";
             MsSqlOperate.ExecuteNonQuery(CommandType.Text, cmdText, null);
         }
     }
     this.Show();
 }
Пример #7
0
		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();
			}
		}