Exemplo n.º 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 == colXTDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colXTDID);
                    string strXTDID = "[XTDID] = \'" + strTemp + "\'";
                    if (fc["FrmSaleReturnDetail"] != null)
                    {
                        fc["FrmSaleReturnDetail"].Close();
                    }
                    FrmSaleReturnDetail FrmSRD = new FrmSaleReturnDetail(m_fgBranch, strXTDID);
                    FrmSRD.Show();
                    FrmSRD.Activate();
                }
                else if ((hitInfo.Column != null) && (hitInfo.Column == colXSHZDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colXSHZDID);
                    string strXSHZDH = view.GetRowCellDisplayText(hitInfo.RowHandle, colXSHZDH);
                    if (!String.IsNullOrEmpty(strXSHZDH))
                    {
                        string strXSHZDID = "[XSHZDID] = \'" + strTemp + "\'";
                        if (FrmLogin.getZTID == "2314" || FrmLogin.getZTID == "2312" || FrmLogin.getZTID == "306")
                        {
                            if (fc["FrmSaleTotal"] != null)
                            {
                                fc["FrmSaleTotal"].Close();
                            }
                            FrmSaleTotal FrmST = new FrmSaleTotal(m_fgBranch, strXSHZDID);
                            FrmST.Show();
                            FrmST.Activate();
                        }
                        else
                        {
                            if (fc["FrmSaleTotalBranch"] != null)
                            {
                                fc["FrmSaleTotalBranch"].Close();
                            }
                            FrmSaleTotalBranch FrmSTB = new FrmSaleTotalBranch(m_fgBranch, strXSHZDID);
                            FrmSTB.Show();
                            FrmSTB.Activate();
                        }
                    }
                }
                else if ((hitInfo.Column != null) && (hitInfo.Column == colFHPZH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colFHPZID);
                    string strFHPZH = view.GetRowCellDisplayText(hitInfo.RowHandle, colFHPZH);
                    if (!String.IsNullOrEmpty(strFHPZH))
                    {
                        string strFHPZID = "[VOUCHERID] = \'" + strTemp + "\'";
                        //if (fc["FrmPurchaseReceiveTotal"] != null)
                        //{
                        //    fc["FrmPurchaseReceiveTotal"].Close();
                        //}
                        //FrmPurchaseReceiveTotal FrmPRT = new FrmPurchaseReceiveTotal(strSHHZDID);
                        //FrmPRT.Show();
                        //FrmPRT.Activate();
                    }
                }

            }
        }
Exemplo n.º 2
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 == colXSHZDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colXSHZDID);
                    string strXSHZDID = "[XSHZDID] = \'" + strTemp + "\'";
                    if (fc["FrmSaleTotal"] != null)
                    {
                        fc["FrmSaleTotal"].Close();
                    }
                    FrmSaleTotal FrmST = new FrmSaleTotal(m_fgBranch, strXSHZDID);
                    FrmST.Show();
                    FrmST.Activate();
                }
                else if ((hitInfo.Column != null) && (hitInfo.Column == colXSDH))
                {
                    string strTemp = view.GetRowCellDisplayText(hitInfo.RowHandle, colXSDID);
                    string strXSDH = view.GetRowCellDisplayText(hitInfo.RowHandle, colXSDH);
                    if (!String.IsNullOrEmpty(strXSDH))
                    {
                        string strXSDID = "[XSDID] = \'" + strTemp + "\'";
                        if (fc["FrmSaleNote"] != null)
                        {
                            fc["FrmSaleNote"].Close();
                        }
                        FrmSaleNote FrmSN = new FrmSaleNote(m_fgBranch, strXSDID);
                        FrmSN.Show();
                        FrmSN.Activate();
                    }

                }
            }
        }