/// <summary> /// Insert TourInfo. /// </summary> /// <param name="customer">TourBDto object that TourInfo data to insert.</param> /// <returns>Returns 1 and 0; 1 indicates successfull operation.</returns> public int UpdateWebTerms(TourWebBDto objTourWebBDto) { Database db = null; DbCommand dbCmd = null; DataSet ds = null; int Result = 0; try { db = DatabaseFactory.CreateDatabase(DALHelper.CRM_CONNECTION_STRING); dbCmd = db.GetStoredProcCommand(DALHelper.USP_FARE_TOUR_MASTER_WEB_TERMS_UPDATE); db.AddInParameter(dbCmd, "@TOUR_ID", DbType.Int32, objTourWebBDto.tourId); db.AddInParameter(dbCmd, "@WEB_TERMS", DbType.String, objTourWebBDto.Terms); Result = db.ExecuteNonQuery(dbCmd); return Result; } catch (Exception ex) { bool rethrow = ExceptionPolicy.HandleException(ex, DALHelper.DAL_EXP_POLICYNAME); if (rethrow) { throw ex; } } finally { DALHelper.Destroy(ref dbCmd); } return 0; }
public int UpdateWebImportantNotes(TourWebBDto objTourWebBDto) { Database db = null; DbCommand dbCmd = null; int Result = 0; try { db = DatabaseFactory.CreateDatabase(dbConnectionName); dbCmd = db.GetStoredProcCommand(DALHelper.USP_FARE_TOUR_MASTER_WEB_IMPORTANT_NOTES_UPDATE); db.AddInParameter(dbCmd, "@TOUR_ID", DbType.Int32, objTourWebBDto.tourId); if (!string.IsNullOrEmpty(objTourWebBDto.ImportantNote)) db.AddInParameter(dbCmd, "@WEB_IMPORTANT_NOTES", DbType.String, objTourWebBDto.ImportantNote); else db.AddInParameter(dbCmd, "@WEB_IMPORTANT_NOTES", DbType.String, DBNull.Value); Result = db.ExecuteNonQuery(dbCmd); return Result; } catch (Exception ex) { bool rethrow = ExceptionPolicy.HandleException(ex, DALHelper.DAL_EXP_POLICYNAME); if (rethrow) { throw ex; } } finally { DALHelper.Destroy(ref dbCmd); } return 0; }