public virtual IBramkaBanku UtworzBramkeBanku(eNazwyBankow wyborBankow)
        {
            IBramkaBanku bramka = null;

            switch (wyborBankow)
            {
            case eNazwyBankow.mBank:
                bramka = new mBank();
                break;

            case eNazwyBankow.ING:
                bramka = new ING();
                break;

            case eNazwyBankow.PKO:
                bramka = new PKO();
                break;

            case eNazwyBankow.Santander:
                bramka = new Santander();
                break;

            default:
                break;
            }

            return(bramka);
        }
Ejemplo n.º 2
0
        /*
         *
         *
         * STRONA KOPCIA
         *
         *
         */
        public IActionResult PoziomyKopec()
        {
            ViewData["Message"] = "Obliczenia długosci poziomego wymiennika ciepła wg. Kopcia";
            var model = new PKO();

            model.BOX1      = "style1";
            model.BOX2      = "style1";
            model.BOX3      = "style1";
            model.BOX4      = "style1";
            model.BOX5      = "style1";
            model.BOX6      = "style1";
            model.Selector3 = "?";
            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult PoziomyKopec(PKO c, string Oblicz)

        {
            if (Oblicz == "btn1")
            {
                //Q0 = Qg * ((Fi - 1) / Fi);
            }
            else if (Oblicz == "btn2")
            {
                //B = H / Z;
            }
            else if (Oblicz == "btn3")
            {
                //x = X4 - X3 + B * (X2 - X4);
            }
            else if (Oblicz == "btn4")
            {
                // C = ((2 * X3) / (X1 * X5)) + ((X3 / X4) * Math.Log(X6 / X5)) + Math.Log(((2 * X3) / X6) * ((1 / X2) + (Z / X3)));
                // K = (1 / PI) * Math.Exp(C + (Math.Pow(PI, 2) / 4) * Math.Exp(-2 * C)) * Math.Sin(PI * B);
            }
            else if (Oblicz == "btn5")
            {
                // qL = X1 * x * ((2 * PI) / (Math.Log(K + Math.Sqrt(Math.Pow(K, 2) - 1))));
                // ql1 = itm.Value * qL;
            }
            else if (Oblicz == "btn6")
            {
                /*
                 * qH = qL / EP;
                 * A0 = Q0 / qH;
                 * Lp = A0 / EP;
                 */
            }

            return(View(c));
        }
Ejemplo n.º 4
0
        public ActionResult PoziomyKopec(PKO c, string Oblicz)

        {
            switch (Oblicz)
            {
            case "btn1":
                if (ModelState.IsValid)
                {
                    c.KQ0  = (c.KQc * ((c.KCOP - 1) / c.KCOP)) * 1000;
                    c.KQ0  = Math.Round(c.KQ0, 2);
                    c.BOX1 = "style2";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                }
                else
                {
                    c.BOX1 = "style3";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                    ViewData["Message"] = "Błąd wprowadzania danych!";
                }
                return(View(c));

            case "btn2":
                if (ModelState.IsValid)
                {
                    c.KB   = c.KH / c.KZ;
                    c.KB   = Math.Round(c.KB, 4);
                    c.BOX1 = "style1";
                    c.BOX2 = "style2";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                }
                else
                {
                    c.BOX1 = "style1";
                    c.BOX2 = "style3";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                    ViewData["Message"] = "Błąd wprowadzania danych!";
                }
                return(View(c));

            case "btn3":
                if (ModelState.IsValid)
                {
                    c.DT   = c.Ktp - c.KTgm + (c.KB * (c.KTgr - c.Ktp));
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style2";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                }
                else
                {
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style3";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                    ViewData["Message"] = "Błąd wprowadzania danych!";
                }
                return(View(c));

            case "btn4":
                if (ModelState.IsValid)
                {
                    c.KC   = ((2 * c.KAgr) / (c.Kalfag * c.Kdw)) / ((c.KAgr / c.KAr) * Math.Log(c.Kdz / c.Kdw)) + Math.Log(((2 * c.KAgr) / c.Kdz) * ((1 / c.Kalfap) + (c.KZ / c.KAgr)));
                    c.KC   = Math.Round(c.KC, 8);
                    c.KK   = (1 / Math.PI) * Math.Exp(c.KC + (Math.Pow(Math.PI, 2) / 4) * Math.Exp(-2 * c.KC)) * Math.Sin(Math.PI * c.KB);
                    c.KK   = Math.Round(c.KK, 8);
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style2";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                }
                else
                {
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style3";
                    c.BOX5 = "style1";
                    c.BOX6 = "style1";
                    ViewData["Message"] = "Błąd wprowadzania danych!";
                }
                return(View(c));

            case "btn5":
                if (ModelState.IsValid)
                {
                    Convert.ToDouble(c.Selector3);
                    double itemek;
                    itemek = Convert.ToDouble(c.Selector3);
                    c.KqL  = (c.DT * c.Agr * ((2 * Math.PI) / (Math.Log(c.KK + Math.Sqrt(Math.Pow(c.KK, 2) - 1))))) * itemek;
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style2";
                    c.BOX6 = "style1";
                }
                else
                {
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style3";
                    c.BOX6 = "style1";
                    ViewData["Message"] = "Błąd wprowadzania danych!";
                }
                return(View(c));

            case "btn6":
                if (ModelState.IsValid)
                {
                    double A0;
                    c.Kqh  = c.KqL / c.Kep;
                    A0     = c.KQ0 / c.Kqh;
                    c.KLp  = A0 / c.Kep;
                    c.KLp  = Math.Round(c.KLp, 2);
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style2";
                }
                else
                {
                    c.BOX1 = "style1";
                    c.BOX2 = "style1";
                    c.BOX3 = "style1";
                    c.BOX4 = "style1";
                    c.BOX5 = "style1";
                    c.BOX6 = "style3";
                    ViewData["Message"] = "Błąd wprowadzania danych!";
                }
                return(View(c));

            case "zapisz2":
                TempData["KQc"]    = c.KQc;
                TempData["KCOP"]   = c.KCOP;
                TempData["KQ0"]    = c.KQ0;
                TempData["KH"]     = c.KH;
                TempData["KZ"]     = c.KZ;
                TempData["KB"]     = c.KB;
                TempData["KTgr"]   = c.KTgr;
                TempData["DT"]     = c.DT;
                TempData["KTgm"]   = c.KTgm;
                TempData["KTp"]    = c.Ktp;
                TempData["Kalfag"] = c.Kalfag;
                TempData["Kalfap"] = c.Kalfap;
                TempData["KAgr"]   = c.KAgr;
                TempData["Agr"]    = c.Agr;
                TempData["KAr"]    = c.KAr;
                TempData["Kdw"]    = c.Kdw;
                TempData["Kdz"]    = c.Kdz;
                TempData["KK"]     = c.KK;
                TempData["KC"]     = c.KC;
                TempData["KqL"]    = c.KqL;
                TempData["Kqh"]    = c.Kqh;
                TempData["Kep"]    = c.Kep;
                TempData["KLp"]    = c.KLp;
                return(RedirectToAction("Create", "Baza"));
            }

            return(View(c));
        }