Exemplo n.º 1
0
        private void ReviewSearch(IList <ApproveRuleGroupInfo> argList)
        {
            if (argList != null)
            {
                ViewState["SearchTable"] = argList;
                appedTable.Controls.Clear();
                foreach (ApproveRuleGroupInfo info in argList)
                {
                    //创建“编辑”和“删除”按钮
                    ImageButton btnEdit = new ImageButton();
                    btnEdit.ID       = "btnEdit" + Guid.NewGuid().ToString();
                    btnEdit.ImageUrl = "../pic/btnImg/btnEdt_nor.png";
                    btnEdit.Attributes["ApproveID"] = info.ID.ToString();
                    btnEdit.OnClientClick           = "return EditTable('" + info.ID.ToString() + "')";

                    ImageButton btnDel = new ImageButton();
                    btnDel.ID       = "btnDel" + Guid.NewGuid().ToString();
                    btnDel.ImageUrl = "../pic/btnImg/btnDelete_nor.png";
                    btnDel.Attributes["ApproveID"] = info.ID.ToString();
                    btnDel.OnClientClick           = "return DelTable('" + info.ID.ToString() + "')";

                    appedTable.Controls.Add(btnEdit);
                    appedTable.Controls.Add(btnDel);
                    ProcessRuleBLL bll     = new ProcessRuleBLL();
                    DataSet        ds      = bll.GetApproveTableExtendByTableName(info.RuleTableName, info.ProcessID.ToString()); //审批表
                    GridView       gvTable = new GridView();
                    gvTable.RowDataBound += new GridViewRowEventHandler(gvTable_RowDataBound);
                    gvTable.Width         = new Unit(540);
                    gvTable.CssClass      = "datalist2";
                    gvTable.DataSource    = ds.Tables[0];
                    gvTable.DataBind();
                    appedTable.Controls.Add(gvTable);
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绑定查询后的审批表
        /// </summary>
        private void BindSearchRuleTable()
        {
            ProcessRuleBLL bll = new ProcessRuleBLL();

            if (ddlGroup.Items.Count > 0 && ddlProcessType.Items.Count > 0)
            {
                IList <ApproveRuleGroupInfo> argList = bll.GetApproveRuleGroupByGroupNameAndProcessID(ddlGroup.SelectedItem.Text, ddlProcessType.SelectedValue);
                if (argList != null)
                {
                    ViewState["SearchTable"] = argList;
                    appedTable.Controls.Clear();
                    foreach (ApproveRuleGroupInfo info in argList)
                    {
                        //创建“编辑”和“删除”按钮
                        ImageButton btnEdit = new ImageButton();
                        btnEdit.ID       = "btnEdit" + info.ID.ToString();
                        btnEdit.ImageUrl = "../pic/btnImg/btnEdt_nor.png";
                        btnEdit.Attributes["ApproveID"] = info.ID.ToString();
                        btnEdit.OnClientClick           = "return EditTable('" + info.ID.ToString() + "')";

                        ImageButton btnDel = new ImageButton();
                        btnDel.ID       = "btnDel" + info.ID.ToString();
                        btnDel.ImageUrl = "../pic/btnImg/btnDelete_nor.png";
                        btnDel.Attributes["ApproveID"] = info.ID.ToString();
                        btnDel.OnClientClick           = "return DelTable('" + info.ID.ToString() + "')";

                        appedTable.Controls.Add(btnEdit);
                        appedTable.Controls.Add(btnDel);

                        DataSet  ds      = bll.GetApproveTableExtendByTableName(info.RuleTableName, info.ProcessID.ToString()); //审批表
                        GridView gvTable = new GridView();
                        gvTable.RowDataBound += new GridViewRowEventHandler(gvTable_RowDataBound);
                        gvTable.Width         = new Unit(540);
                        gvTable.CssClass      = "datalist2";
                        DataTable dt = null;
                        if (ds != null)
                        {
                            dt = ds.Tables[0];
                        }
                        gvTable.DataSource = ds;
                        gvTable.DataBind();
                        appedTable.Controls.Add(gvTable);
                    }
                }
            }
        }