mohammed shamsheer

mohammed shamsheer

  • NA
  • 394
  • 143.6k

CS0407: 'bool Threading_Threading.insertion()' has the wrong

Jul 24 2013 1:34 AM
// insertion function return true if insertion done
public bool insertion()
   {
       bool result=false;
       try
       {
           object[,] obj = new object[,] { { "@Name", txtName.Text }, { "@Address", txtAddress.Text }, { "@EmailId", txtEmailId.Text } };
           result=DB.ExecuteNonQuery_SP("InsertThreading", obj);
       }
       catch (Exception ex) { }
       return result;
   }
 
//thread for insertion and display "success" if InsertionThreadMethod() is true
 protected void btnSave_Click(object sender, EventArgs e)
{
 
        ThreadStart InsertionThread = new ThreadStart(insertion);
        Thread t1 = new Thread(InsertionThread);
        t1.Priority = ThreadPriority.Highest;
        t1.Start();
        if (InsertionThreadMethod() == true)
        {
            lblResult.Text = "Insertion Successful";
        }
 

}

Answers (1)