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;
     }
 }
 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);
     }
 }
    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;
    }
Exemple #4
0
        public void Delete(int id)
        {
            Gov_ModelFileInfo gov_ModelFileInfo = new Gov_ModelFileInfo();

            gov_ModelFileInfo.id = id;
            this.control.DeleteEntity(gov_ModelFileInfo);
        }
Exemple #5
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();
			}
		}
Exemple #6
0
 public void Update(Gov_ModelFileInfo com)
 {
     Gov_ModelFile.dal.Update(com);
 }
Exemple #7
0
 public void Add(Gov_ModelFileInfo com)
 {
     Gov_ModelFile.dal.Add(com);
 }
Exemple #8
0
 public void Update(Gov_ModelFileInfo Gov_ModelFile_)
 {
     this.control.UpdateEntity(Gov_ModelFile_, Gov_ModelFile_.id);
 }
Exemple #9
0
 public void Add(Gov_ModelFileInfo Gov_ModelFile_)
 {
     this.control.AddEntity(Gov_ModelFile_);
 }