Esempio n. 1
0
        public DataSet SmartzSaveRVData(RvUsedcarsInfo objRvUsedCarsInfo, RvCarsInfo objRvCarsInfo, RvSellerInfo objRvSellerInfo)
        {
            try
            {
                DataSet dsCars = new DataSet();
                string spNameString = string.Empty;
                Database dbDatabase = DatabaseFactory.CreateDatabase(Global.INSTANCE_NAME2);
                spNameString = "USP_SmartzSaveRVData";
                DbCommand dbCommand = null;
                dbCommand = dbDatabase.GetStoredProcCommand(spNameString);

                dbDatabase.AddInParameter(dbCommand, "@sellerName", System.Data.DbType.String, objRvSellerInfo.SellerName);
                dbDatabase.AddInParameter(dbCommand, "@Address1", System.Data.DbType.String, objRvSellerInfo.Address1);
                dbDatabase.AddInParameter(dbCommand, "@City", System.Data.DbType.String, objRvSellerInfo.City);
                dbDatabase.AddInParameter(dbCommand, "@State", System.Data.DbType.String, objRvSellerInfo.State);
                dbDatabase.AddInParameter(dbCommand, "@Zip", System.Data.DbType.String, objRvSellerInfo.Zip);
                dbDatabase.AddInParameter(dbCommand, "@Phone", System.Data.DbType.String, objRvSellerInfo.Phone);
                dbDatabase.AddInParameter(dbCommand, "@Email", System.Data.DbType.String, objRvSellerInfo.Email);
                dbDatabase.AddInParameter(dbCommand, "@AltPhone", System.Data.DbType.String, objRvSellerInfo.AltPhone);

                dbDatabase.AddInParameter(dbCommand, "@Carid", System.Data.DbType.Int32, objRvUsedCarsInfo.Carid);
                dbDatabase.AddInParameter(dbCommand, "@Uid", System.Data.DbType.Int32, objRvUsedCarsInfo.Uid);
                dbDatabase.AddInParameter(dbCommand, "@SaleDate", System.Data.DbType.DateTime, objRvUsedCarsInfo.SaleDate);
                dbDatabase.AddInParameter(dbCommand, "@PackageID", System.Data.DbType.Int32, objRvUsedCarsInfo.PackageID);
                dbDatabase.AddInParameter(dbCommand, "@SaleEnteredBy", System.Data.DbType.Int32, objRvUsedCarsInfo.SaleEnteredBy);
                dbDatabase.AddInParameter(dbCommand, "@Ip", System.Data.DbType.String, objRvUsedCarsInfo.Ip);

                dbDatabase.AddInParameter(dbCommand, "@YearOfMake", System.Data.DbType.Int32, objRvCarsInfo.YearOfMake);
                dbDatabase.AddInParameter(dbCommand, "@MakeModelID", System.Data.DbType.Int32, objRvCarsInfo.MakeModelID);
                dbDatabase.AddInParameter(dbCommand, "@Model", System.Data.DbType.String, objRvCarsInfo.Model);
                dbDatabase.AddInParameter(dbCommand, "@Price", System.Data.DbType.String, objRvCarsInfo.Price);
                dbDatabase.AddInParameter(dbCommand, "@Mileage", System.Data.DbType.String, objRvCarsInfo.Mileage);
                dbDatabase.AddInParameter(dbCommand, "@ExteriorColor", System.Data.DbType.String, objRvCarsInfo.ExteriorColor);
                dbDatabase.AddInParameter(dbCommand, "@InteriorColor", System.Data.DbType.String, objRvCarsInfo.InteriorColor);
                dbDatabase.AddInParameter(dbCommand, "@NumberOfDoors", System.Data.DbType.String, objRvCarsInfo.NumberOfDoors);
                dbDatabase.AddInParameter(dbCommand, "@VIN", System.Data.DbType.String, objRvCarsInfo.VIN);
                dbDatabase.AddInParameter(dbCommand, "@FuelTypeID", System.Data.DbType.Int32, objRvCarsInfo.FuelTypeID);
                dbDatabase.AddInParameter(dbCommand, "@StateID", System.Data.DbType.Int32, objRvCarsInfo.StateID);
                dbDatabase.AddInParameter(dbCommand, "@Description", System.Data.DbType.String, objRvCarsInfo.Description);
                dbDatabase.AddInParameter(dbCommand, "@ConditionDescription", System.Data.DbType.String, objRvCarsInfo.ConditionDescription);
                dbDatabase.AddInParameter(dbCommand, "@VehicleConditionID", System.Data.DbType.String, objRvCarsInfo.VehicleConditionID);
                dbDatabase.AddInParameter(dbCommand, "@Title", System.Data.DbType.String, objRvCarsInfo.Title);
                dbDatabase.AddInParameter(dbCommand, "@AirConditioners", System.Data.DbType.Int32, objRvCarsInfo.AirConditioners);
                dbDatabase.AddInParameter(dbCommand, "@Length", System.Data.DbType.String, objRvCarsInfo.Length);
                dbDatabase.AddInParameter(dbCommand, "@WaterCapacity", System.Data.DbType.String, objRvCarsInfo.WaterCapacity);
                dbDatabase.AddInParameter(dbCommand, "@Towing_Capacity", System.Data.DbType.String, objRvCarsInfo.Towing_Capacity);
                dbDatabase.AddInParameter(dbCommand, "@Dry_Weight", System.Data.DbType.String, objRvCarsInfo.Dry_Weight);
                dbDatabase.AddInParameter(dbCommand, "@SleepingCapacity", System.Data.DbType.Int32, objRvCarsInfo.SleepingCapacity);
                dbDatabase.AddInParameter(dbCommand, "@SlideOuts", System.Data.DbType.Int32, objRvCarsInfo.SlideOuts);
                dbDatabase.AddInParameter(dbCommand, "@EngineManufacturer", System.Data.DbType.String, objRvCarsInfo.EngineManufacturer);
                dbDatabase.AddInParameter(dbCommand, "@EngineType", System.Data.DbType.String, objRvCarsInfo.EngineType);

                dsCars = dbDatabase.ExecuteDataSet(dbCommand);
                return dsCars;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
        public bool SmartzUpdateRVEditData(RvSellerInfo objSellerInfo, RvCarsInfo objCarsInfo, RvUsedcarsInfo objUsedCarsInfo, int TranBy)
        {
            try
            {
                bool bnew = false;
                string spNameString = string.Empty;
                Database dbDatabase = DatabaseFactory.CreateDatabase(Global.INSTANCE_NAME2);
                spNameString = "USP_SmartzUpdateRVEditData";
                DbCommand dbCommand = null;
                dbCommand = dbDatabase.GetStoredProcCommand(spNameString);

                dbDatabase.AddInParameter(dbCommand, "@Phone", System.Data.DbType.String, objSellerInfo.Phone);
                dbDatabase.AddInParameter(dbCommand, "@City", System.Data.DbType.String, objSellerInfo.City);
                dbDatabase.AddInParameter(dbCommand, "@Email", System.Data.DbType.String, objSellerInfo.Email);
                dbDatabase.AddInParameter(dbCommand, "@State", System.Data.DbType.String, objSellerInfo.State);
                dbDatabase.AddInParameter(dbCommand, "@Zip", System.Data.DbType.String, objSellerInfo.Zip);
                dbDatabase.AddInParameter(dbCommand, "@AltPhone", System.Data.DbType.String, objSellerInfo.AltPhone);

                dbDatabase.AddInParameter(dbCommand, "@YearOfMake", System.Data.DbType.Int32, objCarsInfo.YearOfMake);
                dbDatabase.AddInParameter(dbCommand, "@MakeModelID", System.Data.DbType.Int32, objCarsInfo.MakeModelID);
                dbDatabase.AddInParameter(dbCommand, "@Model", System.Data.DbType.String, objCarsInfo.Model);
                dbDatabase.AddInParameter(dbCommand, "@VehicleConditionID", System.Data.DbType.String, objCarsInfo.VehicleConditionID);
                dbDatabase.AddInParameter(dbCommand, "@CarID", System.Data.DbType.Int32, objCarsInfo.CarID);
                dbDatabase.AddInParameter(dbCommand, "@Price", System.Data.DbType.String, objCarsInfo.Price);
                dbDatabase.AddInParameter(dbCommand, "@Mileage", System.Data.DbType.String, objCarsInfo.Mileage);
                dbDatabase.AddInParameter(dbCommand, "@ExteriorColor", System.Data.DbType.String, objCarsInfo.ExteriorColor);
                dbDatabase.AddInParameter(dbCommand, "@InteriorColor", System.Data.DbType.String, objCarsInfo.InteriorColor);
                dbDatabase.AddInParameter(dbCommand, "@NumberOfDoors", System.Data.DbType.String, objCarsInfo.NumberOfDoors);
                dbDatabase.AddInParameter(dbCommand, "@VIN", System.Data.DbType.String, objCarsInfo.VIN);
                dbDatabase.AddInParameter(dbCommand, "@FuelTypeID", System.Data.DbType.Int32, objCarsInfo.FuelTypeID);
                dbDatabase.AddInParameter(dbCommand, "@Description", System.Data.DbType.String, objCarsInfo.Description);
                dbDatabase.AddInParameter(dbCommand, "@ConditionDescription", System.Data.DbType.String, objCarsInfo.ConditionDescription);
                dbDatabase.AddInParameter(dbCommand, "@Title", System.Data.DbType.String, objCarsInfo.Title);
                dbDatabase.AddInParameter(dbCommand, "@AirConditioners", System.Data.DbType.Int32, objCarsInfo.AirConditioners);
                dbDatabase.AddInParameter(dbCommand, "@Length", System.Data.DbType.String, objCarsInfo.Length);
                dbDatabase.AddInParameter(dbCommand, "@WaterCapacity", System.Data.DbType.String, objCarsInfo.WaterCapacity);
                dbDatabase.AddInParameter(dbCommand, "@Towing_Capacity", System.Data.DbType.String, objCarsInfo.Towing_Capacity);
                dbDatabase.AddInParameter(dbCommand, "@Dry_Weight", System.Data.DbType.String, objCarsInfo.Dry_Weight);
                dbDatabase.AddInParameter(dbCommand, "@SleepingCapacity", System.Data.DbType.Int32, objCarsInfo.SleepingCapacity);
                dbDatabase.AddInParameter(dbCommand, "@SlideOuts", System.Data.DbType.Int32, objCarsInfo.SlideOuts);
                dbDatabase.AddInParameter(dbCommand, "@EngineManufacturer", System.Data.DbType.String, objCarsInfo.EngineManufacturer);
                dbDatabase.AddInParameter(dbCommand, "@EngineType", System.Data.DbType.String, objCarsInfo.EngineType);
                dbDatabase.AddInParameter(dbCommand, "@InternalNotes", System.Data.DbType.String, objCarsInfo.InternalNotes);

                dbDatabase.AddInParameter(dbCommand, "@IsActive", System.Data.DbType.Int32, objUsedCarsInfo.IsActive);
                dbDatabase.AddInParameter(dbCommand, "@ListingStatus", System.Data.DbType.Int32, objUsedCarsInfo.AdStatus);
                dbDatabase.AddInParameter(dbCommand, "@SellerID", System.Data.DbType.Int32, objUsedCarsInfo.SellerID);
                dbDatabase.AddInParameter(dbCommand, "@PostingID", System.Data.DbType.Int32, objUsedCarsInfo.PostingID);

                dbDatabase.AddInParameter(dbCommand, "@TranBy", System.Data.DbType.Int32, TranBy);

                dbDatabase.ExecuteDataSet(dbCommand);
                bnew = true;
                return bnew;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }