示例#1
0
    private void GetMsgDB(int ic)
    {
        DataTable auditUser = FlowAuditAction.GetAuditUser(ic);

        if (auditUser.Rows.Count > 0)
        {
            for (int i = 0; i < auditUser.Rows.Count; i++)
            {
                if (auditUser.Rows[i]["Operator"].ToString() != "")
                {
                    string       xgid         = auditUser.Rows[i]["ID"].ToString();
                    string       text         = "您需要审核:";
                    string       jsyhdm       = auditUser.Rows[i]["Operator"].ToString();
                    userManageDb userManageDb = new userManageDb();
                    text = text + userManageDb.GetUserName(auditUser.Rows[i]["Organiger"].ToString()) + "发起的" + auditUser.Rows[i]["BusinessClassName"].ToString();
                    if (this.ckbIsSendInfo.Checked)
                    {
                        this.getPTDBSJ(xgid, text, jsyhdm);
                    }
                    if (this.ckbIsSendMsg.Checked)
                    {
                        this.GetSms(xgid, text, jsyhdm);
                    }
                }
            }
        }
    }
示例#2
0
    protected void btnStartWF_Click(object sender, System.EventArgs e)
    {
        System.Guid recordID   = new System.Guid(this.HdnRecordID.Value);
        string      value      = this.HdnBusinessCode.Value;
        int         templateId = System.Convert.ToInt32(this.HdnTemplateID.Value);
        string      text       = FlowAuditAction.BeginFlow("999", value, recordID, "", base.UserCode, templateId);

        if (text == "工作流程已成功启动")
        {
            this.Page.ClientScript.RegisterStartupScript(base.GetType(), "err", "alert('" + text + "!');", true);
        }
        else
        {
            if (text == "请先设置当前模块的审核流程")
            {
                this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "alert('" + text + "!');", true);
            }
            else
            {
                if (text == "尚未定义流程,请与系统管理员联系")
                {
                    this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "alert('" + text + "!');", true);
                }
                else
                {
                    this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "if(window.showModalDialog('" + text + "',window,'dialogHeight:180px;dialogWidth:450px;center:1;help:0;status:0;')=='1'){window.location.href=window.location.href};", true);
                }
            }
        }
        this.GVBook.DataBind();
    }
示例#3
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.InstanceCode  = new System.Guid(base.Request["ic"]);
         this.BusinessCode  = base.Request["bc"].ToString();
         this.BusinessClass = base.Request["bcl"].ToString();
         DataTable dataTable = FlowAuditAction.QueryAuditStatus(this.InstanceCode, this.BusinessCode, this.BusinessClass);
         this.dgFlow.DataSource = dataTable;
         this.dgFlow.DataBind();
         int num = 1;
         for (int i = 0; i < dataTable.Rows.Count - 1; i++)
         {
             if (dataTable.Rows[i]["id"].ToString() != dataTable.Rows[i + 1]["id"].ToString())
             {
                 DataGridItem dataGridItem = new DataGridItem(-1, -1, ListItemType.Item);
                 num++;
                 for (int j = 0; j < this.dgFlow.Columns.Count; j++)
                 {
                     TableCell tableCell = new TableCell();
                     tableCell.Text = "&nbsp;";
                     dataGridItem.Cells.Add(tableCell);
                 }
                 dataGridItem.BackColor   = Color.FromName("#E4ECF1");
                 dataGridItem.BorderColor = Color.FromName("#E4ECF1");
                 this.dgFlow.Controls[0].Controls.AddAt(i + num, dataGridItem);
             }
         }
     }
 }
