Пример #1
0
		private void BindRpt(string fmid)
		{
			Flows_ModelInfo byId = Flows_Model.Init().GetById(Convert.ToInt32(this.ViewState["fm"]));
			this.This_FolwName.Text = byId.Flow_Name;
			IList all = Flows_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++)
			{
				Flows_ModelStepInfo flows_ModelStepInfo = all[i] as Flows_ModelStepInfo;
				TmpInfo tmpInfo = new TmpInfo();
				int num = i + 1;
				tmpInfo.Tmp1 = string.Concat(new object[]
				{
					"<strong>第 ",
					num,
					" 步 : </strong> &nbsp;&nbsp; ",
					flows_ModelStepInfo.Step_Name
				});
				tmpInfo.Tmp2 = "step" + num;
				tmpInfo.Tmp3 = string.Concat(num);
				tmpInfo.Tmp4 = string.Concat(flows_ModelStepInfo.id);
				tmpInfo.Tmp5 = string.Concat(flows_ModelStepInfo.Step_Type);
				list.Add(tmpInfo);
			}
			this.rpt.DataSource = list;
			this.rpt.DataBind();
		}
Пример #2
0
		private void ShowData(int step)
		{
			Flows_ModelInfo byId = Flows_Model.Init().GetById(Convert.ToInt32(this.ViewState["fm"]));
			if (step > 0)
			{
				this.ModelName.Visible = false;
				this.ModelStep.Visible = true;
				Flows_ModelStepInfo byId2 = Flows_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;
		}
Пример #3
0
		protected void Rpt_Drop(object sender, EventArgs e)
		{
			ImageButton imageButton = sender as ImageButton;
			string commandArgument = imageButton.CommandArgument;
			if (commandArgument.Contains("step"))
			{
				Label label = imageButton.Parent.FindControl("labid") as Label;
				Flows_ModelStep.Init().Delete(Convert.ToInt32(label.Text));
			}
			this.ShowData(0);
			this.BindRpt(string.Concat(this.ViewState["fm"]));
			this.ViewState["max count"] = this.GetMaxIndex();
		}
Пример #4
0
		private void SaveSetpFlow()
		{
			int num = Convert.ToInt32(this.ViewState["isadd"]);
			int step_Orders = Convert.ToInt32(this.ViewState["current count"]);
			if (num == 0)
			{
				Flows_ModelStepInfo flows_ModelStepInfo = new Flows_ModelStepInfo();
				flows_ModelStepInfo.Flow_ModelID = Convert.ToInt32(this.ViewState["fm"]);
				flows_ModelStepInfo.Step_Remark = this.StepRemark.Value;
				flows_ModelStepInfo.Step_Name = this.Step_Name.Value;
				flows_ModelStepInfo.Step_Type = Convert.ToInt32(base.Request.Form["step_type"]);
				flows_ModelStepInfo.UserList = this.userlist.Value;
				flows_ModelStepInfo.NameList = this.namelist.Value;
				flows_ModelStepInfo.NameList_dep = this.namelist_dep.Value;
				flows_ModelStepInfo.UserList_dep = this.userlist_dep.Value;
				flows_ModelStepInfo.IsUserEdit = Convert.ToInt32(this.IsUserEdit.Checked);
				flows_ModelStepInfo.IsUserFile = Convert.ToInt32(this.IsUserFile.Checked);
				flows_ModelStepInfo.MailAlert = Convert.ToInt32(this.MailAlert.Checked);
				flows_ModelStepInfo.RightToFinish = Convert.ToInt32(this.RightToFinish.Checked);
				flows_ModelStepInfo.Step_Orders = step_Orders;
				Flows_ModelStep.Init().Add(flows_ModelStepInfo);
			}
			else
			{
				Flows_ModelStepInfo flows_ModelStepInfo = Flows_ModelStep.Init().GetById(Convert.ToInt32(this.ViewState["step"]));
				flows_ModelStepInfo.Step_Remark = this.StepRemark.Value;
				flows_ModelStepInfo.Step_Name = this.Step_Name.Value;
				flows_ModelStepInfo.Step_Type = Convert.ToInt32(base.Request.Form["step_type"]);
				flows_ModelStepInfo.UserList = this.userlist.Value;
				flows_ModelStepInfo.NameList = this.namelist.Value;
				flows_ModelStepInfo.NameList_dep = this.namelist_dep.Value;
				flows_ModelStepInfo.UserList_dep = this.userlist_dep.Value;
				flows_ModelStepInfo.IsUserEdit = Convert.ToInt32(this.IsUserEdit.Checked);
				flows_ModelStepInfo.IsUserFile = Convert.ToInt32(this.IsUserFile.Checked);
				flows_ModelStepInfo.MailAlert = Convert.ToInt32(this.MailAlert.Checked);
				flows_ModelStepInfo.RightToFinish = Convert.ToInt32(this.RightToFinish.Checked);
				flows_ModelStepInfo.Step_Orders = step_Orders;
				Flows_ModelStep.Init().Update(flows_ModelStepInfo);
			}
		}
Пример #5
0
 private void Show()
 {
     if (!string.IsNullOrEmpty(base.Request.QueryString["fm"]))
     {
         this.model_flow.Visible = true;
         this.flow.Visible       = false;
         Flows_ModelInfo byId = Flows_Model.Init().GetById(Convert.ToInt32(base.Request.QueryString["fm"]));
         this.fm_name.InnerText = byId.Flow_Name;
         IList all = Flows_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;
         FlowsInfo byId2 = Flows.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 = Flows_Step.Init().GetAll("isact=0 and flow_id=" + byId2.id, "order by id asc");
         this.rpt_f.DataSource = all;
         this.rpt_f.DataBind();
     }
 }
Пример #6
0
		private int GetMaxIndex()
		{
			string where = "Flow_ModelID=" + this.ViewState["fm"];
			IList all = Flows_ModelStep.Init().GetAll(where, null);
			return all.Count;
		}
Пример #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();
			}
		}