#region AddBus public int Addbus(BusinessObject.BusinessObject objbo) { //Create Connection SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString()); //Open the Connection con.Open(); //pass the procedure SqlCommand cmd = new SqlCommand("proc_addbus",con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@svno",objbo.ServiceNo); cmd.Parameters.AddWithValue("@fromplace",objbo.FromPlace); cmd.Parameters.AddWithValue("@toplace",objbo.Toplace); cmd.Parameters.AddWithValue("@capacity",objbo.capacity); cmd.Parameters.AddWithValue("@arrtime",objbo.ArriTime); cmd.Parameters.AddWithValue("@depttime",objbo.DeptTime); cmd.Parameters.AddWithValue("@tname",objbo.TrevalAgnName); cmd.Parameters.AddWithValue("@bustype",objbo.BusType); int i = cmd.ExecuteNonQuery(); return i; } #endregion
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)