示例#4
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.BusinessCode  = base.Request["bcode"];
         this.BusinessClass = base.Request["bclass"];
         this.RecordID      = new System.Guid(base.Request["fid"]);
         this.ProjectCode   = base.Request["prjguid"].ToString();
         if (string.IsNullOrEmpty(this.ProjectCode))
         {
             this.ProjectCode = FlowAuditAction.GetProject(this.BusinessCode, this.RecordID);
         }
         this.txtReceiver.Attributes["ReadOnly"] = "true";
         if (this.CheckTemplate(base.Request["bcode"], base.Request["bclass"], new System.Guid(base.Request["fid"]), base.Request["prjguid"]) == "1")
         {
             this.JS.Text        = "top.ui.alert('请先设置当前模块的审核流程');$(parent.document).find('.ui-icon-closethick').each(function() {this.click();});";
             this.BtnAdd.Enabled = false;
             return;
         }
         this.SetViewState(base.Request["bcode"], base.Request["bclass"], new System.Guid(base.Request["fid"]), base.Request["prjguid"], this.Session["yhdm"].ToString());
         this.UserCode = this.Session["yhdm"].ToString();
         this.CreateTemplateInfo();
         this.ddltTemplate.Attributes["onchange"] = "selectTemplate();";
         this.BtnAdd.Attributes["OnClick"]        = base.GetPostBackEventReference(this.BtnAdd) + ";this.disabled=true;";
     }
 }
示例#5
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack && base.Request["rid"] != null)
     {
         this.RecordID      = System.Convert.ToInt32(base.Request["rid"].ToString());
         this.BusinessCode  = base.Request["bc"].ToString();
         this.BusinessClass = base.Request["bcl"].ToString();
         DataTable dataTable = FlowAuditAction.OrganigerCode(this.RecordID);
         if (dataTable.Rows.Count > 0)
         {
             this.frmPage.Attributes["src"] = string.Concat(new string[]
             {
                 "AuditViewPrint.aspx?ic=",
                 dataTable.Rows[0]["InstanceCode"].ToString(),
                 "&bc=",
                 this.BusinessCode,
                 "&bcl=",
                 this.BusinessClass
             });
         }
         PTDBSJAction pTDBSJAction = new PTDBSJAction();
         pTDBSJAction.Delete(string.Concat(new object[]
         {
             " v_lxbm = '017' and v_YHDM = '",
             this.Session["yhdm"].ToString(),
             "' and i_XGID = '",
             this.RecordID,
             "'"
         }), 1);
     }
 }
示例#6
0
 protected void TVDept_SelectedNodeChanged(object sender, System.EventArgs e)
 {
     if (this.TVDept.SelectedValue != "" && this.TVDept.SelectedValue.Substring(0, 1) != "r")
     {
         this.btnAdd.Disabled     = false;
         this.HdnTemplateID.Value = this.TVDept.SelectedValue;
         this.ViewState["tid"]    = this.TVDept.SelectedValue;
         DataTable dataTable = FlowTemplateAction.QueryOneTemplate(System.Convert.ToInt32(this.TVDept.SelectedValue));
         if (dataTable.Rows.Count > 0)
         {
             this.HdnBusinessClass.Value = dataTable.Rows[0]["BusinessClass"].ToString();
         }
         this.BindView(base.UserCode, System.Convert.ToInt32(this.TVDept.SelectedValue));
         DataTable fistDt = FlowAuditAction.GetFistDt(System.Convert.ToInt32(this.HdnTemplateID.Value.ToString()));
         if (fistDt.Rows.Count > 0 && fistDt.Rows[0][3].ToString() != "1")
         {
             string text = fistDt.Rows[0][2].ToString();
             this.hdflisDuty.Value = "1";
             this.hdflisName.Value = "1";
             if (!string.IsNullOrEmpty(text))
             {
                 if (fistDt.Rows[0][1].ToString() == "2" || fistDt.Rows[0][1].ToString() == "1")
                 {
                     if (!FlowAuditAction.GetUsersis(text))
                     {
                         this.hdflisName.Value = "0";
                     }
                     else
                     {
                         this.hdflisName.Value = "1";
                     }
                 }
                 else
                 {
                     if (fistDt.Rows[0][1].ToString() == "3" || fistDt.Rows[0][1].ToString() == "4" || fistDt.Rows[0][1].ToString() == "5")
                     {
                         DataTable role = FlowAuditAction.GetRole(text);
                         if (role.Rows.Count <= 0)
                         {
                             this.hdflisDuty.Value = "0";
                         }
                         else
                         {
                             this.hdflisDuty.Value = "1";
                         }
                     }
                 }
             }
         }
     }
     else
     {
         this.btnAdd.Disabled = true;
         DataTable dataSource = new DataTable();
         this.GVBook.DataSource = dataSource;
         this.GVBook.DataBind();
     }
     this.hdfNodeValue.Value = this.TVDept.SelectedValue;
 }
