Ejemplo n.º 1
0
 protected virtual void btnSort_Click(object sender, EventArgs e)
 {
     if (Session["MainTableId"] == null || Session["MainTableId"].ToString().Trim() == "")
     {
         JScript.Alert((String)GetGlobalResourceObject("WebGlobalResource", "NoTableID"));
         return;
     }
     JScript.OpenWindow("../SYS_Common/frmSetSort.aspx?MainTableId=" + Session["MainTableId"].ToString(), "", "resizable=yes,scrollbars=no,status=yes,width=600px,height=500px,left=100px,top=10px");//GetGlobalResourceObject("WebGlobalResource", "SortBuildWindow").ToString()
 }
Ejemplo n.º 2
0
 protected override void btnSort_Click(object sender, EventArgs e)
 {
     if (Session["MainTableId"] == null || Session["MainTableId"].ToString().Trim() == "")
     {
         JScript.Alert(Page, "此模块没有设置数据库表参数,无法排序!");
         return;
     }
     JScript.OpenWindow("../SYS_Common/frmSetSort.aspx?MainTableId=" + Session["MainTableId"].ToString(), "排序定义窗口", "resizable=yes,scrollbars=no,status=yes,width=600px,height=500px,left=100px,top=10px");
 }
Ejemplo n.º 3
0
 protected void btnTypicalOpt_Click(object sender, EventArgs e)
 {
     //只有新增的还没有保存的票才可以选择
     if (txtTID.Text != "")
     {
         return;
     }
     JScript.OpenWindow("frmSelect_TYPICAL_OPT.aspx", "", "height=600,width=550,location=0,menubar=0");
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 自定义查询界面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void btnSearch_Click(object sender, EventArgs e)
 {
     if (Session["MainTableId"] == null || Session["MainTableId"].ToString().Trim() == "")
     {
         JScript.Alert((String)GetGlobalResourceObject("WebGlobalResource", "NoTableID"));
         return;
     }
     //自定义查询采用弹出窗口,在弹出窗口选择完条件后,再打开一个查询结果的新窗口,而不是返回本窗口。
     JScript.OpenWindow("../SYS_Common/frmSearchBuild.aspx", "", "resizable=yes,scrollbars=yes,width=700px,height=500px,left=100px,top=10px");//(String)GetGlobalResourceObject("WebGlobalResource", "SearchBuildWindow")
 }
Ejemplo n.º 5
0
 //由于文件管理的特殊性,加了前提条件。
 protected override void btnSearch_Click(object sender, EventArgs e)
 {
     if (Session["MainTableId"] == null || Session["MainTableId"].ToString().Trim() == "")
     {
         JScript.Alert((String)GetGlobalResourceObject("WebGlobalResource", "NoTableID"));
         return;
     }
     JScript.OpenWindow("../SYS_Common/frmSearchBuild.aspx?Precondition=MODULE_ID=" + Session["FuncID"].ToString(),
                        (String)GetGlobalResourceObject("WebGlobalResource", "SearchBuildWindow"),
                        "resizable=1,scrollbars=1,width=700px,height=500px,left=100px,top=10px");
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 报表打印界面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void btnPrint_Click(object sender, EventArgs e)
 {
     if (Session["ReportId"] == null || Session["ReportId"].ToString().Trim() == "")
     {
         Response.Write("<script language=javascript> alert('" + GetGlobalResourceObject("WebGlobalResource", "NoReportMessage").ToString() + "')</script");
         return;
     }
     //要想直接传递参数打印,则使用注释中的语法,paras的格式如下:条件值1^条件值2^条件值3^......
     //JScript.OpenWindow("../SYS_Common/frmCellReportDisplay.aspx?ReportID=" + Session["ReportId"].ToString()+"&Values="+paras, "报表打印", "toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes");
     JScript.OpenWindow("../SYS_Common/frmCellReportDisplay.aspx?ReportID=" + Session["ReportId"].ToString(), "", "toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes");
     //(String)GetGlobalResourceObject("WebGlobalResource", "ReportPrint")
 }
    protected override void btnPrint_Click(object sender, EventArgs e)
    {
        if (Session["ReportId"] == null || Session["ReportId"].ToString().Trim() == "")
        {
            Response.Write("<script language=javascript> alert('" + GetGlobalResourceObject("WebGlobalResource", "NoReportMessage").ToString() + "')</script");
            return;
        }
        //要想直接传递参数打印,则使用注释中的语法,paras的格式如下:条件值1^条件值2^条件值3^......
        DateTime dt;
        string   paras;

        DateTime.TryParse(uMonth.Month.Substring(0, 4) + "-" + uMonth.Month.Substring(4, 2) + "-01", out dt);
        paras = dt.ToString("MM-yyyy");
        JScript.OpenWindow("../SYS_Common/frmCellReportDisplay.aspx?ReportID=" + Session["ReportId"].ToString() + "&Values=" + paras, "报表打印", "toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes");
    }
Ejemplo n.º 8
0
    protected override void btnPrint_Click(object sender, EventArgs e)
    {
        if (Session["ReportId"] == null || Session["ReportId"].ToString().Trim() == "")
        {
            Response.Write("<script language=javascript> alert('" + (String)GetGlobalResourceObject("WebGlobalResource", "NoReportMessage") + "')</script");
            return;
        }
        if (ddlQueryShift.SelectedItem == null)
        {
            return;
        }
        string values = wdlQueryDate.getTime().ToString("dd-MM-yy") + "^" + ddlQueryShift.SelectedValue;

        JScript.OpenWindow("../SYS_Common/frmCellReportDisplay.aspx?ReportID=" + Session["ReportId"].ToString() + "&Values=" + values, (String)GetGlobalResourceObject("WebGlobalResource", "ReportPrint"), "resizable=1,scrollbars=1");
    }
Ejemplo n.º 9
0
    protected override void btnPrint_Click(object sender, EventArgs e)
    {
        if (Session["ReportId"] == null || Session["ReportId"].ToString().Trim() == "")
        {
            JScript.Alert("此模块没有设置报表打印功能!");
            return;
        }
        if (wdlDate.Text == "")
        {
            JScript.Alert("请先选择日期和班次!");
            return;
        }
        string shiftDate = wdlDate.getTime().ToString("yyyyMMdd");

        JScript.OpenWindow("../SYS_Common/frmCellReportDisplay.aspx?ReportID=" + Session["ReportId"].ToString() + "&Values=" + shiftDate, "报表打印", "toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes");
    }
Ejemplo n.º 10
0
    protected override void btnPrint_Click(object sender, EventArgs e)
    {
        if (Session["ReportId"] == null || Session["ReportId"].ToString().Trim() == "")
        {
            Response.Write("<script language=javascript> alert('" + GetGlobalResourceObject("WebGlobalResource", "NoReportMessage").ToString() + "')</script");
            return;
        }
        if (wdlDate.Text == "")
        {
            return;
        }
        if (ddlShift.SelectedItem == null)
        {
            return;
        }

        string shiftDate = wdlDate.getTime().ToString("dd-MM-yy");
        string shift     = ddlShift.SelectedValue;

        JScript.OpenWindow("../SYS_Common/frmCellReportDisplay.aspx?ReportID=" + Session["ReportId"].ToString() + "&Values=" + shiftDate + "^" + shift, "报表打印", "toolbar=no,menubar=no,titlebar=yes,directories=no,resizable=yes,status=yes");
    }
Ejemplo n.º 11
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        //提交前先保存
        btnSave_Click(null, null);
        if (tdMessage.InnerText != "")
        {
            return;
        }
        string returnString = "";
        object obj;

        //发送前判断汇集环节的所有分支是否都到达此节点
        obj = DBOpt.dbHelper.ExecuteScalar("select f_nodetype from dmis_sys_flowlink where f_no=" + ViewState["CurLinkNo"].ToString());
        if (obj != null && Convert.ToInt16(obj) == 2)
        {
            returnString = WebWorkFlow.InfluxTacheSendCondition(Convert.ToInt16(ViewState["PackTypeNo"]), Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurLinkNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]));
            if (returnString.Length > 0)
            {
                JScript.Alert(returnString);
                tdMessage.InnerText = returnString;
                return;
            }
        }
        //发送前条件判断
        returnString = WebWorkFlow.TacheSendCondition(ViewState["PackTypeNo"].ToString(), ViewState["CurLinkNo"].ToString(), ViewState["PackNo"].ToString(), ViewState["CurWorkFlowNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString());
        if (returnString.Length > 0)
        {
            JScript.Alert(returnString);
            tdMessage.InnerText = returnString;
            return;
        }

        string sMainer = "";

        obj = DBOpt.dbHelper.ExecuteScalar("select F_RECEIVER from DMIS_SYS_WORKFLOW where F_NO=" + ViewState["CurWorkFlowNo"]);
        if (obj != null)
        {
            sMainer = obj.ToString();
        }

        if (sMainer == Session["MemberName"].ToString())
        {
            int iCat = -1;
            obj = DBOpt.dbHelper.ExecuteScalar("SELECT F_FLOWCAT FROM  DMIS_SYS_FLOWLINK WHERE F_NO=" + ViewState["CurLinkNo"]);
            if (obj != null)
            {
                iCat = Convert.ToInt16(obj);
            }

            if (iCat == 2)
            {
                int iFno = WebWorkFlow.EndFlow(Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]), Session["MemberName"].ToString());
                if (iFno == -1)
                {
                    JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkFinishFailMessage").ToString());//此业务归档失败,请联系统管理员!
                    return;
                }
                //2010-04-26,出现分支节点有退回的情况时,一个任务退回到分支节点,另一任务到了验收环节,
                //在任务没有结束时,也可以原先的程序也可以归档,故修改WebWorkFlow.EndFlow()的代码,提示一下
                //还有任务没有完成,不允许归档
                else if (iFno == -2)
                {
                    JScript.Alert("-2");//此业务还有未完成的任务,请在流程图中查询未完成的任务!
                    return;
                }
                else
                {
                    //JScript.Alert("此业务归档成功!");
                    Response.Redirect(ViewState["BackUrl"].ToString());
                }
            }
            else
            {
                string paras;
                //发送岗位时,派工环节,弹出发送窗口
                if (WebWorkFlow.IsAssignTache(Convert.ToInt16(ViewState["PackTypeNo"]), Convert.ToInt16(ViewState["CurLinkNo"])))
                {
                    paras = "PackTypeNo=" + ViewState["PackTypeNo"] + "&CurLinkNo=" + ViewState["CurLinkNo"] + "&PackNo=" + ViewState["PackNo"] +
                            "&CurWorkFlowNo=" + ViewState["CurWorkFlowNo"] + "&TableName=" + ViewState["TableName"].ToString() + "&RecNo=" + ViewState["RecNo"].ToString();
                    Session["sended"] = 0;
                    JScript.OpenWindow("../SYS_WorkFlow/AssignTaskWindow.aspx?" + paras, "发送窗", "scrollbars=yes,width=700,height=500,top=20,left=100");
                    //Response.Write(webfun.OpenWin("../SYS_WorkFlow/AssignTaskWindow.aspx?" + paras, "发送窗", "scrollbars=yes,width=700,height=480,top=20,left=100"));
                }
                else  //非派工环节,直接发送即可
                {
                    int curTaskID = Convert.ToInt16(ViewState["CurWorkFlowNo"]);
                    if (WebWorkFlow.DirectCreateFlow(Convert.ToInt16(ViewState["PackNo"]), ref curTaskID, Session["MemberName"].ToString()))
                    {
                        //统计实际工作时间
                        //1、根据工作流的相关表DMIS_SYS_WORKFLOW DMIS_SYS_MEMBERSTATUS来统计实际工作时间
                        //WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["CurLinkNo"].ToString(),
                        //    ViewState["PackNo"].ToString(), ViewState["CurWorkFlowNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString());

                        //2、根据业务表保存的人名来统计实际工作时间
                        string[] members = new string[4];
                        members[0] = txtFZR.Text;
                        members[1] = txtJDR1.Text;
                        members[2] = txtJDR2.Text;
                        members[3] = txtJDR3.Text;
                        if (ViewState["CurLinkNo"].ToString() == "49" || ViewState["CurLinkNo"].ToString() == "50")
                        {
                            WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["PackNo"].ToString(),
                                                             ViewState["CurLinkNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString(), "否", members);
                        }
                        else if (ViewState["CurLinkNo"].ToString() == "47" || ViewState["CurLinkNo"].ToString() == "48")  //远动的才统计下站补助
                        {
                            WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["PackNo"].ToString(),
                                                             ViewState["CurLinkNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString(), "是", members);
                        }

                        Response.Redirect(ViewState["BackUrl"].ToString());
                    }
                    else
                    {
                        JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkSubmitFailMessage").ToString());//"此任务发送失败,请联系统管理员!"
                        return;
                    }
                }
            }
        }
        else
        {
            //结束从办人员的办理状态
            if (WebWorkFlow.EndMemberStatus(Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]), Session["MemberName"].ToString()))
            {
                //JScript.Alert("提交成功!");
                Response.Redirect(ViewState["BackUrl"].ToString());
            }
            else
            {
                JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkSubmitFailMessage").ToString());  //更新状态失败!
            }
        }
    }
