private void ShowData(int step)
 {
     Gov_ModelInfo byId = Gov_Model.Init().GetById(Convert.ToInt32(this.ViewState["fm"]));
     if (step > 0)
     {
         this.ModelName.Visible = false;
         this.ModelStep.Visible = true;
         Gov_ModelStepInfo byId2 = Gov_ModelStep.Init().GetById(Convert.ToInt32(this.ViewState["step"]));
         this.Step_Name.Value = byId2.Step_Name;
         this.This_FolwName.Text = byId.Flow_Name;
         this.userlist.Value = byId2.UserList;
         this.namelist.Value = byId2.NameList;
         this.userlist_dep.Value = byId2.UserList_dep;
         this.namelist_dep.Value = byId2.NameList_dep;
         this.IsUserEdit.Checked = Convert.ToBoolean(byId2.IsUserEdit);
         this.IsUserFile.Checked = Convert.ToBoolean(byId2.IsUserFile);
         this.RightToFinish.Checked = Convert.ToBoolean(byId2.RightToFinish);
         this.MailAlert.Checked = Convert.ToBoolean(byId2.MailAlert);
         this.StepRemark.Value = byId2.Step_Remark;
     }
     else
     {
         this.ModelName.Visible = true;
         this.ModelStep.Visible = false;
         this.Flow_Name.Value = byId.Flow_Name;
         this.ModelFileList.SelectedValue = byId.ModelFileID;
         this.FlowRemark.Value = byId.Remark;
         this.userlist_deps.Value = byId.ShareDeps;
         this.namelist_deps.Value = byId.namelist;
         this.Model_Type.SelectedValue = string.Concat(byId.ComID);
     }
     this.ViewState["isadd"] = 1;
 }
        private void BindRpt(string fmid)
        {
            Gov_ModelInfo byId = Gov_Model.Init().GetById(Convert.ToInt32(this.ViewState["fm"]));
            this.This_FolwName.Text = byId.Flow_Name;
            IList all = Gov_ModelStep.Init().GetAll("Flow_ModelID=" + this.ViewState["fm"], "order by id asc");
            List<TmpInfo> list = new List<TmpInfo>();
            list.Add(new TmpInfo
            {
                Tmp1 = "<strong>公文模型流程基本信息:</strong> &nbsp;&nbsp; " + byId.Flow_Name,
                Tmp2 = "flow",
                Tmp3 = "0"
            });
            for (int i = 0; i < all.Count; i++)
            {
                Gov_ModelStepInfo gov_ModelStepInfo = all[i] as Gov_ModelStepInfo;
                TmpInfo tmpInfo = new TmpInfo();
                int num = i + 1;
                tmpInfo.Tmp1 = string.Concat(new object[]
				{
					"<strong>第 ",
					num,
					" 步 : </strong> &nbsp;&nbsp; ",
					gov_ModelStepInfo.Step_Name
				});
                tmpInfo.Tmp2 = "step" + num;
                tmpInfo.Tmp3 = string.Concat(num);
                tmpInfo.Tmp4 = string.Concat(gov_ModelStepInfo.id);
                tmpInfo.Tmp5 = string.Concat(gov_ModelStepInfo.Step_Type);
                list.Add(tmpInfo);
            }
            this.rpt.DataSource = list;
            this.rpt.DataBind();
        }
 private void SaveModelFlow()
 {
     int num = Convert.ToInt32(this.ViewState["isadd"]);
     if (num == 0)
     {
         Gov_ModelInfo gov_ModelInfo = new Gov_ModelInfo();
         gov_ModelInfo.AddTime = DateTime.Now;
         gov_ModelInfo.CreatorDepName = this.DepName;
         gov_ModelInfo.CreatorID = Convert.ToInt32(this.Uid);
         gov_ModelInfo.CreatorRealName = this.RealName;
         gov_ModelInfo.Flow_Name = this.Flow_Name.Value;
         gov_ModelInfo.ModelFileID = this.ModelFileList.SelectedValue;
         gov_ModelInfo.Remark = this.FlowRemark.Value;
         gov_ModelInfo.ShareDeps = this.userlist_deps.Value;
         gov_ModelInfo.namelist = this.namelist_deps.Value;
         gov_ModelInfo.ComID = Convert.ToInt32(this.Model_Type.SelectedValue);
         Gov_Model.Init().Add(gov_ModelInfo);
         this.ViewState["fm"] = gov_ModelInfo.id;
     }
     else
     {
         Gov_ModelInfo gov_ModelInfo = Gov_Model.Init().GetById(Convert.ToInt32(this.ViewState["fm"]));
         gov_ModelInfo.CreatorDepName = this.DepName;
         gov_ModelInfo.CreatorID = Convert.ToInt32(this.Uid);
         gov_ModelInfo.CreatorRealName = this.RealName;
         gov_ModelInfo.Flow_Name = this.Flow_Name.Value;
         gov_ModelInfo.ModelFileID = this.ModelFileList.SelectedValue;
         gov_ModelInfo.Remark = this.FlowRemark.Value;
         gov_ModelInfo.ShareDeps = this.userlist_deps.Value;
         gov_ModelInfo.namelist = this.namelist_deps.Value;
         gov_ModelInfo.ComID = Convert.ToInt32(this.Model_Type.SelectedValue);
         Gov_Model.Init().Update(gov_ModelInfo);
         this.ViewState["fm"] = gov_ModelInfo.id;
     }
 }
