예제 #1
0
 private void Show()
 {
     if (this.ModelName.Visible)
     {
         IList all = Gov_ModelFile.Init().GetAll(null, null);
         this.ModelFileList.Items.Add(new ListItem("请从以下 公文模板表单库中 选择一项 (请 酌情选择) ", "0"));
         foreach (object current in all)
         {
             Gov_ModelFileInfo gov_ModelFileInfo = current as Gov_ModelFileInfo;
             this.ModelFileList.Items.Add(new ListItem(gov_ModelFileInfo.FormTitle, string.Concat(gov_ModelFileInfo.id)));
         }
         this.GetFirtNode();
         this.Model_Type.Items.Add(new ListItem("不属于任何分类", "0"));
         int i = 0;
         int count = this.li.Count;
         while (i < count)
         {
             Gov_Model_TypeInfo gov_Model_TypeInfo = this.li[i];
             this.Model_Type.Items.Add(new ListItem(gov_Model_TypeInfo.Sh, string.Concat(gov_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"]))
     {
         Gov_ModelFileInfo gov_ModelFileInfo = Gov_ModelFile.Init().GetById(Convert.ToInt32(base.Request.QueryString["fmf"]));
         gov_ModelFileInfo.FormTitle       = this.FormTitle.Value;
         gov_ModelFileInfo.AddTime         = DateTime.Now;
         gov_ModelFileInfo.CreatorDepName  = this.DepName;
         gov_ModelFileInfo.CreatorID       = Convert.ToInt32(this.Uid);
         gov_ModelFileInfo.CreatorRealName = this.RealName;
         gov_ModelFileInfo.DocBody         = this.DocBody.Value;
         Gov_ModelFile.Init().Update(gov_ModelFileInfo);
         string str = HttpContext.Current.Server.HtmlEncode("您好!模板表单编辑成功!");
         base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=" + base.Request.Url.AbsoluteUri + "&tip=" + str);
     }
     else
     {
         Gov_ModelFileInfo gov_ModelFileInfo = new Gov_ModelFileInfo();
         gov_ModelFileInfo.AddTime         = DateTime.Now;
         gov_ModelFileInfo.CreatorDepName  = this.DepName;
         gov_ModelFileInfo.CreatorID       = Convert.ToInt32(this.Uid);
         gov_ModelFileInfo.CreatorRealName = this.RealName;
         gov_ModelFileInfo.FormTitle       = this.FormTitle.Value;
         gov_ModelFileInfo.DocBody         = this.DocBody.Value;
         Gov_ModelFile.Init().Add(gov_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)
    {
        Gov_ModelFileInfo byId = Gov_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      = Gov_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);

        Gov_ModelFile.Init().Delete(num);
        string cmdText = "update Gov_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);
             Gov_ModelFile.Init().Delete(num);
             string cmdText = "update Gov_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")
				{
					Gov_ModelFileInfo byId = Gov_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/gov", "");
										this.LoadOriginalFile = this.url + text4;
									}
								}
							}
						}
					}
				}
				IList all = Gov_ModelStep.Init().GetAll("Flow_ModelID=" + text, "order by id asc");
				Gov_ModelInfo byId2 = Gov_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();
			}
		}