Ejemplo n.º 12
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        //提交前先保存
        btnSave_Click(null, null);
        if (tdMessage.InnerText != "")
        {
            return;
        }
        string returnString = "";


        //发送前条件判断
        returnString = WebWorkFlow.TacheSendCondition(ViewState["PackTypeNo"].ToString(), ViewState["CurLinkNo"].ToString(), ViewState["PackNo"].ToString(), ViewState["CurWorkFlowNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString());
        if (returnString.Length > 0)
        {
            JScript.Alert(returnString);
            tdMessage.InnerText = returnString;
            return;
        }

        string sMainer = "";
        object obj;

        obj = DBOpt.dbHelper.ExecuteScalar("select F_RECEIVER from DMIS_SYS_WORKFLOW where F_NO=" + ViewState["CurWorkFlowNo"]);
        if (obj != null)
        {
            sMainer = obj.ToString();
        }

        if (sMainer == Session["MemberName"].ToString())  //主办人发送
        {
            int iCat = -1;
            obj = DBOpt.dbHelper.ExecuteScalar("SELECT F_FLOWCAT FROM  DMIS_SYS_FLOWLINK WHERE F_NO=" + ViewState["CurLinkNo"]);
            if (obj != null)
            {
                iCat = Convert.ToInt16(obj);
            }

            if (iCat == 2)
            {
                int iFno = WebWorkFlow.EndFlow(Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]), Session["MemberName"].ToString());
                if (iFno == -1)
                {
                    JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkFinishFailMessage").ToString());//此业务归档失败,请联系统管理员!
                    return;
                }
                else
                {
                    //JScript.Alert("此业务归档成功!");
                    Response.Redirect(ViewState["BackUrl"].ToString());
                }
            }
            else
            {
                string paras;
                //发送岗位时,派工环节,弹出发送窗口
                if (WebWorkFlow.IsAssignTache(Convert.ToInt16(ViewState["PackTypeNo"]), Convert.ToInt16(ViewState["CurLinkNo"])))
                {
                    paras = "PackTypeNo=" + ViewState["PackTypeNo"] + "&CurLinkNo=" + ViewState["CurLinkNo"] + "&PackNo=" + ViewState["PackNo"] +
                            "&CurWorkFlowNo=" + ViewState["CurWorkFlowNo"] + "&TableName=" + ViewState["TableName"].ToString() + "&RecNo=" + ViewState["RecNo"].ToString();
                    Session["sended"] = 0;
                    JScript.OpenWindow("../SYS_WorkFlow/AssignTaskWindow.aspx?" + paras, "发送窗", "scrollbars=yes,width=670,height=500,top=20,left=100");
                    //Response.Write(webfun.OpenWin("../SYS_WorkFlow/AssignTaskWindow.aspx?" + paras, "发送窗", "scrollbars=yes,width=700,height=480,top=20,left=100"));
                }
                else  //非派工环节,直接发送即可
                {
                    int curTaskID = Convert.ToInt16(ViewState["CurWorkFlowNo"]);
                    if (WebWorkFlow.DirectCreateFlow(Convert.ToInt16(ViewState["PackNo"]), ref curTaskID, Session["MemberName"].ToString()))
                    {
                        //两种统计时间的方法,看用户用何种
                        //1、根据工作流的相关表DMIS_SYS_WORKFLOW DMIS_SYS_MEMBERSTATUS来统计实际工作时间
                        //WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["CurLinkNo"].ToString(),
                        //    ViewState["PackNo"].ToString(), ViewState["CurWorkFlowNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString());
                        //2、根据业务表保存的人名来统计实际工作时间
                        string[] members = new string[4];
                        if (!txtXT_JDR.ReadOnly)  //统计系统人员工作时间
                        {
                            members[0] = txtXT_JDR.Text;
                            members[1] = txtXT_JDR2.Text;
                            members[2] = txtXT_JDR3.Text;
                            members[3] = txtXT_JDR4.Text;
                            WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["PackNo"].ToString(),
                                                             "24", ViewState["TableName"].ToString(), ViewState["RecNo"].ToString(), "否", members);
                        }
                        else if (!txtYD_JDR.ReadOnly) //统计远动人员工作时间
                        {
                            members[0] = txtYD_JDR.Text;
                            members[1] = txtYD_JDR2.Text;
                            members[2] = txtYD_JDR3.Text;
                            members[3] = txtYD_JDR4.Text;
                            WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["PackNo"].ToString(),
                                                             "25", ViewState["TableName"].ToString(), ViewState["RecNo"].ToString(), "是", members);
                        }
                        Response.Redirect(ViewState["BackUrl"].ToString());
                    }
                    else
                    {
                        JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkSubmitFailMessage").ToString());//"此任务发送失败,请联系统管理员!"
                        return;
                    }
                }
            }
        }
        else
        {
            //从办人员提交,只是结束其办理状态
            if (WebWorkFlow.EndMemberStatus(Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]), Session["MemberName"].ToString()))
            {
                //JScript.Alert("提交成功!");
                Response.Redirect(ViewState["BackUrl"].ToString());
            }
            else
            {
                JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkSubmitFailMessage").ToString());  //更新状态失败!
            }
        }
    }
