Пример #1
0
        private void btnTxtInvCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                string sInvCode = btnTxtInvCode.Text.Trim();

                FrmInvInfo   frm = new FrmInvInfo(sInvCode, false);
                DialogResult d   = frm.ShowDialog();
                if (d == DialogResult.OK)
                {
                    lookUpEditInvName.EditValue = frm.sInvCode;
                }
            }
            catch { }
        }
Пример #2
0
        private void ItemButtonEditInvName_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                gridView1.FocusedColumn = gridColInvStd;
                gridView1.FocusedColumn = gridColInvName;
                string     sInvName = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridColInvName).ToString().Trim();
                FrmInvInfo frm      = new FrmInvInfo(sInvName, false);
                frm.ShowDialog();

                sInvName = frm.sInvName;
                string sInvStd = frm.sInvStd;

                if (sInvName != "")
                {
                    gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridColInvName, sInvName);
                    gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridColInvStd, sInvStd);
                }
            }
            catch { }
        }
Пример #3
0
        private void ItemButtonEditInvCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                gridView1.FocusedColumn = gridCol存货编码;
                string sInvCode = gridView1.GetRowCellDisplayText(gridView1.FocusedRowHandle, gridCol存货编码).ToString().Trim();

                gridView1.FocusedColumn = gridCol存货编码;

                FrmInvInfo   frm = new FrmInvInfo(sInvCode, false);
                DialogResult d   = frm.ShowDialog();
                if (d == DialogResult.OK)
                {
                    gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridCol存货编码, frm.sInvCode);
                    gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridCol存货名称, frm.sInvName);
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show("加载存货档案失败:" + ee.Message);
            }
        }
Пример #4
0
        private void ItemButtonEditcInvCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                try
                {
                    gridView1.FocusedColumn = gridColItemName;
                    gridView1.FocusedColumn = gridColItemCode;
                }
                catch { }

                string sInvCode = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridColItemCode).ToString().Trim();

                FrmInvInfo   frm = new FrmInvInfo(sInvCode, false);
                DialogResult d   = frm.ShowDialog();
                if (d == DialogResult.OK)
                {
                    gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridColItemCode, frm.sInvCode);
                }
            }
            catch { }
        }
Пример #5
0
        private void btnTxtInvCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                string sInvCode = btnTxtInvCode.Text.Trim();

                FrmInvInfo   frm = new FrmInvInfo(sInvCode, false);
                DialogResult d   = frm.ShowDialog();
                if (d == DialogResult.OK)
                {
                    btnTxtInvCode.Text           = frm.sInvCode;
                    lookUpEditcInvName.EditValue = frm.sInvCode;
                }
                else
                {
                    btnTxtInvCode.Text           = "";
                    lookUpEditcInvName.EditValue = DBNull.Value;
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show("加载存货档案失败:" + ee.Message);
            }
        }