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 == colABSTRACT))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colVOUCHERID);
                    string strVOUCHERID = "[VOUCHERID] = \'" + strTemp + "\'";
                    if (fc["FrmPurchaseReveiveVoucherNote"] != null)
                    {
                        fc["FrmPurchaseReveiveVoucherNote"].Close();
                    }
                    FrmPurchaseReveiveVoucherNote FrmPRVN = new FrmPurchaseReveiveVoucherNote(strVOUCHERID);
                    FrmPRVN.Show();
                    FrmPRVN.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();
                    }
                }

            }
        }