示例#7
0
 protected void DutyBind()
 {
     this.IBPick.ImageUrl = "../../images/contact.gif";
     this.IBPick.Enabled  = true;
     this.DDLSuperordinateDuty.Enabled        = true;
     this.DDLSuperordinateDuty.DataTextField  = "v_xm";
     this.DDLSuperordinateDuty.DataValueField = "v_yhdm";
     this.DDLSuperordinateDuty.DataSource     = FlowAuditAction.SuperordinateDutyYH(this.Session["yhdm"].ToString());
     this.DDLSuperordinateDuty.DataBind();
 }
示例#8
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.TemplateID = System.Convert.ToInt32(base.Request["tid"]);
         this.addFlowChart_top1();
         FlowChartAction.display_FlowChartView(this.tbFlowChart, this.TemplateID);
         this.LbRemark.Text = FlowAuditAction.strTempLateRemark(this.TemplateID);
     }
 }
示例#9
0
    private void GetPageDuring()
    {
        DataTable during = FlowAuditAction.GetDuring(this.InstanceID);

        if (during.Rows.Count > 0 && during.Rows[0]["During"].ToString() != "")
        {
            this.LbDuring.Text = during.Rows[0]["During"].ToString();
            this.GetPageDuringInfo(System.Convert.ToInt32(during.Rows[0]["During"]), System.Convert.ToDateTime(during.Rows[0]["ArriveTime"]));
        }
    }
示例#10
0
    protected string CheckTemplate(string bcode, string bclass, System.Guid fid, string prjguid)
    {
        string a = FlowAuditAction.BeginFlow(this.BusinessCode, this.BusinessClass, fid, prjguid, this.Session["yhdm"].ToString());

        if (a == "请先设置当前模块的审核流程")
        {
            return("1");
        }
        return("2");
    }
示例#11
0
 protected void MsgOrganiger()
 {
     if (FlowAuditAction.IsAuditOver(this.InstanceID))
     {
         DataTable dataTable = FlowAuditAction.OrganigerCode(this.InstanceID);
         if (dataTable.Rows.Count > 0)
         {
             this.getOrganiger(this.InstanceID.ToString(), "您发起" + dataTable.Rows[0]["BusinessClassName"].ToString() + "的流程已审核完结!", dataTable.Rows[0]["Organiger"].ToString());
         }
     }
 }
示例#12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Cache.SetNoStore();
     if (!this.Page.IsPostBack)
     {
         this.InstanceCode  = new Guid(base.Request["ic"]);
         this.BusinessCode  = base.Request["bc"].ToString();
         this.BusinessClass = base.Request["bcl"].ToString();
         this.AddNewTr(FlowAuditAction.QueryAuditStatus(this.InstanceCode, this.BusinessCode, this.BusinessClass));
     }
 }
示例#13
0
    protected void btnStartWF_Click(object sender, EventArgs e)
    {
        Guid   recordID = new Guid(this.hfRecord.Value);
        string text     = FlowAuditAction.BeginFlow("005", "005", recordID, "", base.UserCode);

        if (text == "工作流程已成功启动")
        {
            this.JS.Text = "alert('" + text + "!');document.getElementById(\"btnRefresh\").click();";
            return;
        }
        this.JS.Text = "if(window.showModalDialog('" + text + "',window,'dialogHeight:180px;dialogWidth:450px;center:1;help:0;status:0;')=='1'){document.getElementById(\"btnRefresh\").click();}; ";
    }
