Exemple #1
0
        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string sql = "select FID as ��� from st_stockout where ForgID='" + user._FOrgID + "' and a.FdeptID='" + user._FDeptID + "' and fstatus='������' and (fid='" + this.textBox1.Text + "' or fsaleid='" + this.textBox1.Text + "')";
                DataSet ds = accessorDB.getDataSet(sql);
                if (ds.Tables[0].Rows.Count != 0)
                {

                    product._fid = ds.Tables[0].Rows[0][0].ToString();
                    ds.Dispose();
                    productOut1 pg = new productOut1();
                    if (pg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        pg.tabControl1.SelectedIndex = 0;
                        Dispose();
                    }
                }
                else
                {
                    MessageBox.Show("���ⵥ�����ڻ��Ѿ���ˣ�", "��ʾ");
                    ds.Dispose();
                }
            }
        }