Пример #1
0
        /// <summary>
        /// Профиль
        /// </summary>
        /// <param name="ps">profile_system</param>
        /// <returns></returns>
        public static string GetProfile(ProfileSystem ps) // ♥
        {
            switch (ps)
            {
            case ProfileSystem.OpenTeckDELUX:     // OpenTeck
                return("10");

            // Rehau
            case ProfileSystem.RehauEcosol60:
            case ProfileSystem.RehauEcosol70:
            case ProfileSystem.RehauGeneo:
            case ProfileSystem.RehauSynego:
                return("8");

            case ProfileSystem.SalamanderBluEvolution92:
            case ProfileSystem.SalamanderStreamline:
                return("9");

            case ProfileSystem.WDS5:
            case ProfileSystem.WDS6:
                return("11");

            default:
                return("");
            }
        }
 public bool Edit_ProfileSystem(string id, ProfileSystem _ProfileSystem)
 {
     try
     {
         var findId_ProfileSystem = _context.ProfileSystem.Find(id);
         Console.WriteLine(findId_ProfileSystem.Email + "---------");
         if (findId_ProfileSystem != null)
         {
             findId_ProfileSystem.PhoneNumber    = _ProfileSystem.PhoneNumber;
             findId_ProfileSystem.NameProfile    = _ProfileSystem.NameProfile;
             findId_ProfileSystem.LastName       = _ProfileSystem.LastName;
             findId_ProfileSystem.BirthDay       = _ProfileSystem.BirthDay;
             findId_ProfileSystem.Role           = _ProfileSystem.Role;
             findId_ProfileSystem.KeyOgranzition = _ProfileSystem.KeyOgranzition;
             findId_ProfileSystem.Address        = _ProfileSystem.Address;
             _context.SaveChanges();
             _context.Dispose();
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #3
0
        /// <summary>
        /// Система OPEN TECK
        /// </summary>
        /// <param name="ps">profile_system</param>
        /// <returns></returns>
        public static string GetSystemOpenTeck(ProfileSystem ps)
        {
            switch (ps)
            {
            case ProfileSystem.OpenTeckDELUX:     // OpenTeck
                return("79");

            default:
                return("");
            }
        }
 public IActionResult Edit_ProfileSystem([FromBody] ProfileSystem _ProfileSystem, string id)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest("Invalid model object"));
     }
     if (ProfileSystemRepos.Edit_ProfileSystem(id, _ProfileSystem))
     {
         return(Ok(true));
     }
     return(Ok(false));
 }
Пример #5
0
        /// <summary>
        /// Система WDS
        /// </summary>
        /// <param name="ps">ProfileSystem</param>
        /// <returns></returns>
        public static string GetSystemWDS(ProfileSystem ps) // ♥
        {
            switch (ps)
            {
            case ProfileSystem.WDS5:
                return("104");

            case ProfileSystem.WDS6:
                return("103");

            default:
                return("");
            }
        }
Пример #6
0
        /// <summary>
        /// Система Salamander
        /// </summary>
        /// <param name="ps">ProfileSystem</param>
        /// <returns></returns>
        public static string GetSystemSalamander(ProfileSystem ps) // ♥
        {
            switch (ps)
            {
            case ProfileSystem.SalamanderBluEvolution92:
                return("101");

            case ProfileSystem.SalamanderStreamline:
                return("102");

            default:
                return("");
            }
        }
Пример #7
0
    public GamePlay(Parameters parameters)
    {
        mProfile = new ProfileSystem();
        mLevels  = new LevelSystem(false, false);
        mCheats  = new CheatsSystem();
        mUi      = new UiSystem();

        mParameters  = parameters;
        mGameProcess = false;

        mGameObjects = new Dictionary <string, ObjectBase>();
        mGameObjects.Add("Hero", GameObject.Find("Sphere").GetComponent <Ball>());
        mGameObjects.Add("Road", GameObject.Find("MainObject").GetComponent <Wall>());

        mTimer = new Timer(this);

        mGameData.collisionCounter = 0;
    }
Пример #8
0
        /// <summary>
        /// Система Rehau
        /// </summary>
        /// <param name="ps">profile_system</param>
        /// <returns></returns>
        public static string GetSystemRehau(ProfileSystem ps) // ♥
        {
            switch (ps)
            {
            // Rehau
            case ProfileSystem.RehauEcosol60:
                return("30");

            case ProfileSystem.RehauEcosol70:
                return("31");

            case ProfileSystem.RehauSynego:
                return("33");

            case ProfileSystem.RehauGeneo:
                return("34");

            default:
                return("");
            }
        }
