public int Insert(Quotation q) { SqlConnection con = new SqlConnection("server=SREERAJ-PC;integrated security=true;database=obs"); SqlCommand cmd = new SqlCommand("Add_Quotation", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter p1 = cmd.Parameters.AddWithValue("@CRN", q.Crn); SqlParameter p2 = cmd.Parameters.AddWithValue("@v_type", q.VehicleType); SqlParameter p3 = cmd.Parameters.AddWithValue("@brand", q.Brand); SqlParameter p4 = cmd.Parameters.AddWithValue("@model", q.Model); SqlParameter p5 = cmd.Parameters.AddWithValue("@chassiss_no", q.ChassissNo); SqlParameter p6 = cmd.Parameters.AddWithValue("@engine_no", q.EngineNo); SqlParameter p7 = cmd.Parameters.AddWithValue("@exshowroom_price", q.Price); SqlParameter returnParam = new SqlParameter(); returnParam.Value = ParameterDirection.ReturnValue; con.Open(); cmd.ExecuteNonQuery(); return Convert.ToInt32(returnParam.Value); }
public int Insert(Quotation q) { DALInsurance insurance = new DALInsurance(); return insurance.Insert(q); }
public Quotation Insert(Quotation q) { return dal.Insert(q); }