Exemple #4
0
        public void Delete(int id)
        {
            Gov_ModelInfo gov_ModelInfo = new Gov_ModelInfo();

            gov_ModelInfo.id = id;
            this.control.DeleteEntity(gov_ModelInfo);
        }
Exemple #5
0
		private void Show()
		{
			SqlParameter sqlParameter = new SqlParameter();
			sqlParameter.ParameterName = "@uid";
			sqlParameter.Size = 50;
			sqlParameter.Value = this.Uid;
			SqlParameter sqlParameter2 = new SqlParameter();
			sqlParameter2.Direction = ParameterDirection.Output;
			sqlParameter2.ParameterName = "@pt1";
			sqlParameter2.Size = 4;
			SqlParameter sqlParameter3 = new SqlParameter();
			sqlParameter3.Direction = ParameterDirection.Output;
			sqlParameter3.ParameterName = "@pt2";
			sqlParameter3.Size = 4;
			SqlParameter sqlParameter4 = new SqlParameter();
			sqlParameter4.Direction = ParameterDirection.Output;
			sqlParameter4.ParameterName = "@pt3";
			sqlParameter4.Size = 4;
			SqlParameter[] cmdParms = new SqlParameter[]
			{
				sqlParameter2,
				sqlParameter3,
				sqlParameter4,
				sqlParameter
			};
			MsSqlOperate.ExecuteNonQuery(CommandType.StoredProcedure, "Gov_GetUserFlowBoxCount", cmdParms);
			this.wdpy.InnerText = string.Concat(sqlParameter2.Value);
			this.yjpy.InnerText = string.Concat(sqlParameter3.Value);
			this.wdsq.InnerText = string.Concat(sqlParameter4.Value);
			IList all = Gov_Model.Init().GetAll("IsComplete=1 and ( ShareDeps='' or ShareDeps like '%#" + this.DepID + "#%') ", null);
			this.ModelFlowList.Items.Add(new ListItem("== 请从以下列表 选择一个公文模型", ""));
			int i;
			for (i = 0; i < all.Count; i++)
			{
				Gov_ModelInfo gov_ModelInfo = all[i] as Gov_ModelInfo;
				this.ModelFlowList.Items.Add(new ListItem(gov_ModelInfo.Flow_Name, gov_ModelInfo.id + "," + gov_ModelInfo.ModelFileID));
			}
			this.GetFirtNode();
			this.Model_Type.Items.Add(new ListItem("== 请选择一个分类", "-1"));
			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.Model_Type.Items.Add(new ListItem("不属于任何分类", "0"));
		}