Пример #9
0
        /// <summary>
        /// Системная глубина профиля
        /// </summary>
        /// <param name="str">profile_system</param>
        /// <returns></returns>
        public static string GetSystemProfileDepth(ProfileSystem ps) // ♥
        {
            /*
             *  WDS 5S - 60
             *  OpenTeck DE-LUX - 60
             *  Rehau Ecosol 60 - 60
             *  Salamander Desing 2D - 60
             *
             *  WDS 6S - 70
             *  Rehau Ecosol 70 - 70
             *  Rehau Brilliant Desing - 70
             *  OpenTeck ELIT 70 - 70
             *
             *  Salamander Streamline - 76
             *  Rehau SYNEGO - 80
             *  Salamander BluEvolution 92 - 82
             *  Rehau GENEO - 86
             */

            /*
             *  50 - 29
             *  60 - 48
             *  70 - 49
             *  76 - 99
             *  80 - 111
             *  82 - 109
             *  86 - 110
             */

            switch (ps)
            {
            case ProfileSystem.WDS5:
            case ProfileSystem.OpenTeckDELUX:
            case ProfileSystem.RehauEcosol60:
                return("48");

            case ProfileSystem.WDS6:
            case ProfileSystem.RehauEcosol70:
                return("49");

            case ProfileSystem.SalamanderStreamline:
                return("99");

            case ProfileSystem.RehauSynego:
                return("111");

            case ProfileSystem.SalamanderBluEvolution92:
                return("109");

            case ProfileSystem.RehauGeneo:
                return("110");

            default:
                return("");
            }

            //switch (str)
            //{
            //    case "Open-Teck DE-LUX": // 60
            //        return "48";
            //    case "Rehau Ecosol 60": // 3 60
            //        return "48";
            //    case "Rehau Ecosol 70": // 5 70
            //        return "48";
            //    default:
            //        return "";
            //}
        }
Пример #10
0
        public string GetResultJson(Random rnd, int order)
        {
            JObject result = new JObject();

            result["createdDate"] = DateTime.Now.ToString("yyyy-MM-dd");
            result["createdTime"] = DateTime.Now.ToString("HH:mm:ss");
            result["order"]       = order;

            this.current_system = $"{ this.open_teck}{this.rehau_system}{this.salamander_system}{this.wds_system}";

            var    con_types         = this.construction_type.Split(' ');
            string anotherText       = string.Join(" ", con_types.Skip(1));
            string result_title_text = (con_types[0] == "Окно") ? "Окно металлопластиковое" : "Лоджия";

            result["title"] = $"{result_title_text} {this.profile_system} {this.current_system} {anotherText} {this.height} x {this.width} мм";

            result["active"]     = "1";
            result["available"]  = "1";
            result["cid"]        = "30"; // Категория
            result["bid"]        = "0";
            result["pcode"]      = this.articul;
            result["srok_izgot"] = "3";
            result["calc_link"]  = "/calc/";
            result["price"]      = "1";

            result["related"]     = "";
            result["similar"]     = "";
            result["additions"]   = "";
            result["arKits"]      = "";
            result["meta_key"]    = "";
            result["meta_descr"]  = "";
            result["meta_robots"] = "";
            result["seo_title"]   = "";
            result["seo_path"]    = "";

            if (rnd.Next(15) == 5)
            {
                result["isnewest"] = "1";
            }

            if (rnd.Next(15) == 5)
            {
                result["issalestop"] = "1";
            }

            this.ProfileSystem = Helper.GetProfileSystem(this.profile_system, this.current_system);
            // Характеристики
            result["attributes[16][]"] = Helper.GetWindowType(construction_type);                         // Вид ♥
            result["attributes[7][]"]  = Helper.GetDoubleGlazedWindow(double_glazed_window);              // Стеклопакет ♥

            result["attributes[9][]"]  = Helper.GetHeight(this.height);                                   // Высота ♥
            result["attributes[11][]"] = Helper.GetWidth(this.width);                                     // Ширина ♥

            result["attributes[2][]"]  = Helper.GetCoutry(this.country_producer);                         // Страна-производитель товара ♥
            result["attributes[17][]"] = Helper.GetProfileChamber(this.profile_cameras);                  // Камерность профиля ♥
            result["attributes[3][]"]  = Helper.GetProfile(this.ProfileSystem);                           // Профиль ♥
            result["attributes[13][]"] = Helper.GetFurniture(furniture);                                  // Фурнитура  ♥
            result["attributes[14][]"] = Helper.GetNumberOfActiveSashes(active_sashes);                   // Количество активных створок ♥
            result["attributes[18][]"] = Helper.GetPropertiesOfDoubleGlazedWindows(double_glazed_window); // Свойства стеклопакетов ♥
            result["attributes[15][]"] = Helper.GetColor(String.Empty);                                   // Цвет  ♥
            result["attributes[1][]"]  = Helper.GetSystemProfileDepth(this.ProfileSystem);                // Системная глубина профиля  ♥

            result["attributes[10][]"] = Helper.GetSystemRehau(this.ProfileSystem);                       // Система Rehau ♥
            result["attributes[12][]"] = Helper.GetSystemOpenTeck(this.ProfileSystem);                    // Система OPEN TECK  ♥
            result["attributes[19][]"] = Helper.GetSystemSalamander(this.ProfileSystem);                  // Система Salamander ♥
            result["attributes[20][]"] = Helper.GetSystemWDS(this.ProfileSystem);                         // Система WDS ♥

            return(result.ToString(Formatting.None));
        }
 public bool Create_ProfileSystem(ProfileSystem _ProfileSystem)
 {
     return(Genaral_Add_Edit_Remove <ProfileSystem> .Add_ObjInDatabase(_ProfileSystem, _context));
 }