示例#14
0
 private void btnClear_Click(object sender, System.EventArgs e)
 {
     if (FlowAuditAction.DelSecondUser(base.UserCode))
     {
         this.txtSecondUser.Text = "";
         this.hdnUserCode.Value  = "";
         this.JS.Text            = "alert('删除成功!');";
         this.btnUpd.Visible     = false;
         this.btnOK.Visible      = true;
         return;
     }
     this.JS.Text = "alert('删除失败!');";
 }
示例#15
0
    protected void BtnAdd_Click(object sender, System.EventArgs e)
    {
        string[] array = new string[3];
        if (this.TemplateCount > 1)
        {
            array = FlowAuditAction.GetOffsetNodeFirst(this.TemplateID, this.BusinessClass, this.RecordID);
            this.hdnNodeId.Value      = array[0].ToString();
            this.hdnOrderNumber.Value = array[1].ToString();
        }
        else
        {
            if (this.TemplateCount == 1)
            {
                if (this.OffsetCount > 1)
                {
                    this.hdnNodeId.Value      = this.NodeID.ToString();
                    this.hdnOrderNumber.Value = "1";
                }
                else
                {
                    array = FlowAuditAction.GetOffsetNodeFirst(this.TemplateID, this.BusinessClass, this.RecordID);
                    this.hdnNodeId.Value      = array[0].ToString();
                    this.hdnOrderNumber.Value = array[1].ToString();
                }
            }
        }
        int offsetorder = System.Convert.ToInt32(this.hdnOrderNumber.Value.ToString().Trim());

        this.NodeID = System.Convert.ToInt32(this.hdnNodeId.Value.ToString().Trim());
        if (this.hdnNodeId.Value.Trim() == "0")
        {
            this.JS.Text = "alert('工作流程多分支模板未设置分支条件!')";
            return;
        }
        if (FlowAuditAction.BeginFlow(this.BusinessClass, this.BusinessCode, this.RecordID, this.TemplateID, this.NodeID, offsetorder, this.ProjectCode, this.UserCode))
        {
            if (FlowAuditAction.FirstNodeIsSelected(this.TemplateID))
            {
                if (this.DDLSuperordinateDuty.Items.Count > 0)
                {
                    this.hdnReceiver.Value = this.DDLSuperordinateDuty.SelectedValue;
                }
                FlowAuditAction.InsertOperator(this.BusinessClass, this.BusinessCode, this.RecordID, this.hdnReceiver.Value);
            }
            this.JS.Text = "alert('工作流程已成功启动!');window.close();returnValue=true;";
            return;
        }
        this.JS.Text = "alert('请找管理员设置 " + this.LbTemName.Text + " 流程的负责人。');";
    }
示例#16
0
    protected void BtnAudit_Click(object sender, EventArgs e)
    {
        Guid instanceCode = new Guid(this.RecordID.Value);
        bool flag         = FlowAuditAction.BeginFlow("112", instanceCode, 17, this.PrjCode.Value.ToString(), base.UserCode);

        if (flag)
        {
            this.Js.Text = "alert('启动申请审核成功!')";
        }
        else
        {
            this.Js.Text = "alert('启动申请审核失败!')";
        }
        this.Data_Bind();
    }
示例#17
0
    private void btnUpd_Click(object sender, System.EventArgs e)
    {
        string value = this.hdnUserCode.Value;

        System.DateTime dtBegin = System.Convert.ToDateTime(this.txtBeginDate.Text);
        System.DateTime dtEnd   = System.Convert.ToDateTime(this.txtEndDate.Text);
        if (FlowAuditAction.UpdSecondUser(base.UserCode, value, dtBegin, dtEnd))
        {
            this.JS.Text        = "alert('更新成功!');";
            this.btnOK.Visible  = false;
            this.btnUpd.Visible = true;
            return;
        }
        this.JS.Text = "alert('更新失败!');";
    }