Exemple #6
0
		protected void ModelType_btn(object sender, EventArgs e)
		{
			int num = Convert.ToInt32(this.Model_Type.SelectedValue);
			if (num == -1)
			{
				this.ModelFlowList.Items.Clear();
				IList all = Gov_Model.Init().GetAll("IsComplete=1 and ( ShareDeps='' or ShareDeps like '%#" + this.DepID + "#%') ", null);
				this.ModelFlowList.Items.Add(new ListItem("== 请从以下列表 选择一个公文模型", ""));
				for (int i = 0; i < all.Count; i++)
				{
					Gov_ModelInfo gov_ModelInfo = all[i] as Gov_ModelInfo;
					this.ModelFlowList.Items.Add(new ListItem(gov_ModelInfo.Flow_Name, gov_ModelInfo.id + "," + gov_ModelInfo.ModelFileID));
				}
			}
			if (num == 0)
			{
				this.ModelFlowList.Items.Clear();
				IList all = Gov_Model.Init().GetAll("comid=0 and IsComplete=1 and ( ShareDeps='' or ShareDeps like '%#" + this.DepID + "#%') ", null);
				this.ModelFlowList.Items.Add(new ListItem("== 请从以下列表 选择一个公文模型", ""));
				for (int i = 0; i < all.Count; i++)
				{
					Gov_ModelInfo gov_ModelInfo = all[i] as Gov_ModelInfo;
					this.ModelFlowList.Items.Add(new ListItem(gov_ModelInfo.Flow_Name, gov_ModelInfo.id + "," + gov_ModelInfo.ModelFileID));
				}
			}
			if (num > 0)
			{
				this.ModelFlowList.Items.Clear();
				IList all = Gov_Model.Init().GetAll(string.Concat(new object[]
				{
					"comid=",
					num,
					" and IsComplete=1 and ( ShareDeps='' or ShareDeps like '%#",
					this.DepID,
					"#%') "
				}), null);
				this.ModelFlowList.Items.Add(new ListItem("== 请从以下列表 选择一个公文模型", ""));
				for (int i = 0; i < all.Count; i++)
				{
					Gov_ModelInfo gov_ModelInfo = all[i] as Gov_ModelInfo;
					this.ModelFlowList.Items.Add(new ListItem(gov_ModelInfo.Flow_Name, gov_ModelInfo.id + "," + gov_ModelInfo.ModelFileID));
				}
			}
			this.Attachword.Visible = false;
		}
Exemple #7
0
 private void Show()
 {
     if (!string.IsNullOrEmpty(base.Request.QueryString["fm"]))
     {
         this.model_flow.Visible = true;
         this.flow.Visible       = false;
         Gov_ModelInfo byId = Gov_Model.Init().GetById(Convert.ToInt32(base.Request.QueryString["fm"]));
         this.fm_name.InnerText = byId.Flow_Name;
         IList all = Gov_ModelStep.Init().GetAll("Flow_ModelID=" + byId.id, "order by id asc");
         this.rpt_mf.DataSource = all;
         this.rpt_mf.DataBind();
     }
     if (!string.IsNullOrEmpty(base.Request.QueryString["fl"]))
     {
         this.model_flow.Visible = false;
         this.flow.Visible       = true;
         GovInfo byId2 = Gov.Init().GetById(Convert.ToInt32(base.Request.QueryString["fl"]));
         this.fl_name.InnerText    = byId2.Flow_Name;
         this.fl_current.InnerHtml = "<u>流程状态</u>:" + this.GetStatus(byId2.Status) + " &nbsp;&nbsp; <u>当前环节</u>:" + byId2.CurrentStepName;
         IList all = Gov_Step.Init().GetAll("isact=0 and flow_id=" + byId2.id, "order by id asc");
         this.rpt_f.DataSource = all;
         this.rpt_f.DataBind();
     }
 }
Exemple #8
0
 public void Update(Gov_ModelInfo com)
 {
     Gov_Model.dal.Update(com);
 }
Exemple #9
0
 public void Add(Gov_ModelInfo com)
 {
     Gov_Model.dal.Add(com);
 }
