public static void WriteJson(this Gov value, JsonWriter writer, JsonSerializer serializer) { switch (value) { case Gov.The397000000A: serializer.Serialize(writer, "397000000A"); break; } }
public override bool Equals(Object o) { if (this == o) { return(true); } if (!(o is TypedDependency)) { return(false); } var typedDep = (TypedDependency)o; if (Reln != null ? !Reln.Equals(typedDep.Reln) : typedDep.Reln != null) { return(false); } if (Gov != null ? !Gov.Equals(typedDep.Gov) : typedDep.Gov != null) { return(false); } if (Dep != null ? !Dep.Equals(typedDep.Dep) : typedDep.Dep != null) { return(false); } return(true); }
public override int GetHashCode() { int result = (Reln != null ? Reln.GetHashCode() : 17); result = 29 * result + (Gov != null ? Gov.GetHashCode() : 0); result = 29 * result + (Dep != null ? Dep.GetHashCode() : 0); return(result); }
static void Main(string[] args) { Globo Globo = new Globo(); GloboSat GloboSat = new GloboSat(); Viva Viva = new Viva(); Galileu Galileu = new Galileu(); QuatroRodas QuatroRodas = new QuatroRodas(); SuperInteressante SuperInteressante = new SuperInteressante(); Veja Veja = new Veja(); VoceSabia VoceSabia = new VoceSabia(); VaiQueDa VaiQueDa = new VaiQueDa(); VaiQueDa.AdicionarObservados(Galileu); VaiQueDa.AdicionarObservados(QuatroRodas); VaiQueDa.AdicionarObservados(SuperInteressante); VaiQueDa.AdicionarObservados(Veja); VaiQueDa.AdicionarObservados(VoceSabia); Universo Universo = new Universo(); Universo.AdicionarObservados(Globo); Universo.AdicionarObservados(GloboSat); Universo.AdicionarObservados(Viva); Gov Gov = new Gov(); Gov.AdicionarObservados(Globo); Gov.AdicionarObservados(GloboSat); Gov.AdicionarObservados(Viva); Gov.AdicionarObservados(Galileu); Gov.AdicionarObservados(QuatroRodas); Gov.AdicionarObservados(SuperInteressante); Gov.AdicionarObservados(Veja); Gov.AdicionarObservados(VoceSabia); Sistemas Sistema = new Sistemas(); Sistema.AdicionarObservados(Globo); Sistema.AdicionarObservados(Veja); Console.WriteLine("Canais assistidos e revistas assinadas"); Console.WriteLine(); VaiQueDa.SalvarEstado(); Console.WriteLine(); Universo.SalvarEstado(); Console.WriteLine(); Gov.SalvarEstado(); Console.WriteLine(); Sistema.SalvarEstado(); Console.WriteLine(); }
public Root() { gov = new Gov(this); life = new Life(this); job = new Job(this); ticks = new List <ITick> (); ticks.Add(gov); ticks.Add(life); ticks.Add(job); }
protected void CompleteStep_Btn(object sender, EventArgs e) { GovInfo byId = Gov.Init().GetById(Convert.ToInt32(base.Request.QueryString["fl"])); string a = ""; List<string> list = new List<string>(); if (byId.CurrentStepUserList.Contains(",") && byId.CurrentStepUserList.Contains("#") && byId.Status == 0) { string[] array = byId.CurrentStepUserList.Split(new char[] { ',' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; if (text.Contains("#")) { list.Add(text.Split(new char[] { '#' })[1]); } } } if (list.Contains(this.Uid)) { a = this.Uid; } if (a != "") { Gov_StepInfo gov_StepInfo = this.ViewState["CurrentStep"] as Gov_StepInfo; Gov_StepActionInfo gov_StepActionInfo = new Gov_StepActionInfo(); gov_StepActionInfo.AddTime = DateTime.Now; gov_StepActionInfo.FlowID = Convert.ToInt32(base.Request.QueryString["fl"]); gov_StepActionInfo.Operation = 1; gov_StepActionInfo.OperationStepID = gov_StepInfo.id; gov_StepActionInfo.OperationWord = "(同意 并签发公文) :" + base.Request.Form["FlowRemark"]; gov_StepActionInfo.UserDepName = this.DepName; gov_StepActionInfo.UserID = Convert.ToInt32(this.Uid); gov_StepActionInfo.UserRealName = this.RealName; gov_StepActionInfo.OperationStepName = gov_StepInfo.Step_Name; Gov_StepAction.Init().Add(gov_StepActionInfo); this.AddDoc(gov_StepActionInfo.FlowID, gov_StepActionInfo.id); byId.CurrentDocPath = this.filepath.Value; Gov.Init().Update(byId); this.FinishFlow(); MessageBox.ShowAndRedirect(this, "公文已操作签发!", "AppMenu.aspx"); } }
protected void Del(object sender, EventArgs e) { LinkButton linkButton = sender as LinkButton; RepeaterItem repeaterItem = linkButton.Parent as RepeaterItem; HtmlInputCheckBox htmlInputCheckBox = repeaterItem.FindControl("chk") as HtmlInputCheckBox; string value = htmlInputCheckBox.Value; try { int num = Convert.ToInt32(value); GovInfo byId = Gov.Init().GetById(num); if (byId != null) { Help.DeleteFiles(byId.Flow_Files); Help.DeleteFiles(byId.CurrentDocPath); } IList all = Gov_Doc.Init().GetAll("flow_id=" + num, null); if (all != null && all.Count > 0) { foreach (object current in all) { Gov_DocInfo gov_DocInfo = current as Gov_DocInfo; Help.DeleteFiles(gov_DocInfo.DocPath); } } } catch { } string text = "delete from Gov where id=" + value + ";"; string text2 = "delete from Gov_Step where Flow_ID=" + value + ";"; string text3 = "delete from Gov_StepAction where FlowID=" + value + ";"; string text4 = "delete from Gov_Doc where Flow_ID=" + value + ";"; string text5 = "delete from Gov_Recipient where Flow_ID=" + value + ";"; MsSqlOperate.ExecuteNonQuery(CommandType.Text, string.Concat(new string[] { text, text2, text3, text4, text5 }), new SqlParameter[0]); this.Show(); }
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) + " <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(); } }
private void Show(string type) { if (type == "verify") { this.flow_list = "我的审批"; string cmdText; if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"])) { string text = base.Request.QueryString["keywords"]; string text2 = string.Concat(new string[] { " (Flow_Name like '%", text, "%' or CreatorRealName like '%", text, "%' ) " }); cmdText = string.Concat(new string[] { "select a.* from Gov a where a.status=0 and a.CurrentStepUserList like '%#", this.Uid, "#%' and a.CurrentStepID not in (select b.OperationStepID from Gov_StepAction b where b.UserID=", this.Uid, " and b.FlowID=a.id ) and ", text2 }); using (DataSet dataSet = MsSqlOperate.ExecuteDataset(CommandType.Text, cmdText, new SqlParameter[0])) { this.CutPage(dataSet, "verify"); goto IL_1D5; } } cmdText = string.Concat(new string[] { "select a.* from Gov a where a.status=0 and a.CurrentStepUserList like '%#", this.Uid, "#%' and a.CurrentStepID not in (select b.OperationStepID from Gov_StepAction b where b.UserID=", this.Uid, " and b.FlowID=a.id ) order by a.id desc" }); if (!string.IsNullOrEmpty(base.Request.QueryString["td"])) { cmdText = string.Concat(new string[] { "select a.* from Gov a where a.comid=", base.Request.QueryString["td"], " and a.status=0 and a.CurrentStepUserList like '%#", this.Uid, "#%' and a.CurrentStepID not in (select b.OperationStepID from Gov_StepAction b where b.UserID=", this.Uid, " and b.FlowID=a.id ) order by a.id desc" }); } using (DataSet dataSet = MsSqlOperate.ExecuteDataset(CommandType.Text, cmdText, new SqlParameter[0])) { this.CutPage(dataSet, "verify"); } } IL_1D5: if (type == "verified") { this.flow_list = "已经批阅"; IList all; if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"])) { string text = base.Request.QueryString["keywords"]; string text2 = string.Concat(new string[] { "(Flow_Name like '%", text, "%' or CreatorRealName like '%", text, "%' ) and " }); all = Gov.Init().GetAll(text2 + " HasOperatedUserList like '%#" + this.Uid + "#%'", "order by id desc"); } else { if (string.IsNullOrEmpty(base.Request.QueryString["td"])) { all = Gov.Init().GetAll("HasOperatedUserList like '%#" + this.Uid + "#%'", "order by id desc"); } else { all = Gov.Init().GetAll(string.Concat(new string[] { "comid=", base.Request.QueryString["td"], " and HasOperatedUserList like '%#", this.Uid, "#%'" }), "order by id desc"); } } this.CutPage(all, "verified"); } if (type == "apply") { this.flow_list = "我的发文"; IList all; if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"])) { string text = base.Request.QueryString["keywords"]; string text2 = string.Concat(new string[] { "(Flow_Name like '%", text, "%' or CreatorRealName like '%", text, "%' ) and " }); all = Gov.Init().GetAll(text2 + " CreatorID=" + this.Uid, "order by id desc"); } else { if (string.IsNullOrEmpty(base.Request.QueryString["td"])) { all = Gov.Init().GetAll("CreatorID=" + this.Uid, "order by id desc"); } else { all = Gov.Init().GetAll("comid=" + base.Request.QueryString["td"] + " and CreatorID=" + this.Uid, "order by id desc"); } } this.CutPage(all, "apply"); } }
public string ToString(CoreLabel.OutputFormat format) { return(Reln + "(" + Gov.ToString(format) + ", " + Dep.ToString(format) + ")"); }
protected void Save_Btn(object sender, EventArgs e) { if (this.rpt_steps.Items.Count > 0) { bool flag = true; for (int i = 0; i < this.rpt_steps.Items.Count; i++) { Label label = this.rpt_steps.Items[i].FindControl("stepid") as Label; if (string.IsNullOrEmpty(base.Request.Form["namelist" + label.Text])) { flag = false; } } if (flag && this.userlist.Value.Contains(",")) { GovInfo govInfo = new GovInfo(); if (Convert.ToInt32(this.Model_Type.SelectedValue) > 0) { govInfo.ComID = Convert.ToInt32(this.Model_Type.SelectedValue); } govInfo.ModelName = this.ModelFlowList.Items[this.ModelFlowList.SelectedIndex].Text; govInfo.Flow_Name = this.Flow_Name.Value; govInfo.DocNo = this.DocNo.Value; govInfo.Secret = base.Request.Form["Secret"]; govInfo.CurrentDocPath = this.filepath.Value; govInfo.DocBody = this.DocBody.Value; govInfo.ValidTime = DateTime.Now; govInfo.AddTime = DateTime.Now; if (Utils.IsDate(this.ValidTime.Value)) { govInfo.ValidTime = Convert.ToDateTime(this.ValidTime.Value); govInfo.IsValid = 1; } govInfo.Remark = this.FlowRemark.Value; govInfo.CreatorID = Convert.ToInt32(this.Uid); govInfo.CreatorRealName = this.RealName; govInfo.CreatorDepName = this.DepName; govInfo.HasOperatedUserList = ""; govInfo.Flow_Files = this.UpdateFiles(); Gov.Init().Add(govInfo); for (int i = 0; i < this.rpt_steps.Items.Count; i++) { Label label = this.rpt_steps.Items[i].FindControl("stepid") as Label; Label label2 = this.rpt_steps.Items[i].FindControl("isuseredit") as Label; Label label3 = this.rpt_steps.Items[i].FindControl("IsHead") as Label; Label label4 = this.rpt_steps.Items[i].FindControl("IsEnd") as Label; Label label5 = this.rpt_steps.Items[i].FindControl("MailAlert") as Label; Label label6 = this.rpt_steps.Items[i].FindControl("RightToFinish") as Label; Label label7 = this.rpt_steps.Items[i].FindControl("Step_Orders") as Label; Label label8 = this.rpt_steps.Items[i].FindControl("Step_Name") as Label; Label label9 = this.rpt_steps.Items[i].FindControl("IsUserFile") as Label; string text = label.Text; Gov_StepInfo gov_StepInfo = new Gov_StepInfo(); gov_StepInfo.Flow_ID = govInfo.id; gov_StepInfo.IsEnd = Convert.ToInt32(label4.Text); gov_StepInfo.IsHead = Convert.ToInt32(label3.Text); gov_StepInfo.IsUserEdit = Convert.ToInt32(label2.Text); gov_StepInfo.IsUserFile = Convert.ToInt32(label9.Text); gov_StepInfo.MailAlert = Convert.ToInt32(label5.Text); gov_StepInfo.RightToFinish = Convert.ToInt32(label6.Text); gov_StepInfo.Step_Name = label8.Text; gov_StepInfo.Step_Orders = Convert.ToInt32(label7.Text); gov_StepInfo.userlist = base.Request.Form["userlist" + text]; gov_StepInfo.namelist = base.Request.Form["namelist" + text]; gov_StepInfo.Acts = Guid.NewGuid().ToString(); Gov_Step.Init().Add(gov_StepInfo); if (i == 0) { Gov_StepInfo gov_StepInfo2 = this.MakeNewFsi(gov_StepInfo); govInfo.CurrentStepID = gov_StepInfo2.id; govInfo.CurrentStepName = gov_StepInfo2.Step_Name; govInfo.CurrentStepUserList = gov_StepInfo2.userlist; } } Gov.Init().Update(govInfo); Gov_DocInfo gov_DocInfo = new Gov_DocInfo(); gov_DocInfo.AddTime = DateTime.Now; gov_DocInfo.DocPath = govInfo.CurrentDocPath; gov_DocInfo.DocBody = govInfo.DocBody; gov_DocInfo.Flow_ID = govInfo.id; gov_DocInfo.UserDepName = this.DepName; gov_DocInfo.UserID = Convert.ToInt32(this.Uid); gov_DocInfo.UserRealName = this.RealName; Gov_Doc.Init().Add(gov_DocInfo); string[] array = this.userlist.Value.Split(new char[] { ',' }); for (int i = 0; i < array.Length; i++) { if (array[i].Trim() != "") { string[] array2 = array[i].Split(new char[] { '#' }); Gov_RecipientInfo gov_RecipientInfo = new Gov_RecipientInfo(); gov_RecipientInfo.Flow_ID = govInfo.id; gov_RecipientInfo.SignTime = DateTime.Now; gov_RecipientInfo.UserRealName = array2[0]; gov_RecipientInfo.UserID = Convert.ToInt32(array2[1].Trim()); gov_RecipientInfo.UserDepName = array2[2]; Gov_Recipient.Init().Add(gov_RecipientInfo); } } string str = HttpContext.Current.Server.HtmlEncode("您好!新建 发文拟稿成功!"); base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=" + base.Request.Url.AbsoluteUri + "&tip=" + str); } else { base.Response.Write("<script>alert('审批人员或签收人员 不能为空!')</script>"); } } else { base.Response.Write("<script>alert('公文拟稿 没有审批步骤!');window.location='Gov_Manage.aspx'</script>"); } }
private void Show(string nid) { GovInfo byId = Gov.Init().GetById(Convert.ToInt32(nid)); this.DocBody.InnerHtml = byId.DocBody; IList all = Gov_Recipient.Init().GetAll("UserID=" + this.Uid + " and Flow_ID=" + base.Request.QueryString["fl"], null); if (all.Count > 0) { Gov_RecipientInfo gov_RecipientInfo = all[0] as Gov_RecipientInfo; this.ViewState["gi"] = gov_RecipientInfo; if (gov_RecipientInfo.Sign == 0 && byId.Status == 1) { this.pals.Visible = true; } } this.NewsTitle.InnerText = byId.Flow_Name; this.Creator.InnerText = byId.CreatorRealName + " (" + byId.CreatorDepName + ")"; this.addtime.InnerText = Utils.ConvertDate2(byId.AddTime); this.Page.Title = "公文签收:" + byId.Flow_Name; this.fjs = "<span style='color:#006600;'>相关文件</span>:<br>"; if (!string.IsNullOrEmpty(byId.Flow_Files)) { string[] array = byId.Flow_Files.Split(new char[] { '|' }); for (int i = 0; i < array.Length; i++) { if (array[i].Trim() != "") { int num = array[i].LastIndexOf('/') + 1; string arg = array[i].Substring(num, array[i].Length - num); string s = array[i].Replace("~", ""); this.fjs += string.Format(this.fj, base.Server.UrlEncode(s), arg); } } } if (!string.IsNullOrEmpty(byId.Remark)) { this.sm = "<span style='color:#006600;'>简要说明</span>:<br>" + byId.Remark + "<br><br>"; } if (byId.IsValid == 0) { this.gd = "<br><span style='color:#006600;'>归档日期</span>:<br>所有人签收完 自动归档.<br><br>"; } else { this.gd = "<br><span style='color:#006600;'>归档日期</span>:<br>" + Utils.ConvertDate3(byId.ValidTime) + "."; } string innerHtml; if (!string.IsNullOrEmpty(byId.DocNo)) { innerHtml = "发文字号:" + byId.DocNo; } else { innerHtml = "发文字号:无"; } this.top.InnerHtml = innerHtml; }
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> 条 记录数据"; }
private void Show(string type) { 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); if (type == "verify") { this.flow_list = ">> 我的审批"; string cmdText; if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"])) { string text = base.Request.QueryString["keywords"]; string text2 = string.Concat(new string[] { " (Flow_Name like '%", text, "%' or CreatorRealName like '%", text, "%' ) " }); cmdText = string.Concat(new string[] { "select a.* from Gov a where a.status=0 and a.CurrentStepUserList like '%#", this.Uid, "#%' and a.CurrentStepID not in (select b.OperationStepID from Gov_StepAction b where b.UserID=", this.Uid, " and b.FlowID=a.id ) and ", text2 }); using (DataSet dataSet = MsSqlOperate.ExecuteDataset(CommandType.Text, cmdText, new SqlParameter[0])) { this.CutPage(dataSet, "verify"); goto IL_2F0; } } cmdText = string.Concat(new string[] { "select a.* from Gov a where a.status=0 and a.CurrentStepUserList like '%#", this.Uid, "#%' and a.CurrentStepID not in (select b.OperationStepID from Gov_StepAction b where b.UserID=", this.Uid, " and b.FlowID=a.id ) order by a.id desc" }); if (!string.IsNullOrEmpty(base.Request.QueryString["td"])) { cmdText = string.Concat(new string[] { "select a.* from Gov a where a.comid=", base.Request.QueryString["td"], " and a.status=0 and a.CurrentStepUserList like '%#", this.Uid, "#%' and a.CurrentStepID not in (select b.OperationStepID from Gov_StepAction b where b.UserID=", this.Uid, " and b.FlowID=a.id ) order by a.id desc" }); } using (DataSet dataSet = MsSqlOperate.ExecuteDataset(CommandType.Text, cmdText, new SqlParameter[0])) { this.CutPage(dataSet, "verify"); } } IL_2F0: if (type == "verified") { this.flow_list = ">> 已经批阅"; IList all; if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"])) { string text = base.Request.QueryString["keywords"]; string text2 = string.Concat(new string[] { "(Flow_Name like '%", text, "%' or CreatorRealName like '%", text, "%' ) and " }); all = Gov.Init().GetAll(text2 + " HasOperatedUserList like '%#" + this.Uid + "#%'", "order by id desc"); } else { if (string.IsNullOrEmpty(base.Request.QueryString["td"])) { all = Gov.Init().GetAll("HasOperatedUserList like '%#" + this.Uid + "#%'", "order by id desc"); } else { all = Gov.Init().GetAll(string.Concat(new string[] { "comid=", base.Request.QueryString["td"], " and HasOperatedUserList like '%#", this.Uid, "#%'" }), "order by id desc"); } } this.CutPage(all, "verified"); } if (type == "apply") { this.flow_list = ">> 我的发文"; IList all; if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"])) { string text = base.Request.QueryString["keywords"]; string text2 = string.Concat(new string[] { "(Flow_Name like '%", text, "%' or CreatorRealName like '%", text, "%' ) and " }); all = Gov.Init().GetAll(text2 + " CreatorID=" + this.Uid, "order by id desc"); } else { if (string.IsNullOrEmpty(base.Request.QueryString["td"])) { all = Gov.Init().GetAll("CreatorID=" + this.Uid, "order by id desc"); } else { all = Gov.Init().GetAll("comid=" + base.Request.QueryString["td"] + " and CreatorID=" + this.Uid, "order by id desc"); } } this.CutPage(all, "apply"); } }
public static Uri GetUri(Gov.Sec.SecForm secForm) { return secForm?.HtmlFormLink; }
protected void VerifyStep_Btn(object sender, EventArgs e) { GovInfo byId = Gov.Init().GetById(Convert.ToInt32(base.Request.QueryString["fl"])); string a = ""; List<string> list = new List<string>(); if (byId.CurrentStepUserList.Contains(",") && byId.CurrentStepUserList.Contains("#") && byId.Status == 0) { string[] array = byId.CurrentStepUserList.Split(new char[] { ',' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; if (text.Contains("#")) { list.Add(text.Split(new char[] { '#' })[1]); } } } if (list.Contains(this.Uid)) { a = this.Uid; } if (a != "") { Gov_StepInfo gov_StepInfo = this.ViewState["CurrentStep"] as Gov_StepInfo; Gov_StepActionInfo gov_StepActionInfo = new Gov_StepActionInfo(); gov_StepActionInfo.AddTime = DateTime.Now; gov_StepActionInfo.FlowID = Convert.ToInt32(base.Request.QueryString["fl"]); gov_StepActionInfo.Operation = 1; gov_StepActionInfo.OperationStepID = gov_StepInfo.id; gov_StepActionInfo.OperationWord = "(同意) :" + base.Request.Form["FlowRemark"]; gov_StepActionInfo.UserDepName = this.DepName; gov_StepActionInfo.UserID = Convert.ToInt32(this.Uid); gov_StepActionInfo.UserRealName = this.RealName; gov_StepActionInfo.OperationStepName = gov_StepInfo.Step_Name; if (gov_StepInfo.IsEnd == 1) { Gov_StepAction.Init().Add(gov_StepActionInfo); GovInfo govInfo = byId; this.AddDoc(govInfo.id, gov_StepActionInfo.id); govInfo.CurrentDocPath = this.filepath.Value; if (!this.IsAllVerifid()) { GovInfo expr_219 = govInfo; string hasOperatedUserList = expr_219.HasOperatedUserList; expr_219.HasOperatedUserList = string.Concat(new string[] { hasOperatedUserList, this.RealName, "#", this.Uid, "#", this.DepName, "," }); govInfo.Flow_Files = this.UpdateFiles(); Gov.Init().Update(govInfo); MessageBox.ShowAndRedirect(this, "公文成功审批!", "AppMenu.aspx"); } else { GovInfo expr_2A4 = govInfo; string hasOperatedUserList = expr_2A4.HasOperatedUserList; expr_2A4.HasOperatedUserList = string.Concat(new string[] { hasOperatedUserList, this.RealName, "#", this.Uid, "#", this.DepName, "," }); govInfo.Flow_Files = this.UpdateFiles(); Gov.Init().Update(govInfo); this.FinishFlow(); MessageBox.ShowAndRedirect(this, "成功操作,公文已签发!", "AppMenu.aspx"); } } else { IList all = Gov_Step.Init().GetAll("isact=0 and flow_id=" + base.Request.QueryString["fl"], "order by id asc"); if (all != null) { int num = 0; foreach (object current in all) { Gov_StepInfo gov_StepInfo2 = current as Gov_StepInfo; if (gov_StepInfo2.Acts == gov_StepInfo.Acts) { num = all.IndexOf(current) + 1; } } if (num != 0) { Gov_StepAction.Init().Add(gov_StepActionInfo); GovInfo govInfo = byId; this.AddDoc(govInfo.id, gov_StepActionInfo.id); govInfo.CurrentDocPath = this.filepath.Value; if (this.IsAllVerifid()) { Gov_StepInfo gov_StepInfo3 = this.MakeNewFsi((Gov_StepInfo)all[num]); govInfo.CurrentStepID = gov_StepInfo3.id; govInfo.CurrentStepName = gov_StepInfo3.Step_Name; govInfo.CurrentStepUserList = gov_StepInfo3.userlist; } GovInfo expr_462 = govInfo; string hasOperatedUserList = expr_462.HasOperatedUserList; expr_462.HasOperatedUserList = string.Concat(new string[] { hasOperatedUserList, this.RealName, "#", this.Uid, "#", this.DepName, "," }); govInfo.Flow_Files = this.UpdateFiles(); Gov.Init().Update(govInfo); MessageBox.ShowAndRedirect(this, "已成功操作!", "AppMenu.aspx"); } } } } }
private void Show(string fid) { GovInfo byId = Gov.Init().GetById(Convert.ToInt32(fid)); if (byId.CurrentStepUserList.Contains("#" + this.Uid + "#") || byId.HasOperatedUserList.Contains("#" + this.Uid + "#") || byId.CreatorID == Convert.ToInt32(this.Uid) || this.Modules.Contains("38")) { this.ViewState["Flow"] = byId; this.filepath.Value = byId.CurrentDocPath; this.DocBody.InnerHtml = byId.DocBody; this.Flow_Name1.InnerText = byId.Flow_Name; this.ModelType.InnerText = this.GetModelType(byId.ComID); this.secret.InnerText = byId.Secret; this.status.InnerText = this.GetStatus(byId.Status); this.creator.InnerText = byId.CreatorRealName + "(" + byId.CreatorDepName + ")"; this.addtime.InnerText = Utils.ConvertDate2(byId.AddTime); this.DocNo.InnerText = byId.DocNo; this.vlidtime.InnerText = "自动归档"; if (byId.IsValid == 1) { this.vlidtime.InnerText = byId.ValidTime.ToString("yyyy-MM-dd") + " 之前归档"; } this.currentstepname.InnerText = byId.CurrentStepName; if (!string.IsNullOrEmpty(byId.Remark)) { this.bodys.InnerHtml = byId.Remark.Replace("\n", "<br>"); } if (!string.IsNullOrEmpty(byId.Flow_Files) && byId.Flow_Files.Contains("|")) { List<TmpInfo> list = new List<TmpInfo>(); string[] array = byId.Flow_Files.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 tmp = array[i].Substring(num, array[i].Length - num); string s = array[i].Replace("~", ""); tmpInfo.Tmp1 = array[i]; tmpInfo.Tmp2 = tmp; tmpInfo.Tmp3 = base.Server.UrlEncode(s); list.Add(tmpInfo); } } this.rpt.DataSource = list; this.rpt.DataBind(); } Gov_StepInfo byId2 = Gov_Step.Init().GetById(byId.CurrentStepID); this.ViewState["CurrentStep"] = byId2; string text = ""; IList all = Gov_StepAction.Init().GetAll(string.Concat(new object[] { "OperationStepID=", byId.CurrentStepID, " and FlowID=", byId.id }), "order by id asc"); string[] array2 = byId.CurrentStepUserList.Split(new char[] { ',' }); List<string> list2 = new List<string>(); for (int i = 0; i < array2.Length; i++) { if (array2[i].Contains("#")) { list2.Add(array2[i].Split(new char[] { '#' })[0].Trim()); } } foreach (object current in all) { Gov_StepActionInfo gov_StepActionInfo = current as Gov_StepActionInfo; if (gov_StepActionInfo.Operation == 1) { text = text + gov_StepActionInfo.UserRealName + "[已审/同意], "; if (list2.Contains(gov_StepActionInfo.UserRealName.Trim())) { list2.Remove(gov_StepActionInfo.UserRealName.Trim()); } } if (gov_StepActionInfo.Operation == -1) { text = text + gov_StepActionInfo.UserRealName + "[已阅/不同意], "; if (list2.Contains(gov_StepActionInfo.UserRealName.Trim())) { list2.Remove(gov_StepActionInfo.UserRealName.Trim()); } } } foreach (string current2 in list2) { text = text + current2 + "[未操作], "; } this.currentuserlist.InnerHtml = text; IList all2 = Gov_StepAction.Init().GetAll("FlowID=" + byId.id, "order by id asc"); IList all3 = Gov_Doc.Init().GetAll("StepAction_ID=0 and flow_id=" + byId.id, null); Gov_DocInfo gov_DocInfo = all3[0] as Gov_DocInfo; base.Server.UrlEncode(gov_DocInfo.DocPath.Replace("~", "")); string text2 = this.yjs; this.yjs = string.Concat(new string[] { text2, "0、<u>发文拟稿</u> ", byId.CreatorRealName, " 在 ", Utils.ConvertDate2(byId.AddTime), " 发起公文(初稿) <br>" }); foreach (object current in all2) { Gov_StepActionInfo gov_StepActionInfo = current as Gov_StepActionInfo; IList all4 = Gov_Doc.Init().GetAll("StepAction_ID=" + gov_StepActionInfo.id, null); if (all4.Count == 0) { object obj = this.yjs; this.yjs = string.Concat(new object[] { obj, all2.IndexOf(current) + 1, "、<u>", gov_StepActionInfo.OperationStepName, "</u> ", gov_StepActionInfo.UserRealName, " 在 ", Utils.ConvertDate2(gov_StepActionInfo.AddTime), " 已阅 <strong style='color:#ff0000'>", gov_StepActionInfo.OperationWord, "</strong><br>" }); } else { Gov_DocInfo gov_DocInfo2 = all4[0] as Gov_DocInfo; base.Server.UrlEncode(gov_DocInfo2.DocPath.Replace("~", "")); object obj = this.yjs; this.yjs = string.Concat(new object[] { obj, all2.IndexOf(current) + 1, "、<u>", gov_StepActionInfo.OperationStepName, "</u> ", gov_StepActionInfo.UserRealName, " 在 ", Utils.ConvertDate2(gov_StepActionInfo.AddTime), " 已阅 <strong style='color:#ff0000'>", gov_StepActionInfo.OperationWord, "</strong><br>" }); } } if (list2.Contains(this.RealName.Trim()) && byId.Status == 0) { this.displays.Visible = true; this.b1.Enabled = true; this.b2.Enabled = true; if (byId2.RightToFinish == 1) { this.b3.Visible = true; this.b3.Enabled = true; } } } else { base.Response.Write("<script>alert('您没有查看权限');window.location='AppList.aspx?action=verify';</script>"); } }