Example #1
0
        /// <summary>
        /// 双击编辑 排
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {
            int         rowHandle = gridView1.FocusedRowHandle;
            GridHitInfo hInfo     = gridView1.CalcHitInfo(new Point(e.X, e.Y));

            if (e.Button == MouseButtons.Left && e.Clicks == 2)
            {
                //判断光标是否在行范围内
                if (hInfo.InRow && hInfo.Column != null && rowHandle >= 0)
                {
                    string    s_rg001 = gridView1.GetRowCellValue(rowHandle, "RG001").ToString();
                    string    s_rg009 = gridView1.GetRowCellValue(rowHandle, "RG009").ToString();
                    Frm_rower frm_1   = new Frm_rower();
                    frm_1.swapdata["dataset"] = tg_ds;
                    frm_1.swapdata["rg001"]   = s_rg001;
                    frm_1.swapdata["rg009"]   = s_rg009;
                    if (frm_1.ShowDialog() == DialogResult.OK)
                    {
                        //Tools.msg(MessageBoxIcon.Information, "提示", "");
                        this.DrawGrid(curRegionId);
                    }
                    frm_1.Dispose();
                }
            }
        }
Example #2
0
        /// <summary>
        /// 新建墓区排
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frm_rower frm_1 = new Frm_rower();

            ///传递数据
            frm_1.swapdata["dataset"] = tg_ds;
            frm_1.swapdata["rg009"]   = curRegionId;
            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                Tools.msg(MessageBoxIcon.Information, "提示", "操作成功!");
                DrawGrid(curRegionId);
            }
            frm_1.Dispose();
        }