예제 #1
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          id   = Convert.ToInt32(htmlInputCheckBox.Value);
        Sys_SealInfo byId = Sys_Seal.Init().GetById(id);

        Help.DeleteFiles(byId.FilePath);
        Sys_Seal.Init().Delete(id);
        this.Show();
    }
예제 #2
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          id   = Convert.ToInt32(htmlInputCheckBox.Value);
             Sys_SealInfo byId = Sys_Seal.Init().GetById(id);
             Help.DeleteFiles(byId.FilePath);
             Sys_Seal.Init().Delete(id);
         }
     }
     this.Show();
 }
예제 #3
0
    private void Show(string id)
    {
        Sys_SealInfo byId = Sys_Seal.Init().GetById(Convert.ToInt32(id));

        this.ViewState["sm"] = byId;
        this.Status.Checked  = Convert.ToBoolean(byId.Status);
        this.SealName.Value  = byId.SealName;
        this.TagName.Value   = byId.TagName;
        this.Notes.Value     = byId.Notes;
        if (byId.Uid > 0)
        {
            this.uids.SelectedValue = string.Concat(byId.Uid);
        }
        if (!string.IsNullOrEmpty(byId.FilePath))
        {
            this.PerPic.ImageUrl = byId.FilePath;
        }
    }
예제 #4
0
    private void UpDate()
    {
        Sys_SealInfo sys_SealInfo = this.ViewState["sm"] as Sys_SealInfo;

        sys_SealInfo.Status  = Convert.ToInt32(this.Status.Checked);
        sys_SealInfo.AddTime = DateTime.Now;
        sys_SealInfo.Notes   = this.Notes.Value;
        if (this.PWD.Value.Trim() != "")
        {
            sys_SealInfo.PWD = this.PWD.Value.Trim();
        }
        sys_SealInfo.SealName = this.SealName.Value;
        sys_SealInfo.TagName  = this.TagName.Value;
        sys_SealInfo.Uid      = Convert.ToInt32(base.Request.Form["uids"]);
        if (this.Fup.HasFile)
        {
            sys_SealInfo.FilePath = this.SaveJPG(this.Fup);
        }
        Sys_Seal.Init().Update(sys_SealInfo);
        string str = HttpContext.Current.Server.HtmlEncode("您好!印章/签名已编辑成功!");

        base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=" + base.Request.Url.AbsoluteUri + "&tip=" + str);
    }