Ejemplo n.º 13
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        //提交前先保存
        btnSave_Click(null, null);
        if (tdMessage.InnerText != "")
        {
            return;
        }
        string returnString = "";
        object obj;

        //发送前判断汇集环节的所有分支是否都到达此节点
        obj = DBOpt.dbHelper.ExecuteScalar("select f_nodetype from dmis_sys_flowlink where f_no=" + ViewState["CurLinkNo"].ToString());
        if (obj != null && Convert.ToInt16(obj) == 2)
        {
            returnString = WebWorkFlow.InfluxTacheSendCondition(Convert.ToInt16(ViewState["PackTypeNo"]), Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurLinkNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]));
            if (returnString.Length > 0)
            {
                JScript.Alert(returnString);
                tdMessage.InnerText = returnString;
                return;
            }
        }
        //发送前条件判断
        returnString = WebWorkFlow.TacheSendCondition(ViewState["PackTypeNo"].ToString(), ViewState["CurLinkNo"].ToString(), ViewState["PackNo"].ToString(), ViewState["CurWorkFlowNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString());
        if (returnString.Length > 0)
        {
            JScript.Alert(returnString);
            tdMessage.InnerText = returnString;
            return;
        }

        string sMainer = "";

        obj = DBOpt.dbHelper.ExecuteScalar("select F_RECEIVER from DMIS_SYS_WORKFLOW where F_NO=" + ViewState["CurWorkFlowNo"]);
        if (obj != null)
        {
            sMainer = obj.ToString();
        }

        if (sMainer == Session["MemberName"].ToString())
        {
            int iCat = -1;
            obj = DBOpt.dbHelper.ExecuteScalar("SELECT F_FLOWCAT FROM  DMIS_SYS_FLOWLINK WHERE F_NO=" + ViewState["CurLinkNo"]);
            if (obj != null)
            {
                iCat = Convert.ToInt16(obj);
            }

            if (iCat == 2)
            {
                int iFno = WebWorkFlow.EndFlow(Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]), Session["MemberName"].ToString());
                if (iFno == -1)
                {
                    JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkFinishFailMessage").ToString());//此业务归档失败,请联系统管理员!
                    return;
                }
                else
                {
                    //JScript.Alert("此业务归档成功!");
                    Response.Redirect(ViewState["BackUrl"].ToString());
                }
            }
            else
            {
                string paras;
                //发送岗位时,派工环节,弹出发送窗口
                if (WebWorkFlow.IsAssignTache(Convert.ToInt16(ViewState["PackTypeNo"]), Convert.ToInt16(ViewState["CurLinkNo"])))
                {
                    paras = "PackTypeNo=" + ViewState["PackTypeNo"] + "&CurLinkNo=" + ViewState["CurLinkNo"] + "&PackNo=" + ViewState["PackNo"] +
                            "&CurWorkFlowNo=" + ViewState["CurWorkFlowNo"] + "&TableName=" + ViewState["TableName"].ToString() + "&RecNo=" + ViewState["RecNo"].ToString();
                    Session["sended"] = 0;
                    JScript.OpenWindow("../SYS_WorkFlow/AssignTaskWindow.aspx?" + paras, "发送窗", "scrollbars=yes,width=700,height=500,top=20,left=100");
                    //Response.Write(webfun.OpenWin("../SYS_WorkFlow/AssignTaskWindow.aspx?" + paras, "发送窗", "scrollbars=yes,width=700,height=480,top=20,left=100"));
                }
                else  //非派工环节,直接发送即可
                {
                    int curTaskID = Convert.ToInt16(ViewState["CurWorkFlowNo"]);
                    if (WebWorkFlow.DirectCreateFlow(Convert.ToInt16(ViewState["PackNo"]), ref curTaskID, Session["MemberName"].ToString()))
                    {
                        //统计实际工作时间
                        //1、根据工作流的相关表DMIS_SYS_WORKFLOW DMIS_SYS_MEMBERSTATUS来统计实际工作时间
                        WebWorkFlow.StatisicFactuslTimes(ViewState["PackTypeNo"].ToString(), ViewState["CurLinkNo"].ToString(),
                                                         ViewState["PackNo"].ToString(), ViewState["CurWorkFlowNo"].ToString(), ViewState["TableName"].ToString(), ViewState["RecNo"].ToString());

                        Response.Redirect(ViewState["BackUrl"].ToString());
                    }
                    else
                    {
                        JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkSubmitFailMessage").ToString());//"此任务发送失败,请联系统管理员!"
                        return;
                    }
                }
            }
        }
        else
        {
            //结束从办人员的办理状态
            if (WebWorkFlow.EndMemberStatus(Convert.ToInt16(ViewState["PackNo"]), Convert.ToInt16(ViewState["CurWorkFlowNo"]), Session["MemberName"].ToString()))
            {
                //JScript.Alert("提交成功!");
                Response.Redirect(ViewState["BackUrl"].ToString());
            }
            else
            {
                JScript.Alert(GetGlobalResourceObject("WebGlobalResource", "WkSubmitFailMessage").ToString());  //更新状态失败!
            }
        }
    }