protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["ProcessID"] != Guid.Empty)//修改
        {
            EWF_Flow_ProcessGetPositionBLL bll = new EWF_Flow_ProcessGetPositionBLL((Guid)ViewState["ProcessID"]);

            bll.Model.Name = tbx_Name.Text;
            bll.Model.DefaultNextProcess = new Guid(ddl_DefaultNextProcess.SelectedValue);
            bll.Model.Description = tbx_Description.Text;
            bll.Model.Sort = int.Parse(tbx_Sort.Text);

            bll.Model.PositionDataObject = new Guid(ddl_DataObject_Position.SelectedValue);

            bll.Update();

        }
        else//新增
        {
            EWF_Flow_ProcessGetPositionBLL bll = new EWF_Flow_ProcessGetPositionBLL();
            bll.Model.App = (Guid)ViewState["AppID"];
            bll.Model.Name = tbx_Name.Text;
            bll.Model.DefaultNextProcess = new Guid(ddl_DefaultNextProcess.SelectedValue);
            bll.Model.Description = tbx_Description.Text;
            if (!string.IsNullOrEmpty(ddl_Type.SelectedValue)) bll.Model.Type = int.Parse(ddl_Type.SelectedValue);
            bll.Model.Sort = int.Parse(tbx_Sort.Text);
            bll.Model.Type = 7;

            bll.Model.PositionDataObject = new Guid(ddl_DataObject_Position.SelectedValue);
            bll.Add();
        }

        Response.Redirect("FlowProcessList.aspx?AppID=" + ViewState["AppID"].ToString());
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["ProcessID"] != Guid.Empty)//修改
        {
            EWF_Flow_ProcessGetPositionBLL bll = new EWF_Flow_ProcessGetPositionBLL((Guid)ViewState["ProcessID"]);

            bll.Model.Name = tbx_Name.Text;
            bll.Model.DefaultNextProcess = new Guid(ddl_DefaultNextProcess.SelectedValue);
            bll.Model.Description        = tbx_Description.Text;
            bll.Model.Sort = int.Parse(tbx_Sort.Text);

            bll.Model.PositionDataObject = new Guid(ddl_DataObject_Position.SelectedValue);

            bll.Update();
        }
        else//新增
        {
            EWF_Flow_ProcessGetPositionBLL bll = new EWF_Flow_ProcessGetPositionBLL();
            bll.Model.App  = (Guid)ViewState["AppID"];
            bll.Model.Name = tbx_Name.Text;
            bll.Model.DefaultNextProcess = new Guid(ddl_DefaultNextProcess.SelectedValue);
            bll.Model.Description        = tbx_Description.Text;
            if (!string.IsNullOrEmpty(ddl_Type.SelectedValue))
            {
                bll.Model.Type = int.Parse(ddl_Type.SelectedValue);
            }
            bll.Model.Sort = int.Parse(tbx_Sort.Text);
            bll.Model.Type = 7;

            bll.Model.PositionDataObject = new Guid(ddl_DataObject_Position.SelectedValue);
            bll.Add();
        }

        Response.Redirect("FlowProcessList.aspx?AppID=" + ViewState["AppID"].ToString());
    }