示例#18
0
 protected void DLPrint_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     if (e.Item.ItemIndex != -1)
     {
         DataRowView dataRowView = (DataRowView)e.Item.DataItem;
         Image       image       = (Image)e.Item.FindControl("ImgName");
         if (dataRowView["Result"].ToString() == "已通过")
         {
             DataTable dataTable = FlowAuditAction.ImageListPath(dataRowView["Operator"].ToString());
             image.ImageUrl = dataTable.Rows[0]["AuditNameImagePath"].ToString();
             return;
         }
         image.ImageUrl = "/images/blank.gif";
     }
 }
示例#19
0
    protected void BtnApply_Click(object sender, EventArgs e)
    {
        Guid instanceCode = new Guid(this.hdnRecordID.Value);
        bool flag         = FlowAuditAction.BeginFlow("101", instanceCode, 1, this.PrjCode, base.UserCode);

        if (flag)
        {
            this.JS.Text = "alert('启动申请审核成功!')";
        }
        else
        {
            this.JS.Text = "alert('启动申请审核失败!')";
        }
        this.DGrdList_DataBind();
    }
示例#20
0
    protected void SetViewState(string businessCode, string businessClass, System.Guid recordID, string projectCode, string userCode)
    {
        string[]  array     = new string[3];
        DataTable dataTable = FlowTemplateAction.QueryTemplateByClass(businessClass, businessCode, userCode);
        int       count     = dataTable.Rows.Count;

        if (count == 1)
        {
            int num             = System.Convert.ToInt32(dataTable.Rows[0]["TemplateID"].ToString());
            int posPositionNode = FlowChartAction.GetPosPositionNode(0, num);
            if (posPositionNode > 1)
            {
                array = FlowAuditAction.SelectOffSet(num, "0", 0, businessClass, recordID);
                if (array[2].ToString() != "0")
                {
                    this.TemplateCount = count;
                }
                if (this.TemplateCount == 1)
                {
                    this.OffsetCount = posPositionNode;
                    this.NodeID      = System.Convert.ToInt32(array[0]);
                    return;
                }
            }
            else
            {
                if (posPositionNode == 1)
                {
                    DataTable dataTable2 = FlowTemplateAction.QueryOffsetNodeFirst("0", num);
                    this.TemplateCount = count;
                    string a      = dataTable2.Rows[0]["IsSelReceiver"].ToString();
                    int    nodeID = System.Convert.ToInt32(dataTable2.Rows[0]["NodeID"].ToString());
                    if (a != "0")
                    {
                        this.NodeID = nodeID;
                        return;
                    }
                }
            }
        }
        else
        {
            if (count > 1)
            {
                this.TemplateCount = count;
            }
        }
    }
示例#21
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.InstanceCode  = new System.Guid(base.Request["ic"]);
         this.BusinessCode  = base.Request["bc"].ToString();
         this.BusinessClass = base.Request["bcl"].ToString();
         try
         {
             FlowAuditAction.display_FlowChart(this.tbFlowChart, this.InstanceCode, this.BusinessCode, this.BusinessClass);
         }
         catch
         {
             HtmlTableRow  htmlTableRow  = new HtmlTableRow();
             HtmlTableCell htmlTableCell = new HtmlTableCell();
             htmlTableCell.InnerHtml = "<font color = 'red'>数据有错误!</font>";
             htmlTableRow.Cells.Add(htmlTableCell);
             this.tbFlowChart.Rows.Add(htmlTableRow);
         }
         try
         {
             string sqlString = string.Concat(new object[]
             {
                 "select * from wf_instance_main where BusinessCode = '",
                 this.BusinessCode,
                 "' and BusinessClass ='",
                 this.BusinessClass,
                 "' and InstanceCode='",
                 this.InstanceCode,
                 "' "
             });
             DataTable dataTable = publicDbOpClass.DataTableQuary(sqlString);
             if (dataTable.Rows.Count > 1)
             {
                 HtmlTableRow  htmlTableRow2  = new HtmlTableRow();
                 HtmlTableCell htmlTableCell2 = new HtmlTableCell();
                 htmlTableCell2.ColSpan   = this.tbFlowChart.Rows[1].Cells.Count;
                 htmlTableCell2.InnerHtml = "<font color = 'red'>该流程重报过,流程状态显示的是最新的结果</font>";
                 htmlTableRow2.Cells.Add(htmlTableCell2);
                 this.tbFlowChart.Rows.Add(htmlTableRow2);
             }
         }
         catch
         {
         }
     }
 }