Exemple #10
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 #11
0
    private void Show()
    {
        this.GetFirtNode();
        this.Model_Type.Items.Add(new ListItem("== 列出所有公文模型分类", "-1"));
        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.Model_Type.Items.Add(new ListItem("不属于任何分类", "0"));
        IList all = Gov_Model.Init().GetAll(null, null);

        this.Model.Items.Clear();
        this.Model.Items.Add(new ListItem("所有公文模型", ""));
        foreach (object current in all)
        {
            Gov_ModelInfo gov_ModelInfo = current as Gov_ModelInfo;
            this.Model.Items.Add(new ListItem(gov_ModelInfo.Flow_Name, gov_ModelInfo.Flow_Name));
        }
        IList list = null;

        if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"]) || !string.IsNullOrEmpty(base.Request.QueryString["md"]) || !string.IsNullOrEmpty(base.Request.QueryString["st"]) || !string.IsNullOrEmpty(base.Request.QueryString["et"]) || !string.IsNullOrEmpty(base.Request.QueryString["stt"]))
        {
            string text  = base.Request.QueryString["keywords"];
            string text2 = string.Concat(new string[]
            {
                " (flow_name like '%",
                text,
                "%' or CurrentStepName like '%",
                text,
                "%' or CreatorRealName like '%",
                text,
                "%' ) "
            });
            string text3 = base.Request.QueryString["md"];
            string text4 = base.Request.QueryString["st"];
            string text5 = base.Request.QueryString["et"];
            string text6 = base.Request.QueryString["stt"];
            if (string.IsNullOrEmpty(text))
            {
                text2 = " 1=1 ";
            }
            if (!string.IsNullOrEmpty(text6))
            {
                text2 = text2 + " and (status=" + text6 + ") ";
            }
            if (!string.IsNullOrEmpty(text3))
            {
                text2 = text2 + " and (ModelName='" + text3 + "') ";
            }
            if (!string.IsNullOrEmpty(text4) && !string.IsNullOrEmpty(text5))
            {
                string text7 = text2;
                text2 = string.Concat(new string[]
                {
                    text7,
                    " and (addtime between '",
                    text4,
                    "' and '",
                    text5,
                    "')"
                });
            }
            if (!string.IsNullOrEmpty(text4) && string.IsNullOrEmpty(text5))
            {
                text2 = text2 + " and (addtime between '" + text4 + "' and getdate())";
            }
            if (string.IsNullOrEmpty(text4) && !string.IsNullOrEmpty(text5))
            {
                text2 = text2 + " and (addtime between getdate() and '" + text5 + "')";
            }
            list = Gov.Init().GetAll(text2, "order by id desc");
        }
        else
        {
            list = Gov.Init().GetAll(null, "order by id desc");
        }
        Hashtable hashtable = (Hashtable)HttpContext.Current.Application["config_fenye"];
        int       pageSize  = Convert.ToInt32(hashtable["fenye_commom"]);
        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       = list;
        pagedDataSource.AllowPaging      = true;
        pagedDataSource.PageSize         = pageSize;
        pagedDataSource.CurrentPageIndex = num - 1;
        this.rpt.DataSource = pagedDataSource;
        this.rpt.DataBind();
        if (base.Request.QueryString["keywords"] == null)
        {
            this.Page2.sty("meneame", num, pagedDataSource.PageCount, "?page=");
        }
        if (base.Request.QueryString["keywords"] != null)
        {
            this.Page2.sty("meneame", num, pagedDataSource.PageCount, string.Concat(new string[]
            {
                "?keywords=",
                base.Request.QueryString["keywords"],
                "&stt=",
                base.Request.QueryString["stt"],
                "&md=",
                base.Request.QueryString["md"],
                "&st=",
                base.Request.QueryString["st"],
                "&et=",
                base.Request.QueryString["et"],
                "&page="
            }));
        }
        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + list.Count + "</span> 条 记录数据";
    }
Exemple #12
0
 public void Update(Gov_ModelInfo Gov_Model_)
 {
     this.control.UpdateEntity(Gov_Model_, Gov_Model_.id);
 }
Exemple #13
0
 public void Add(Gov_ModelInfo Gov_Model_)
 {
     this.control.AddEntity(Gov_Model_);
 }