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());
    }
    private void BindData()
    {
        this.lb_ID.Text = ViewState["ProcessID"].ToString();
        EWF_Flow_ProcessGetPositionBLL bll = new EWF_Flow_ProcessGetPositionBLL((Guid)ViewState["ProcessID"]);

        #region 绑定基本信息
        tbx_Name.Text = bll.Model.Name;
        tbx_Description.Text = bll.Model.Description;
        ddl_DefaultNextProcess.SelectedValue = bll.Model.DefaultNextProcess.ToString();
        ddl_Type.SelectedValue = bll.Model.Type.ToString();
        tbx_Sort.Text = bll.Model.Sort.ToString();

        ddl_DataObject_Position.SelectedValue = bll.Model.PositionDataObject.ToString();
        #endregion
    }
    private void BindData()
    {
        this.lb_ID.Text = ViewState["ProcessID"].ToString();
        EWF_Flow_ProcessGetPositionBLL bll = new EWF_Flow_ProcessGetPositionBLL((Guid)ViewState["ProcessID"]);

        #region 绑定基本信息
        tbx_Name.Text        = bll.Model.Name;
        tbx_Description.Text = bll.Model.Description;
        ddl_DefaultNextProcess.SelectedValue = bll.Model.DefaultNextProcess.ToString();
        ddl_Type.SelectedValue = bll.Model.Type.ToString();
        tbx_Sort.Text          = bll.Model.Sort.ToString();

        ddl_DataObject_Position.SelectedValue = bll.Model.PositionDataObject.ToString();
        #endregion
    }