private void BindData()
    {
        this.lb_ID.Text = ViewState["ProcessID"].ToString();
        EWF_Flow_ProcessGetOrganizeCityBLL bll = new EWF_Flow_ProcessGetOrganizeCityBLL((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_OrganizeCityLevel.SelectedValue           = bll.Model.OrganizeCityLevel.ToString();
        ddl_DataObject_OrganizeCityID.SelectedValue   = bll.Model.OrganizeCityID.ToString();
        ddl_DataObject_OrganizeCityName.SelectedValue = bll.Model.OrganizeCityName.ToString();
        #endregion
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["ProcessID"] != Guid.Empty)//修改
        {
            EWF_Flow_ProcessGetOrganizeCityBLL bll = new EWF_Flow_ProcessGetOrganizeCityBLL((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.OrganizeCityLevel = int.Parse(ddl_OrganizeCityLevel.SelectedValue);
            bll.Model.OrganizeCityID    = new Guid(ddl_DataObject_OrganizeCityID.SelectedValue);
            bll.Model.OrganizeCityName  = new Guid(ddl_DataObject_OrganizeCityName.SelectedValue);

            bll.Update();
        }
        else//新增
        {
            EWF_Flow_ProcessGetOrganizeCityBLL bll = new EWF_Flow_ProcessGetOrganizeCityBLL();
            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 = 8;

            bll.Model.OrganizeCityLevel = int.Parse(ddl_OrganizeCityLevel.SelectedValue);
            bll.Model.OrganizeCityID    = new Guid(ddl_DataObject_OrganizeCityID.SelectedValue);
            bll.Model.OrganizeCityName  = new Guid(ddl_DataObject_OrganizeCityName.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_ProcessGetOrganizeCityBLL bll = new EWF_Flow_ProcessGetOrganizeCityBLL((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.OrganizeCityLevel = int.Parse(ddl_OrganizeCityLevel.SelectedValue);
            bll.Model.OrganizeCityID = new Guid(ddl_DataObject_OrganizeCityID.SelectedValue);
            bll.Model.OrganizeCityName = new Guid(ddl_DataObject_OrganizeCityName.SelectedValue);

            bll.Update();

        }
        else//新增
        {
            EWF_Flow_ProcessGetOrganizeCityBLL bll = new EWF_Flow_ProcessGetOrganizeCityBLL();
            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 = 8;

            bll.Model.OrganizeCityLevel = int.Parse(ddl_OrganizeCityLevel.SelectedValue);
            bll.Model.OrganizeCityID = new Guid(ddl_DataObject_OrganizeCityID.SelectedValue);
            bll.Model.OrganizeCityName = new Guid(ddl_DataObject_OrganizeCityName.SelectedValue);
            bll.Add();
        }

        Response.Redirect("FlowProcessList.aspx?AppID=" + ViewState["AppID"].ToString());
    }
    private void BindData()
    {
        this.lb_ID.Text = ViewState["ProcessID"].ToString();
        EWF_Flow_ProcessGetOrganizeCityBLL bll = new EWF_Flow_ProcessGetOrganizeCityBLL((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_OrganizeCityLevel.SelectedValue = bll.Model.OrganizeCityLevel.ToString();
        ddl_DataObject_OrganizeCityID.SelectedValue = bll.Model.OrganizeCityID.ToString();
        ddl_DataObject_OrganizeCityName.SelectedValue = bll.Model.OrganizeCityName.ToString();
        #endregion
    }