//flower search butoon private void flowerSearchBtn_Click(object sender, EventArgs e) { try { //value passs to business layer Logclass variable to FlowerClass obj = new FlowerClass(); //check text box empty or not if (textBoxFlowerCode.Text != "") { //set value to search obj.flowerId = textBoxFlowerCode.Text; //obj.CategoryName = textBox2.Text; // ExecuteNonQuery() if worked return value=truee return value=0 CtegoryClass in BusinessLayer if (obj.flowerSearch() == 1) { //out put values textBoxFlowerCode.Text = obj.flowerId; textBoxFlowerName.Text = obj.flowerName; textBoxFlowerPriceOne.Text = obj.flowerPriceone; textBoxFlowerQuentity.Text = obj.flowerQuentity; //CategoryFbox.Text = obj.flowerCategory; richTextBoxFlowerDiscription.Text = obj.flowerDescription; //Bitmap Imag = obj.flowerSearch(); //pictureBoxFlower.Image = Imag; } else { MessageBox.Show("---Can not Search category !---"); } } else { MessageBox.Show("---please enter values !---"); } } catch (Exception ex) { MessageBox.Show("---ERROR IN SQL CONNECTION---" + '\n' + ex); } }
protected void LinkButton1_Click(object sender, EventArgs e) { Session.Abandon(); Response.Redirect("Order.aspx");//move to the next link i.e Order.aspx try { //value passs to business layer Logclass variable to FlowerClass obj = new FlowerClass(); //check text box empty or not if (flowerOrderTxt.Text != "") { //set value to search obj.flowerId = flowerOrderTxt.Text; // ExecuteNonQuery() if worked return value=truee return value=0 CtegoryClass in BusinessLayer if (obj.flowerSearch() == 1) { //out put values fcode = obj.flowerId; fname = obj.flowerName; fprice = obj.flowerPriceone; fqentity = obj.flowerQuentity; fcategory = obj.flowerCategory; //Bitmap Imag = obj.flowerSearch(); //pictureBoxFlower.Image = Imag; } else { } } else { } } catch (Exception ex) { throw ex; } }