Exemplo n.º 1
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));

            try
            {
                if (e.Button == MouseButtons.Left && e.Clicks == 1)
                {
                    //判断光标是否在行范围内
                    if (hInfo.InRow && hInfo.Column != null && hInfo.Column.FieldName.ToUpper() == "INVNUM")
                    {
                        string s_fa001 = gridView1.GetRowCellValue(hInfo.RowHandle, "FA001").ToString();
                        if (BusinessAction.GetHaveInvoicePapers(s_fa001) > 1)  //如果已开发票数量大于1
                        {
                            Frm_InvoiceInfo frm_1 = new Frm_InvoiceInfo();
                            frm_1.swapdata["fa001"] = s_fa001;
                            frm_1.ShowDialog();
                            frm_1.Dispose();
                        }
                    }
                }
            }
            catch (Exception ee)
            {
                XtraMessageBox.Show(ee.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                LogUtils.Error(ee.ToString());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 显示发票信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));

            if (e.Button == MouseButtons.Left && e.Clicks == 1)
            {
                //判断光标是否在行范围内
                if (hInfo.InRow && (hInfo.Column != null) && hInfo.Column.FieldName.ToUpper() == "FA190" && gridView1.GetRowCellValue(hInfo.RowHandle, "FA190").ToString() != "00")
                {
                    string          s_fa001 = gridView1.GetRowCellValue(hInfo.RowHandle, "FA001").ToString();
                    Frm_InvoiceInfo frm_1   = new Frm_InvoiceInfo();
                    frm_1.swapdata["FA001"] = s_fa001;
                    frm_1.ShowDialog();
                    frm_1.Dispose();
                }
            }
        }