Beispiel #1
0
 //按键事件
 private void txt_Prot_Name_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             common.Prot_name        = txt_Prot_Name.Text;
             common.Prot_EnterAndOut = true;
             Frm_StoreQuery fs = new Frm_StoreQuery();
             fs.ShowDialog();
             StoreRoom s = common.s;
             txt_Prot_Bigunit.Text     = s.Prot_Bigunit;
             txt_Prot_Name.Text        = s.Prot_name;
             txt_Prot_Rate.Text        = s.Prot_rate.ToString();
             txt_Prot_Retailprice.Text = s.Prot_retailprice.ToString();
             txt_Prot_Smallunit.Text   = s.Prot_smallunit;
             txt_Prot_Tradeprice.Text  = s.Prot_tradeprice.ToString();
             cbb_Cards_Name.Text       = s.Cards_name;
             cbb_Priv_Name.Text        = s.Priv_name;
             dtp_Prot_Date.Value       = s.Prot_date;
             lb_Prot_id.Text           = s.Prot_id.ToString();
             txt_Enter_Num.Focus();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("请选择一项");
     }
 }
Beispiel #2
0
 private void tsmi_StoreQuery_Click(object sender, EventArgs e)
 {
     fsq.MdiParent = this;
     if (fsq.Visible)
     {
         fsq.Focus();
         return;
     }
     else
     {
         fsq           = new Frm_StoreQuery();
         fsq.MdiParent = this;
         fsq.Show();
     }
 }