Beispiel #1
0
        public DataSet SaveSaleStatusDataForTransfers(UserRegistrationInfo objUserRegInfo, string SaleAgentID, int PackageID, int YearOfMake, int MakeModelID, int BodyTypeID, int VehicleConditionID, string DriveTrain, string Price, string Mileage, string ExteriorColor, string InteriorColor, string Transmission,
        string NumberOfDoors, string VIN, string NumberOfCylinder, int FuelTypeID, string Description, string ConditionDescription, string Title, string state, string Ip, string SaleNotes, int LeadStatus, string LastName, int SourceOfPhotosID, int SourceOfDescriptionID,
            int CarID, string UId, int UserPackID, int sellerID, int PostingID, int DispositionID, int EmailExists)
        {
            try
            {
                bool bnew = false;
                DataSet ds = new DataSet();
                string spNameString = string.Empty;
                Database dbDatabase = DatabaseFactory.CreateDatabase(Global.INSTANCE_NAME4);
                spNameString = "USP_SaveSaleStatusDataForTransfers";
                DbCommand dbCommand = null;
                dbCommand = dbDatabase.GetStoredProcCommand(spNameString);
                dbDatabase.AddInParameter(dbCommand, "@Name", System.Data.DbType.String, objUserRegInfo.Name);
                dbDatabase.AddInParameter(dbCommand, "@UserName", System.Data.DbType.String, objUserRegInfo.UserName);
                dbDatabase.AddInParameter(dbCommand, "@PhoneNumber", System.Data.DbType.String, objUserRegInfo.PhoneNumber);
                dbDatabase.AddInParameter(dbCommand, "@Address", System.Data.DbType.String, objUserRegInfo.Address);
                dbDatabase.AddInParameter(dbCommand, "@City", System.Data.DbType.String, objUserRegInfo.City);
                dbDatabase.AddInParameter(dbCommand, "@StateID", System.Data.DbType.Int32, objUserRegInfo.StateID);
                dbDatabase.AddInParameter(dbCommand, "@Zip", System.Data.DbType.String, objUserRegInfo.Zip);
                dbDatabase.AddInParameter(dbCommand, "@SaleAgentID", System.Data.DbType.Int32, SaleAgentID);
                dbDatabase.AddInParameter(dbCommand, "@PackageID", System.Data.DbType.Int32, PackageID);
                dbDatabase.AddInParameter(dbCommand, "@YearOfMake", System.Data.DbType.Int32, YearOfMake);
                dbDatabase.AddInParameter(dbCommand, "@MakeModelID", System.Data.DbType.Int32, MakeModelID);
                dbDatabase.AddInParameter(dbCommand, "@BodyTypeID", System.Data.DbType.Int32, BodyTypeID);
                dbDatabase.AddInParameter(dbCommand, "@VehicleConditionID", System.Data.DbType.Int32, VehicleConditionID);
                dbDatabase.AddInParameter(dbCommand, "@DriveTrain", System.Data.DbType.String, DriveTrain);
                dbDatabase.AddInParameter(dbCommand, "@Price", System.Data.DbType.String, Price);
                dbDatabase.AddInParameter(dbCommand, "@Mileage", System.Data.DbType.String, Mileage);
                dbDatabase.AddInParameter(dbCommand, "@ExteriorColor", System.Data.DbType.String, ExteriorColor);
                dbDatabase.AddInParameter(dbCommand, "@Transmission", System.Data.DbType.String, Transmission);
                dbDatabase.AddInParameter(dbCommand, "@InteriorColor", System.Data.DbType.String, InteriorColor);
                dbDatabase.AddInParameter(dbCommand, "@NumberOfDoors", System.Data.DbType.String, NumberOfDoors);
                dbDatabase.AddInParameter(dbCommand, "@VIN", System.Data.DbType.String, VIN);
                dbDatabase.AddInParameter(dbCommand, "@NumberOfCylinder", System.Data.DbType.String, NumberOfCylinder);
                dbDatabase.AddInParameter(dbCommand, "@FuelTypeID", System.Data.DbType.Int32, FuelTypeID);
                dbDatabase.AddInParameter(dbCommand, "@Description", System.Data.DbType.String, Description);
                dbDatabase.AddInParameter(dbCommand, "@ConditionDescription", System.Data.DbType.String, ConditionDescription);
                dbDatabase.AddInParameter(dbCommand, "@Title", System.Data.DbType.String, Title);
                dbDatabase.AddInParameter(dbCommand, "@state", System.Data.DbType.String, state);

                dbDatabase.AddInParameter(dbCommand, "@Ip", System.Data.DbType.String, Ip);
                dbDatabase.AddInParameter(dbCommand, "@SaleNotes", System.Data.DbType.String, SaleNotes);
                dbDatabase.AddInParameter(dbCommand, "@LeadStatus", System.Data.DbType.Int32, LeadStatus);
                dbDatabase.AddInParameter(dbCommand, "@LastName", System.Data.DbType.String, LastName);
                dbDatabase.AddInParameter(dbCommand, "@SourceOfPhotosID", System.Data.DbType.Int32, SourceOfPhotosID);
                dbDatabase.AddInParameter(dbCommand, "@SourceOfDescriptionID", System.Data.DbType.Int32, SourceOfDescriptionID);

                dbDatabase.AddInParameter(dbCommand, "@CarID", System.Data.DbType.Int32, CarID);
                dbDatabase.AddInParameter(dbCommand, "@UId", System.Data.DbType.String, UId);
                dbDatabase.AddInParameter(dbCommand, "@UserPackID", System.Data.DbType.Int32, UserPackID);
                dbDatabase.AddInParameter(dbCommand, "@sellerID", System.Data.DbType.Int32, sellerID);
                dbDatabase.AddInParameter(dbCommand, "@PostingID", System.Data.DbType.Int32, PostingID);
                dbDatabase.AddInParameter(dbCommand, "@DispositionID", System.Data.DbType.Int32, DispositionID);
                dbDatabase.AddInParameter(dbCommand, "@EmailExists", System.Data.DbType.Int32, EmailExists);
                ds = dbDatabase.ExecuteDataSet(dbCommand);

                return ds;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        public DataSet USP_UpdateRegUserDetails(UserRegistrationInfo objUserregisInfo)
        {
            bool returnValue = false;
            string spNameString = string.Empty;
            DataSet dsUserInfo = new DataSet();
            Database dbDatabase = DatabaseFactory.CreateDatabase(Global.INSTANCE_NAME);
            spNameString = "USP_UpdateRegUserDetails";
            DbCommand dbCommand = null;

            try
            {
                dbCommand = dbDatabase.GetStoredProcCommand(spNameString);
                dbDatabase.AddInParameter(dbCommand, "@UId", System.Data.DbType.Int32, objUserregisInfo.UId);
                dbDatabase.AddInParameter(dbCommand, "@Name", System.Data.DbType.String, objUserregisInfo.Name);
                dbDatabase.AddInParameter(dbCommand, "@PhoneNumber", System.Data.DbType.String, objUserregisInfo.PhoneNumber);
                dbDatabase.AddInParameter(dbCommand, "@StateID", System.Data.DbType.Int32, objUserregisInfo.StateID);
                dbDatabase.AddInParameter(dbCommand, "@City", System.Data.DbType.String, objUserregisInfo.City);
                dbDatabase.AddInParameter(dbCommand, "@Address", System.Data.DbType.String, objUserregisInfo.Address);
                dbDatabase.AddInParameter(dbCommand, "@Zip", System.Data.DbType.String, objUserregisInfo.Zip);

                dsUserInfo = dbDatabase.ExecuteDataSet(dbCommand);

                //blnSuccess = objUserLog.SaveUserLog(UserLogInfo, ref lngReturn, "");
                return dsUserInfo;

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }