public void AddLogApplication(LogsApplication item, string connectionName) { Database db = DatabaseFactory.CreateDatabase(connectionName); DbCommand dbCommand = db.GetStoredProcCommand("AddLogApplication"); db.AddInParameter(dbCommand, "UserName", DbType.String, item.UserName); db.AddInParameter(dbCommand, "Firm", DbType.String, MyCTSConvert.ToDBValue(item.Firm)); db.AddInParameter(dbCommand, "UserControlName", DbType.String, MyCTSConvert.ToDBValue(item.UserControlName)); db.AddInParameter(dbCommand, "ErrorDescription", DbType.String, MyCTSConvert.ToDBValue(item.ErrorDescription)); db.AddInParameter(dbCommand, "StackTrace", DbType.String, MyCTSConvert.ToDBValue(item.StackTrace)); db.ExecuteNonQuery(dbCommand); }
public List <SetNewFeeRule> AddNewFeeRule(string attribute1, int priority, string description, string extendedDescription, decimal defaultFee, decimal defaultMount, bool mandatory, bool activationState, DateTime startDate, DateTime expirationDate, string agente, string connectionName) { Database db = DatabaseFactory.CreateDatabase(connectionName); DbCommand dbcomand = db.GetStoredProcCommand(Resources.SetNewFeeRuleResources.SP_SETNEWFEERULE); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY1, DbType.String, attribute1); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY2, DbType.Int32, priority); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY3, DbType.String, description); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY4, DbType.String, extendedDescription); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY5, DbType.Decimal, defaultFee); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY6, DbType.Decimal, defaultMount); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY7, DbType.Boolean, mandatory); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY8, DbType.Boolean, activationState); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY9, DbType.DateTime, MyCTSConvert.ToDBValue(startDate)); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY10, DbType.DateTime, MyCTSConvert.ToDBValue(expirationDate)); db.AddInParameter(dbcomand, Resources.SetNewFeeRuleResources.PARAM_QUERY11, DbType.String, agente); List <SetNewFeeRule> listNewFeeRule = new List <SetNewFeeRule>(); using (IDataReader dr = db.ExecuteReader(dbcomand)) { int _idRuleNumber = dr.GetOrdinal(Resources.SetNewFeeRuleResources.PARAM_IDRULENUMBER); while (dr.Read()) { SetNewFeeRule item = new SetNewFeeRule(); item.IDRuleNumber = dr.GetInt32(_idRuleNumber); listNewFeeRule.Add(item); } return(listNewFeeRule); } }
public void AddDetailsPNR(string recLoc, string origin, string destination, string departureTime, string arrivalTime, string airlineCode, string flightNumber, Nullable <DateTime> departureDate, string airlineRef, DateTime traveldate, string location_dk, Nullable <Decimal> paxNumber, string paxType, string paxName, string paxLastName, string segmentType, string fareBasis, string pcc, string idGroup, string masterPNR, string connectionName) { Database db = DatabaseFactory.CreateDatabase(connectionName); DbCommand dbcomand = db.GetStoredProcCommand(Resources.SetDetailsPNRResources.SP_SetDetailsPNR); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY, DbType.String, recLoc); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY2, DbType.String, origin); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY3, DbType.String, destination); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY4, DbType.String, departureTime); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY5, DbType.String, arrivalTime); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY6, DbType.String, airlineCode); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY7, DbType.String, flightNumber); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY8, DbType.DateTime, departureDate); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY9, DbType.String, airlineRef); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY10, DbType.DateTime, MyCTSConvert.ToDBValue(traveldate)); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY11, DbType.String, location_dk); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY12, DbType.String, paxNumber); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY13, DbType.String, paxType); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY14, DbType.String, paxName); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY15, DbType.String, paxLastName); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY16, DbType.String, segmentType); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY17, DbType.String, fareBasis); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY18, DbType.String, pcc); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY19, DbType.String, idGroup); db.AddInParameter(dbcomand, Resources.SetDetailsPNRResources.PARAM_QUERY20, DbType.String, masterPNR); db.ExecuteNonQuery(dbcomand); }