Professional Documents
Culture Documents
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Oracle.DataAccess.Types;
using Oracle.DataAccess.Client;
namespace DB
{
ComboBox1.SelectedIndex = 0;
comboBox3.SelectedIndex = 0;
comboBox4.SelectedIndex = 0;
comboBox5.SelectedIndex = 0;
comboBox6.SelectedIndex = 0;
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
int j;
int total=0;
if(checkBox1.CheckState==CheckState.Checked )
{
if (TextBox4.Text != "")
{
int q = Convert.ToInt32(TextBox4.Text);
if (ComboBox1.Text == "Diamond")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
}
else if (ComboBox1.Text == "Silver")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
int price = Convert.ToInt16(p1);
total += price * q;
}
else
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
}
else
{
MessageBox.Show("Please Enter Quantity Of Locket ");
goto j;
}
}
if (checkBox2.CheckState == CheckState.Checked)
{
if(textBox7.Text!="")
{
int q = Convert.ToInt32(textBox7.Text);
if (comboBox3.Text == "Diamond")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
total += price * q;
}
else if (comboBox3.Text == "Silver")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
total += price * q;
}
else
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
}
else
{
MessageBox.Show("Please Enter Quantity Of Ring ");
goto j;
}
if (checkBox3.CheckState == CheckState.Checked)
{
if (textBox8.Text != "")
{
int q = Convert.ToInt32(textBox8.Text.ToString());
if (comboBox4.Text == "Diamond")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
total += price * q;
}
else if (comboBox4.Text == "Silver")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
total += price * q;
}
else
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
}
if (checkBox4.CheckState == CheckState.Checked)
{
if (textBox9.Text != "")
{
int q = Convert.ToInt32(textBox9.Text);
if (comboBox5.Text == "Diamond")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
}
else
{
MessageBox.Show("Please Enter Quantity Bracelete");
goto j;
}
if (checkBox5.CheckState == CheckState.Checked)
{
if (textBox10.Text != "")
{
int q = Convert.ToInt32(textBox10.Text);
if (comboBox6.Text == "Diamond")
{
try
{
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
if (!(reader.HasRows))
{
// txt_query.Text = "No Data Found";
}
else
{
while (reader.Read())
{
p1 = reader["Price"].ToString();
q1 = reader["Quantity"].ToString();
}
}
con.Close();
// dataBind();
}
catch (Exception ex)
{
}
}
}
}