示例#22
0
    protected void btnStartWF_Click(object sender, EventArgs e)
    {
        Guid   recordID = new Guid(this.HdnRecordID.Value);
        string text     = FlowAuditAction.BeginFlow("009", "001", recordID, "", base.UserCode);

        if (text == "工作流程已成功启动")
        {
            this.GVBook.DataBind();
            this.Page.ClientScript.RegisterStartupScript(base.GetType(), "err", "alert('" + text + "!');", true);
        }
        if (text == "请先设置当前模块的审核流程")
        {
            this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "alert('" + text + "!');", true);
            return;
        }
        this.Page.ClientScript.RegisterStartupScript(base.GetType(), "ok", "if(window.showModalDialog('" + text + "',window,'dialogHeight:180px;dialogWidth:450px;center:1;help:0;status:0;')=='1'){window.location.href=window.location.href};", true);
    }
示例#23
0
文件: WorkFlow.cs 项目: zxl881203/src
        private static void AuditDefined(int instanceId, string instanceCode, string businessCode, string businessClass, string lastFlowState, string tableName, string columnName)
        {
            string str2 = SelfEventAction.GetTypeName(AppDomain.CurrentDomain.BaseDirectory + "SelfEventInfo.xml", tableName, columnName);

            if (!string.IsNullOrWhiteSpace(str2))
            {
                ISelfEvent event2 = (ISelfEvent)Assembly.Load("PmBusinessLogic").CreateInstance(str2);
                if (event2 != null)
                {
                    string maxSing = FlowAuditAction.GetMaxSing(instanceId);
                    if ((lastFlowState == "1") && (maxSing == "1"))
                    {
                        event2.CommitEvent(instanceCode.ToString());
                    }
                    else if (lastFlowState == "-2")
                    {
                        event2.RefuseEvent(instanceCode.ToString());
                    }
                    else if (lastFlowState == "-3")
                    {
                        event2.RestatedEvent(instanceCode.ToString());
                    }
                }
            }
            if (lastFlowState == "1")
            {
                if (businessCode == "089")
                {
                    TenderInfo.UpdatePrjState(Guid.Parse(instanceCode), 2);
                }
                else if (businessCode == "100")
                {
                    PrjMember.AddLimit(Guid.Parse(instanceCode));
                }
                else if (businessCode == "107")
                {
                    Progress.UpdateLatest(instanceCode.ToString());
                }
                else if (businessCode == "108")
                {
                    cn.justwin.BLL.ProgressManagement.Version.UpdateLatest(instanceCode.ToString());
                }
                MsgOrganiger(instanceId, businessCode, businessClass);
            }
        }
