private void btnFind_Click(object sender, EventArgs e)
        {
            CustomDataGridView dgv = GetDataGridView(tabControl1.SelectedTab);

            if (dgv.CurrentRow == null)
            {
                return;
            }

            object obj = SetFlowInfo_BillNo(dgv as DataGridView, "业务编号");

            if (tabControl1.SelectedTab.Text == "待处理")
            {
                FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, obj as CustomFlowForm, CE_OperatorMode.编辑);
                SetFormBusinessInfo(dgv as DataGridView, CE_OperatorMode.编辑, _Enum_BillType, "业务编号", ref frm);
                frm.CommonProcessSubmit += new FormCommonProcess.FormSubmit(frm_CommonProcessSubmit);
                m_operationType          = CE_FlowOperationType.未知;

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    SendMessage();
                }
            }
            else
            {
                FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, obj as CustomFlowForm, CE_OperatorMode.查看);
                SetFormBusinessInfo(dgv as DataGridView, CE_OperatorMode.查看, _Enum_BillType, "业务编号", ref frm);
                frm.ShowDialog();
            }

            RefreshData(tabControl1.SelectedTab);
            PositioningRecord(GetFlowInfo_BillNo(obj));
        }
        void SetFormBusinessInfo(DataGridView dgvr, CE_OperatorMode operatorMode,
                                 CE_BillTypeEnum billType, string keyName, ref FormCommonProcess frm)
        {
            List <object> resultList = new List <object>();

            foreach (DataGridViewRow dr in dgvr.Rows)
            {
                Entity_BusinessOperationInfo info = new Entity_BusinessOperationInfo();

                info.BillType     = billType;
                info.BusinessNo   = dr.Cells[keyName].Value.ToString();
                info.OperatorMode = operatorMode;

                info.FlowInfoList = null;
                info.FlowMagicDic = null;

                if (dgvr.CurrentRow == dr)
                {
                    frm.BusinessList_Object = info;
                }

                resultList.Add(info);
            }

            frm.BusinessList = resultList;
        }
        void ShowDetailInfo(DataGridView dgv, string keyName)
        {
            object obj = SetFlowInfo_BillNo(dgv as DataGridView, keyName);

            FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, obj as CustomFlowForm, CE_OperatorMode.查看);

            SetFormBusinessInfo(dgv, CE_OperatorMode.查看, _Enum_BillType, keyName, ref frm);
            frm.ShowDialog();
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            object         obj       = Activator.CreateInstance(_Type_DetailForm);
            CustomFlowForm customFrm = obj as CustomFlowForm;

            customFrm.FlowInfo_BillNo = m_billNoControl.GetNewBillNo();

            FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, customFrm, CE_OperatorMode.添加);

            frm.CommonProcessSubmit += new FormCommonProcess.FormSubmit(frm_CommonProcessSubmit);
            m_operationType          = CE_FlowOperationType.未知;

            if (frm.ShowDialog() != DialogResult.OK)
            {
                m_billNoControl.CancelBill(GetFlowInfo_BillNo(obj));
            }
            else
            {
                SendMessage();
            }

            RefreshData(tabControl1.SelectedTab);
            PositioningRecord(GetFlowInfo_BillNo(obj));
        }