if (re.IsMatch(tb3.Text))
  {
  strin str1="select count(*) from base where job='" + tb1.Text + "'";
  string str = "insert into base(job,basepayment) values('" + tb1.Text + "','" + float.Parse(tb3.Text) + "')";
  SqlCommand com1=new SqlCommand(str1,con)
  if(con.State!=ConnectionState.Open)
  {
     con.Open();
  }
  int ret=Convert.ToInt32(com1.ExecuteScalar());
  if(ret==0)
  {
     SqlCommand com = new SqlCommand(str, con);
     com.ExecuteNonQuery();
     BindGrid();
     a();
  }
  con.Close();
  }