示例#1
0
 private void updateButton_Click(object sender, EventArgs e)
 {
     if (idshopText.TextLength == 0 || addressText.TextLength == 0 || nameshopText.TextLength == 0 || stockText.TextLength == 0)
     {
         statusLabel.Visible = true;
         statusLabel.Text    = "You need filling all blank";
     }
     else
     {
         try
         {
             cs.Update(oldID, idshopText.Text, nameshopText.Text, addressText.Text, stockText.Text);
             statusLabel.Visible = false;
             ManageShop_Load(sender, e);
         }
         catch
         {
             statusLabel.Visible = true;
             statusLabel.Text    = "ID already exists or Stock doesn't exists";
         }
     }
 }