public static Rom SetRom(Rom rom, string id, string fileName,
                                 string romName, string series, string genre, string status, List <RomLabel> labels, string publisher,
                                 string developer, string description, string year, string dbName,
                                 string rating, bool idLocked, bool changeZipName,
                                 string boxPath, string titlePath, string gameplayPath, bool saveAsJpg, string emulator)
        {
            rom.Genre = string.IsNullOrEmpty(genre) ? null : GenreBusiness.Get(genre);

            string oldfile = rom.FileName;

            rom.Id           = id;
            rom.Name         = romName;
            rom.Publisher    = publisher;
            rom.Developer    = developer;
            rom.Description  = description;
            rom.YearReleased = year;
            rom.DBName       = dbName;
            rom.Series       = series;
            rom.IdLocked     = idLocked;
            rom.Emulator     = emulator;
            float ratingParse = 0;

            if (float.TryParse(rating, out ratingParse))
            {
                if (ratingParse > 0 && ratingParse <= 10)
                {
                    rom.Rating = ratingParse;
                }
            }

            RomFunctions.RenameRomPictures(rom, fileName);
            RomFunctions.RenameRomFile(rom, fileName, changeZipName);

            if (string.IsNullOrEmpty(rom.Id))
            {
                rom.DBName = string.Empty;
            }

            if (oldfile != rom.FileName)
            {
                Set(rom, oldfile);

                if (rom.Status != null)
                {
                    RomStatusBusiness.DeleteRomStatus(rom.Status);
                    rom.Status = null;
                }

                if (rom.RomLabels != null)
                {
                    RomLabelsBusiness.DeleteRomLabels(rom.Platform.Name, oldfile);
                    rom.RomLabels = null;
                }
            }
            else
            {
                Set(rom);
            }

            RomFunctions.SaveRomPictures(rom, boxPath, titlePath, gameplayPath, saveAsJpg);
            RomLabelsBusiness.SetRomLabel(rom, labels, null);
            RomStatusBusiness.SetRomStatus(rom, status);
            XML.SaveXmlRoms(rom.Platform.Name);
            rom.FileNameNoExt = RomFunctions.GetFileNameNoExtension(romName);
            return(rom);
        }