Пример #1
0
        public static void AddNewSkladStorage(string NameFaction)
        {
            const int Pistols  = 1000;
            const int Rifle    = 1000;
            const int SMG      = 1500;
            const int Shotgun  = 2500;
            const int Melee    = 2500;
            const int Armor    = 2500;
            const int Medicals = 2500;

            switch (NameFaction)
            {
            case "Start":

                Dictionary <string, string> parametersStatr = new Dictionary <string, string>
                {
                    { "@NameFaction", NameFaction },
                    { "@Pistols", Pistols.ToString() },
                    { "@Rifle", Rifle.ToString() },
                    { "@SMG", SMG.ToString() },
                    { "@Shotgun", Shotgun.ToString() },
                    { "@Melee", Melee.ToString() },
                    { "@Armor", Armor.ToString() },
                    { "@Medicals", Medicals.ToString() }
                };

                DataTable resultStatr = Database.ExecutePreparedStatement("INSERT INTO sklad_faction_storages (NameFaction, Pistols, Rifle, SMG, Shotgun, Melee, Armor, Medicals) " +
                                                                          DatabaseValues, parametersStatr);

                break;
            }
        }