Example #1
0
        private void btn设备预览_Click(object sender, EventArgs e)
        {
            FrmPurchaseOrder frm = new FrmPurchaseOrder();

            frm.SaveAfter += new EventHandler(btn查询_Click);
            frm.Show();
        }
        private void gridView请购计划列表_MouseDown(object sender, MouseEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hInfo = gridView采购订单列表.CalcHitInfo(new Point(e.X, e.Y));
            if (e.Button == MouseButtons.Left && e.Clicks == 2)
            {
                //判断光标是否在行范围内
                if (hInfo.InRow)
                {
                    if (gridView采购订单列表.FocusedRowHandle > -1)
                    {
                        var list         = gridView采购订单列表.DataSource as V_ICPOBILLMODEL[];
                        var icprbilldata = list[gridView采购订单列表.GetDataSourceRowIndex(gridView采购订单列表.FocusedRowHandle)];
                        if (icprbilldata.FSTATUS != 1 && icprbilldata.FSTATUS != 4 && icprbilldata.FSTATUS != 0 && !(icprbilldata.FSTATUS == 3 && icprbilldata.FSYNCSTATUS == 4))
                        {
                            MsgHelper.ShowInformation("当前状态不支持修改!");
                            return;
                        }
                        bool bzf = false;
                        if (icprbilldata.FSYNCSTATUS == 4 || icprbilldata.FSTATUS == 3)
                        {
                            bzf = true;
                        }

                        FrmPurchaseOrder frm = new FrmPurchaseOrder(icprbilldata, bzf);
                        if (bzf)
                        {
                            frm.Text = "采购订单作废";
                        }
                        else
                        {
                            frm.Text = "采购订单修改";
                        }
                        frm.SaveAfter += Frm_SaveAfter;
                        frm.Show();
                    }
                }
            }
        }