示例#24
0
 protected void gvAuditingList_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         string text  = this.gvAuditingList.DataKeys[e.Row.RowIndex]["InstanceCode"].ToString();
         string text2 = this.gvAuditingList.DataKeys[e.Row.RowIndex]["NoteID"].ToString();
         string text3 = this.gvAuditingList.DataKeys[e.Row.RowIndex]["IsAllPass"].ToString();
         string text4 = this.gvAuditingList.DataKeys[e.Row.RowIndex]["NodeID"].ToString();
         string text5 = this.gvAuditingList.DataKeys[e.Row.RowIndex]["BusinessCode"].ToString();
         string text6 = dataRowView["BusinessClass"].ToString();
         string text7 = FlowAuditAction.DoWithUrl(text5);
         if (text7 == "about:blank")
         {
             text7 = "";
         }
         e.Row.Attributes["onclick"] = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             text5,
             "','",
             text,
             "','",
             text2,
             "','",
             text3,
             "','",
             text4,
             "','",
             text7,
             "','",
             text6,
             "');"
         });
         if (dataRowView["BusinessCode"].ToString() == "999")
         {
             OAWFApplyItem model = this.hrAction.GetModel((System.Guid)dataRowView["InstanceCode"]);
             if (model != null)
             {
                 e.Row.Cells[1].Text = model.Title;
             }
         }
     }
 }
示例#25
0
 protected void GVInitiate_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["id"] = System.Convert.ToString(e.Row.RowIndex + 1);
         string text  = dataRowView["BusinessCode"].ToString();
         string text2 = dataRowView["businessclass"].ToString();
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             dataRowView["InstanceCode"].ToString(),
             "','",
             text,
             "','",
             text2,
             "');"
         });
         HyperLink hyperLink = (HyperLink)e.Row.Cells[4].FindControl("HLConter");
         hyperLink.Text = FlowAuditAction.AuditConter((System.Guid)dataRowView["InstanceCode"], text, text2);
         if (hyperLink.Text == "")
         {
             hyperLink.Text = "点击查看";
         }
         if (hyperLink.Text.Length > 15)
         {
             hyperLink.ToolTip = hyperLink.Text;
             hyperLink.Text    = hyperLink.Text.Substring(0, 15) + "...";
         }
         string text3 = dataRowView["DoWithUrl"].ToString();
         if (text3.IndexOf('?') != -1)
         {
             text3 = text3 + "&showAudit=1&showname=1&ic=" + dataRowView["InstanceCode"].ToString();
         }
         else
         {
             text3 = text3 + "?showAudit=1&showname=1&ic=" + dataRowView["InstanceCode"].ToString();
         }
         hyperLink.Attributes["onclick"] = "toolbox_oncommand('" + text3 + "','审核内容查看')";
         hyperLink.NavigateUrl           = "#";
         hyperLink.Target = "_self";
     }
 }
示例#26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (base.Request.QueryString["bc"] != null)
         {
             this.businessCode = base.Request.QueryString["bc"].ToString();
         }
         if (base.Request.QueryString["ic"] != null)
         {
             this.AddNewTr(base.Request.QueryString["ic"], this.businessCode, this.businessClass);
         }
         this.LbUserName.Text  = FlowAuditAction.OrganigerName(new Guid(base.Request["ic"]), this.businessCode, this.businessClass);
         this.LbStartTime.Text = FlowAuditAction.StartTime(new Guid(base.Request["ic"]), this.businessCode, this.businessClass);
     }
     catch
     {
         throw new Exception("请确保Get请求中包含'ic',并且配置有BusiClass和BusiCode");
     }
 }
示例#27
0
    private void AddMsg(string usercode)
    {
        RecieveMsgModel recieveMsgModel = new RecieveMsgModel();

        recieveMsgModel.v_yhdm   = usercode;
        recieveMsgModel.TheOrder = new decimal?(1m);
        string text;

        if (this.RBLRoleType.SelectedValue == "-2")
        {
            text = "流程驳回";
        }
        else
        {
            if (this.RBLRoleType.SelectedValue == "1")
            {
                text = "流程通过";
            }
            else
            {
                text = "流程重报";
            }
        }
        DataTable       instanceMain      = FlowAuditAction.GetInstanceMain(this.InstanceID);
        string          businessClassName = FlowAuditAction.GetBusinessClassName(instanceMain.Rows[0]["businesscode"].ToString(), instanceMain.Rows[0]["businessclass"].ToString());
        RecieveMsgModel expr_B1           = recieveMsgModel;
        string          lookUrl           = expr_B1.LookUrl;

        expr_B1.LookUrl = string.Concat(new string[]
        {
            lookUrl,
            businessClassName,
            text,
            "提醒",
            this.txtContent.Value
        });
        recieveMsgModel.InstanceCode    = this.InstanceCode;
        recieveMsgModel.RecieveDate     = System.DateTime.Now;
        recieveMsgModel.RecieveUserCode = this.Session["yhdm"].ToString();
        this.rma.Add(recieveMsgModel);
    }
