private void FunInsOrderDetails() { using (OleDbConnection connection = new OleDbConnection(DataConnection.constring)) { OleDbTransaction transaction = null; try { OleDbCommand command = connection.CreateCommand(); connection.Open(); transaction = connection.BeginTransaction(); // Assign Transaction to Command command.Transaction = transaction; command.CommandText= "insert into Custorder values('" + cmbOrderType.Text + "'," + txtOrderNo.Text + ",'" + dtpDate.Value.ToString("yyyy-MM-dd") + "','" + txtYourOrderNo.Text + "'," + cmbCustName.SelectedValue.ToString() + ")"; command.ExecuteNonQuery(); FunInsOrder(command); transaction.Commit(); connection.Close(); } catch { transaction.Rollback(); connection.Close(); throw; } } }
str="Select OrderId from Custorder where OrderNo="+txtOrderNo.Text+" AND OrderType='"+cmbOrderType.Text+"'"; int OrderId = dc.RetutnID(str);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)