Exemplo n.º 1
0
        public ActionResult Scalar(string Scalars)
        {
            Scalar scalar = new Scalar();
            scalar.SetScalarValues(Scalars);
            scalar = repo.GetScalar(scalar);

            return View(scalar);
        }
Exemplo n.º 2
0
        public Scalar GetScalar(Scalar scalar)
        {
            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                SqlCommand cmd = new SqlCommand();
                cmd.CommandText = scalar.ScalarName;
                cmd.Connection = cn;

                cn.Open();

                scalar.value = (int)cmd.ExecuteScalar();
                cn.Close();
                return scalar;

            }
        }
Exemplo n.º 3
0
        public ActionResult Scalar()
        {
            Scalar scalar = new Scalar();

            return View(scalar);
        }