示例#28
0
 protected void GVRecieveMsg_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["id"]      = System.Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Attributes["onclick"] = string.Concat(new string[]
         {
             "ClickRow('",
             dataRowView["InstanceCode"].ToString(),
             "','",
             dataRowView["BusinessCode"].ToString(),
             "','",
             dataRowView["BusinessClass"].ToString(),
             "')"
         });
         string text = FlowAuditAction.AuditConter((System.Guid)dataRowView["InstanceCode"], dataRowView["BusinessCode"].ToString(), dataRowView["businessclass"].ToString());
         new userManageDb();
         HyperLink hyperLink = (HyperLink)e.Row.Cells[7].FindControl("HLConter");
         if (string.IsNullOrEmpty(text))
         {
             text = "点击查看";
         }
         if (text.Length > 21)
         {
             text = text.Substring(0, 20) + "...";
         }
         hyperLink.Text                  = text;
         hyperLink.NavigateUrl           = "#";
         hyperLink.Target                = "_self";
         hyperLink.Attributes["onclick"] = string.Concat(new object[]
         {
             "toolbox_oncommand('",
             dataRowView["DoWithUrl"],
             "?showAudit=1&showname=1&ic=",
             dataRowView["InstanceCode"].ToString(),
             "','审核内容查看')"
         });
     }
 }
示例#29
0
    private string GetPageDuringInfo(int during, int InstanceID, Guid InstanceCode)
    {
        string    result        = "";
        DataTable lastAuditUser = FlowAuditAction.GetLastAuditUser(InstanceID);

        if (lastAuditUser.Rows.Count > 0)
        {
            DateTime value    = Convert.ToDateTime(lastAuditUser.Rows[0]["AuditDate"]);
            TimeSpan timeSpan = DateTime.Now.Subtract(value);
            int      num      = timeSpan.Days * 24 + timeSpan.Hours - 4;
            if (num > 0)
            {
                result = "超时";
            }
            else
            {
                result = "";
            }
        }
        else
        {
            string startDateTime = FlowAuditAction.GetStartDateTime(InstanceCode);
            if (startDateTime != "")
            {
                DateTime value     = Convert.ToDateTime(startDateTime);
                TimeSpan timeSpan2 = DateTime.Now.Subtract(value);
                int      num2      = timeSpan2.Days * 24 + timeSpan2.Hours - 4;
                if (num2 > 0)
                {
                    result = "超时";
                }
                else
                {
                    result = "";
                }
            }
        }
        return(result);
    }
示例#30
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     base.Response.Cache.SetNoStore();
     if (!this.Page.IsPostBack)
     {
         this.InstanceCode = new System.Guid(base.Request["ic"]);
         string businessCode = FlowAuditAction.GetBusinessCode(this.InstanceCode);
         if (businessCode != "")
         {
             int num = FlowAuditAction.DoWithUrl(businessCode).IndexOf("?");
             if (num > 0)
             {
                 this.frmPage.Attributes["src"] = FlowAuditAction.DoWithUrl(businessCode) + "&ic=" + this.InstanceCode;
             }
             else
             {
                 this.frmPage.Attributes["src"] = FlowAuditAction.DoWithUrl(businessCode) + "?ic=" + this.InstanceCode;
             }
         }
         this.GetPageBind();
     }
 }