예제 #5
0
    private void Show(string fid)
    {
        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 sqlParameter5 = new SqlParameter();

        sqlParameter5.Direction     = ParameterDirection.Output;
        sqlParameter5.ParameterName = "@pt4";
        sqlParameter5.Size          = 4;
        SqlParameter[] cmdParms = new SqlParameter[]
        {
            sqlParameter2,
            sqlParameter3,
            sqlParameter4,
            sqlParameter5,
            sqlParameter
        };
        MsSqlOperate.ExecuteNonQuery(CommandType.StoredProcedure, "Flows_GetUserFlowBoxCount", cmdParms);
        this.wdpy.InnerText = string.Concat(sqlParameter2.Value);
        this.yjpy.InnerText = string.Concat(sqlParameter3.Value);
        this.wdsq.InnerText = string.Concat(sqlParameter4.Value);
        this.view.InnerText = string.Concat(sqlParameter5.Value);
        FlowsInfo byId = Flows.Init().GetById(Convert.ToInt32(fid));

        if (byId.CurrentStepUserList.Contains("#" + this.Uid + "#") || byId.HasOperatedUserList.Contains("#" + this.Uid + "#") || byId.ViewUserList.Contains("#" + this.Uid + "#") || byId.CreatorID == Convert.ToInt32(this.Uid) || this.Modules.Contains("28"))
        {
            this.ViewState["Flow"]    = byId;
            this.filepath.Value       = byId.CurrentDocPath;
            this.DocBody.Value        = byId.DocBody;
            this.Flow_Name1.InnerText = byId.Flow_Name;
            this.ModelType.InnerText  = this.GetModelType(byId.ComID);
            this.ke_isread            = ", afterCreate : function(id) { KE.toolbar.disable(id, []); KE.readonly(id); KE.g[id].newTextarea.disabled = true; } ";
            this.url = this.url.ToLower().Replace("/manage/flow", "");
            this.LoadOriginalFile   = this.url + byId.CurrentDocPath.Replace("~", "");
            this.tuli.InnerHtml     = " <a href='Flow_Graph.aspx?fl=" + byId.id + "' target=_blank>[点击查看]</a>";
            this.flowNo.InnerText   = byId.AddTime.Year + "-" + (100000 + byId.id);
            this.status.InnerText   = this.GetStatus(byId.Status);
            this.creator.InnerText  = byId.CreatorRealName + "(" + byId.CreatorDepName + ")";
            this.addtime.InnerText  = Utils.ConvertDate2(byId.AddTime);
            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>");
            }
            IList          all           = Flows_Doc.Init().GetAll("flow_id=" + byId.id, "order by id asc");
            List <TmpInfo> list          = new List <TmpInfo>();
            List <TmpInfo> list2         = new List <TmpInfo>();
            List <TmpInfo> list3         = new List <TmpInfo>();
            Flows_DocInfo  flows_DocInfo = null;
            int            j;
            for (int i = 0; i < all.Count; i++)
            {
                Flows_DocInfo flows_DocInfo2 = all[i] as Flows_DocInfo;
                if (i == all.Count - 1)
                {
                    flows_DocInfo = flows_DocInfo2;
                }
                if (flows_DocInfo2.DocPath.Contains("|"))
                {
                    string[] array = flows_DocInfo2.DocPath.Split(new char[]
                    {
                        '|'
                    });
                    for (j = 0; j < array.Length; j++)
                    {
                        if (array[j].Trim() != "")
                        {
                            TmpInfo tmpInfo = new TmpInfo();
                            int     num     = array[j].LastIndexOf('/') + 1;
                            string  tmp     = array[j].Substring(num, array[j].Length - num);
                            string  s       = array[j].Replace("~", "");
                            tmpInfo.Tmp1 = array[j];
                            tmpInfo.Tmp2 = tmp;
                            tmpInfo.Tmp3 = base.Server.UrlEncode(s);
                            tmpInfo.Tmp4 = string.Concat(new string[]
                            {
                                " &nbsp;&nbsp; <span style='color:#999'> &nbsp; - (",
                                flows_DocInfo2.UserRealName,
                                "&nbsp;",
                                Utils.ConvertDate1(flows_DocInfo2.AddTime),
                                ")</span>"
                            });
                            list.Add(tmpInfo);
                        }
                    }
                }
            }
            if (flows_DocInfo != null && flows_DocInfo.DocPath.Contains("|"))
            {
                string[] array = flows_DocInfo.DocPath.Split(new char[]
                {
                    '|'
                });
                for (j = 0; j < array.Length; j++)
                {
                    if (array[j].Trim() != "")
                    {
                        TmpInfo tmpInfo = new TmpInfo();
                        int     num     = array[j].LastIndexOf('/') + 1;
                        string  tmp     = array[j].Substring(num, array[j].Length - num);
                        string  s       = array[j].Replace("~", "");
                        tmpInfo.Tmp1 = array[j];
                        tmpInfo.Tmp2 = tmp;
                        tmpInfo.Tmp3 = base.Server.UrlEncode(s);
                        tmpInfo.Tmp4 = string.Concat(new string[]
                        {
                            " &nbsp;&nbsp; <span style='color:#999'> &nbsp; - (",
                            flows_DocInfo.UserRealName,
                            "&nbsp;",
                            Utils.ConvertDate1(flows_DocInfo.AddTime),
                            ")</span>"
                        });
                        list2.Add(tmpInfo);
                    }
                }
            }
            j = 0;
            //IL_74B:
            while (j < list2.Count)
            {
                TmpInfo tmpInfo2 = list2[j];
                for (int i = 0; i < list.Count; i++)
                {
                    TmpInfo tmpInfo3 = list[i];
                    if (tmpInfo2.Tmp1 == tmpInfo3.Tmp1)
                    {
                        tmpInfo2.Tmp4 = tmpInfo3.Tmp4;
                        //                     //IL_73C:
                        //list3.Add(tmpInfo2);
                        //j++;
                        ////goto IL_74B;
                        break;
                    }
                }
                list3.Add(tmpInfo2);
                j++;
                //goto IL_73C;
            }
            if (list3.Count > 0)
            {
                this.rpt.DataSource = list3;
                this.rpt.DataBind();
            }
            Flows_StepInfo byId2 = Flows_Step.Init().GetById(byId.CurrentStepID);
            this.ViewState["CurrentStep"] = byId2;
            string text = "";
            IList  all2 = Flows_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> list4 = new List <string>();
            for (j = 0; j < array2.Length; j++)
            {
                if (array2[j].Contains("#"))
                {
                    list4.Add(array2[j].Split(new char[]
                    {
                        '#'
                    })[0].Trim());
                }
            }
            foreach (object current in all2)
            {
                Flows_StepActionInfo flows_StepActionInfo = current as Flows_StepActionInfo;
                if (flows_StepActionInfo.Operation == 1)
                {
                    text = text + flows_StepActionInfo.UserRealName + "[已签/同意], ";
                    if (list4.Contains(flows_StepActionInfo.UserRealName.Trim()))
                    {
                        list4.Remove(flows_StepActionInfo.UserRealName.Trim());
                    }
                }
                if (flows_StepActionInfo.Operation == -1)
                {
                    text = text + flows_StepActionInfo.UserRealName + "[已签/不同意], ";
                    if (list4.Contains(flows_StepActionInfo.UserRealName.Trim()))
                    {
                        list4.Remove(flows_StepActionInfo.UserRealName.Trim());
                    }
                }
            }
            foreach (string current2 in list4)
            {
                text = text + current2 + "[未审批], ";
            }
            this.currentuserlist.InnerHtml = text;
            IList         all3           = Flows_StepAction.Init().GetAll("FlowID=" + byId.id, "order by id asc");
            IList         all4           = Flows_Doc.Init().GetAll("StepAction_ID=0 and flow_id=" + byId.id, null);
            Flows_DocInfo flows_DocInfo3 = all4[0] as Flows_DocInfo;
            base.Server.UrlEncode(flows_DocInfo3.DocPath.Replace("~", ""));
            object obj = this.yjs;
            this.yjs = string.Concat(new object[]
            {
                obj,
                "0、<u>流程申请</u> &nbsp;&nbsp; ",
                byId.CreatorRealName,
                " 在 ",
                Utils.ConvertDate2(byId.AddTime),
                " 发起流程(申请人) &nbsp;&nbsp; <a href='../../Manage/Flow/DocBodyView.aspx?gid=",
                flows_DocInfo3.id,
                "' target='_blank' ><strong>查看申请人原件</strong></a> <br>"
            });
            foreach (object current in all3)
            {
                Flows_StepActionInfo flows_StepActionInfo = current as Flows_StepActionInfo;
                IList all5 = Flows_Doc.Init().GetAll("StepAction_ID=" + flows_StepActionInfo.id, null);
                if (all5.Count == 0)
                {
                    obj      = this.yjs;
                    this.yjs = string.Concat(new object[]
                    {
                        obj,
                        all3.IndexOf(current) + 1,
                        "、<u>",
                        flows_StepActionInfo.OperationStepName,
                        "</u> &nbsp;&nbsp; ",
                        flows_StepActionInfo.UserRealName,
                        " 在 ",
                        Utils.ConvertDate2(flows_StepActionInfo.AddTime),
                        " 已审  &nbsp;&nbsp;<strong style='color:#ff0000'>",
                        flows_StepActionInfo.OperationWord,
                        "</strong><br>"
                    });
                }
                else
                {
                    Flows_DocInfo flows_DocInfo4 = all5[0] as Flows_DocInfo;
                    base.Server.UrlEncode(flows_DocInfo4.DocPath.Replace("~", ""));
                    obj      = this.yjs;
                    this.yjs = string.Concat(new object[]
                    {
                        obj,
                        all3.IndexOf(current) + 1,
                        "、<u>",
                        flows_StepActionInfo.OperationStepName,
                        "</u> &nbsp;&nbsp; ",
                        flows_StepActionInfo.UserRealName,
                        " 在 ",
                        Utils.ConvertDate2(flows_StepActionInfo.AddTime),
                        " 已审 ",
                        flows_StepActionInfo.OperationWord,
                        " &nbsp;&nbsp; <a href='../../Manage/Flow/DocBodyView.aspx?gid=",
                        flows_DocInfo4.id,
                        "' target='_blank' ><strong>查看文件变动</strong></a> <br>"
                    });
                }
            }
            if (byId.ViewUserList.Contains(","))
            {
                string[] array3 = byId.ViewUserList.Split(new char[]
                {
                    ','
                });
                for (j = 0; j < array3.Length; j++)
                {
                    if (array3[j].Contains("#"))
                    {
                        HtmlGenericControl expr_CF1 = this.viewuserlist;
                        expr_CF1.InnerText = expr_CF1.InnerText + array3[j].Split(new char[]
                        {
                            '#'
                        })[0] + ",";
                    }
                }
            }
            if (list4.Contains(this.RealName.Trim()) && byId.Status == 0)
            {
                this.ke_isread       = "";
                this.display.Visible = true;
                this.b1.Enabled      = true;
                this.b2.Enabled      = true;
                IList all6 = Sys_Seal.Init().GetAll("uid=" + this.Uid + " and status=1", null);
                if (all6.Count > 0)
                {
                    this.seal.Visible            = true;
                    this.seallist.DataSource     = all6;
                    this.seallist.DataTextField  = "SealName";
                    this.seallist.DataValueField = "id";
                    this.seallist.DataBind();
                }
                if (byId2.RightToFinish == 1)
                {
                    this.b3.Enabled = true;
                }
                if (byId2.IsUserFile == 1)
                {
                    for (j = 0; j < this.rpt.Items.Count; j++)
                    {
                        HtmlInputCheckBox htmlInputCheckBox = this.rpt.Items[j].FindControl("chk") as HtmlInputCheckBox;
                        htmlInputCheckBox.Disabled = false;
                    }
                }
            }
        }
        else
        {
            base.Response.Write("<script>alert('您没有查看权限');window.location='Flow_List.aspx?action=verify';</script>");
        }
    }