private void GridControl_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                //BandedGridView bView = sender as BandedGridView;
                ColumnView columnView = sender as ColumnView;

                Point pt = columnView.GridControl.PointToClient(Control.MousePosition);

                GridHitInfo info = columnView.CalcHitInfo(pt) as GridHitInfo;
                if ((info.RowHandle >= 0) && (info.InRow || info.InRowCell))
                {
                    //  if (columnView.GetRowCellValue(info.RowHandle, "MTL_CODE") != null)
                    //  {
                    string   refNo     = columnView.GetRowCellValue(info.RowHandle, "REF_NO").ToString();
                    string   productNo = columnView.GetRowCellValue(info.RowHandle, "MTL_CODE").ToString();
                    DateTime outDate   = Convert.ToDateTime(columnView.GetRowCellValue(info.RowHandle, "OUT_DATE"));

                    this.ShowStockOutSummaryDetail(refNo, productNo, outDate);
                    // }
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void GridControl_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                //BandedGridView bView = sender as BandedGridView;
                ColumnView columnView = sender as ColumnView;

                Point pt = columnView.GridControl.PointToClient(Control.MousePosition);

                GridHitInfo info = columnView.CalcHitInfo(pt) as GridHitInfo;
                if ((info.RowHandle >= 0) && (info.InRow || info.InRowCell))
                {
                    string whid      = columnView.GetRowCellValue(info.RowHandle, "WH_ID").ToString();
                    string productno = columnView.GetRowCellValue(info.RowHandle, "PRODUCT_NO").ToString();

                    if (this.dtpDateSelect.EditValue != null)
                    {
                        DateTime asOnDate = DateTime.ParseExact(dtpDateSelect.Text, "dd-MM-yyyy HH:mm", DateTimeFormatInfo.CurrentInfo);
                        this.ShowStockAsOnDateDetail(whid, productno, asOnDate);
                    }
                    else
                    {
                        this.ShowStockAsOnDateDetail(whid, productno, null);
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void GridControl_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                ColumnView columnView = sender as ColumnView;

                Point pt = columnView.GridControl.PointToClient(Control.MousePosition);

                GridHitInfo info = columnView.CalcHitInfo(pt) as GridHitInfo;
                if ((info.RowHandle >= 0) && (info.InRow || info.InRowCell))
                {
                    //   if (columnView.GetRowCellValue(info.RowHandle, "MTL_CODE") != null)
                    //  {
                    string whid    = columnView.GetRowCellValue(info.RowHandle, "WH_ID").ToString();
                    string mtlCode = columnView.GetRowCellValue(info.RowHandle, "MTL_CODE").ToString();
                    string cusName = columnView.GetRowCellValue(info.RowHandle, "CUSTOMER").ToString();
                    string arrType = columnView.GetRowCellValue(info.RowHandle, "ARR_TYPE").ToString();

                    DateTime inDate = Convert.ToDateTime(columnView.GetRowCellValue(info.RowHandle, "SHIFT_IN_DATE"));

                    this.ShowStockInSummaryDetail(whid, arrType, cusName, mtlCode, inDate);
                    // }
                }
            }
            catch (Exception ex)
            {
            }
        }
示例#4
0
        private void LayDuLieuKhuyenMai_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            GridControl grid = sender as GridControl;
            ColumnView  view = grid.FocusedView as ColumnView;
            GridHitInfo hi   = view.CalcHitInfo(e.Location) as GridHitInfo;

            if (hi.HitTest == GridHitTest.RowCell)
            {
                string    spid = gvSP.GetFocusedRowCellValue("DTSPID").ToString();
                DsSanPham frm  = new DsSanPham(!gvDH.Editable);
                frm.source.DataSource = GetDataSource(spid);
                frm.StartPosition     = FormStartPosition.CenterScreen;
                var result = frm.ShowDialog();
            }
            return;
        }
        private void GridControl_DoubleClick(object sender, EventArgs e)
        {
            //BandedGridView bView = sender as BandedGridView;
            ColumnView columnView = sender as ColumnView;

            Point pt = columnView.GridControl.PointToClient(Control.MousePosition);

            GridHitInfo info = columnView.CalcHitInfo(pt) as GridHitInfo;

            if (info.InRow || info.InRowCell)
            {
                string mtl_code = columnView.GetRowCellValue(info.RowHandle, "MTL_CODE").ToString();

                this.ShowStockAsOnDateDetail(mtl_code);
            }
        }
示例#6
0
        private void GridControl_DoubleClick(object sender, EventArgs e)
        {
            //BandedGridView bView = sender as BandedGridView;
            ColumnView columnView = sender as ColumnView;

            Point pt = columnView.GridControl.PointToClient(Control.MousePosition);

            GridHitInfo info = columnView.CalcHitInfo(pt) as GridHitInfo;

            if (info.InRow || info.InRowCell)
            {
                string jobNo  = columnView.GetRowCellValue(info.RowHandle, "JOB_NO").ToString();
                string jobLot = columnView.GetRowCellValue(info.RowHandle, "JOB_LOT").ToString();

                this.ShowJobDetail(jobNo, jobLot);
            }
        }