Ejemplo n.º 1
0
        private void updateDisplay(clsBook prbook)
        {
            _book                  = prbook;
            txtBookName.Text       = _book.Name;
            txtBookPrice.Text      = _book.Price.ToString("###,###.00");
            txtCondition.Text      = _book.Condition;
            txtQuantityOnhand.Text = _book.Quantity.ToString();
            if (_book.ProdType == "O")
            {
                rbOld.Checked = true;
            }
            else
            {
                rbNew.Checked = true;
            }

            if (rbNew.Checked)
            {
                txtCondition.Enabled = false;
            }
            else
            {
                txtQuantityOnhand.Enabled = false;
            }
        }
Ejemplo n.º 2
0
 public DialogResult ShowDialog(string prBookId, string prGenrename)
 {
     if (prBookId != "0000000")
     {
         refreshFormFromDB(prBookId);
         return(ShowDialog());
     }
     else
     {
         _book        = new clsBook();
         _book.BookID = "0000000";
         _book.Genre  = prGenrename;
         return(ShowDialog());
     }
 }