コード例 #1
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            FormCollection fc = Application.OpenForms;
            GridView view = (GridView)sender;
            GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Control.MousePosition));
            if (hitInfo.HitTest == GridHitTest.RowCell)
            {
                if ((hitInfo.Column != null) && (hitInfo.Column == colSHHZDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colSHHZDID);
                    string strSHHZDID = "[SHHZDID] = \'" + strTemp + "\'";
                    if (fc["FrmPurchaseReceiveTotal"] != null)
                    {
                        fc["FrmPurchaseReceiveTotal"].Close();
                    }
                    FrmPurchaseReceiveTotal FrmPRT = new FrmPurchaseReceiveTotal(m_fgBranch, strSHHZDID);
                    FrmPRT.Show();
                    FrmPRT.Activate();
                }
                else if ((hitInfo.Column != null) && (hitInfo.Column == colCGSHDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colCGSHID);
                    string strCGSHDH = view.GetRowCellDisplayText(hitInfo.RowHandle, colCGSHDH);
                    if (!String.IsNullOrEmpty(strCGSHDH))
                    {
                        string strCGSHID = "[CGSHID] = \'" + strTemp + "\'";
                        if (fc["FrmPurchaseReceiveNote"] != null)
                        {
                            fc["FrmPurchaseReceiveNote"].Close();
                        }
                        FrmPurchaseReceiveNote FrmPRN = new FrmPurchaseReceiveNote(m_fgBranch, strCGSHID);
                        FrmPRN.Show();
                        FrmPRN.Activate();
                    }

                }
            }
        }
コード例 #2
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            GridView view = (GridView)sender;
            GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Control.MousePosition));

            FormCollection fc = Application.OpenForms;

            if (hitInfo.HitTest == GridHitTest.RowCell)
            {
                if ((hitInfo.Column != null) && (hitInfo.Column == colCGSHDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colCGSHID);
                    string strCGSHID = "[CGSHID] = \'" + strTemp + "\'";
                    if (fc["FrmPurchaseReceiveDetail"] != null)
                    {
                        fc["FrmPurchaseReceiveDetail"].Close();
                    }
                    FrmPurchaseReceiveDetail FrmPRD = new FrmPurchaseReceiveDetail(m_fgBranch, strCGSHID);
                    FrmPRD.Show();
                    FrmPRD.Activate();
                }
                else if ((hitInfo.Column != null) && (hitInfo.Column == colSHHZDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colSHHZDID);
                    string strSHHZDH = view.GetRowCellDisplayText(hitInfo.RowHandle, colSHHZDH);
                    if (!String.IsNullOrEmpty(strSHHZDH))
                    {
                        string strSHHZDID = "[SHHZDID] = \'" + strTemp + "\'";
                        if (FrmLogin.getZTID == "2314" || FrmLogin.getZTID == "2312" || FrmLogin.getZTID == "306")
                        {
                            if (fc["FrmPurchaseReceiveTotal"] != null)
                            {
                                fc["FrmPurchaseReceiveTotal"].Close();
                            }
                            FrmPurchaseReceiveTotal FrmPRT = new FrmPurchaseReceiveTotal(m_fgBranch, strSHHZDID);
                            FrmPRT.Show();
                            FrmPRT.Activate();
                        }
                        else
                        {
                            if (fc["FrmPurchaseReceiveTotalBranch"] != null)
                            {
                                fc["FrmPurchaseReceiveTotalBranch"].Close();
                            }
                            FrmPurchaseReceiveTotalBranch FrmPRTB = new FrmPurchaseReceiveTotalBranch(m_fgBranch, strSHHZDID);
                            FrmPRTB.Show();
                            FrmPRTB.Activate();
                        }
                    }
                }
                else if ((hitInfo.Column != null) && (hitInfo.Column == colSHPZDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colSHPZID);
                    string strSHPZDH = view.GetRowCellDisplayText(hitInfo.RowHandle, colSHPZDH);
                    if (!String.IsNullOrEmpty(strSHPZDH))
                    {
                        string strSHPZID = "[VOUCHERID] = \'" + strTemp + "\'";
                        if (fc["FrmPurchaseReveiveVoucherNote"] != null)
                        {
                            fc["FrmPurchaseReveiveVoucherNote"].Close();
                        }
                        FrmPurchaseReveiveVoucherNote FrmPRVN = new FrmPurchaseReveiveVoucherNote(strSHPZID);
                        FrmPRVN.Show();
                        FrmPRVN.Activate();
                    }
                }

            }
        }