コード例 #1
0
        private void GetAssetUsage(Logging logging)
        {
            var projId = logging.project_id;

            var accomoTotalCost  = _insedlu.GetAssetTotal(projId, "accommodation").First();
            var vehiTotalCost    = _insedlu.GetAssetTotal(projId, "vehicle").First();
            var telTotalCost     = _insedlu.GetAssetTotal(projId, "telephone").First();
            var matTotalCost     = _insedlu.GetAssetTotal(projId, "print").First();
            var emplTotalCost    = _insedlu.GetAssetTotal(projId, "employee").First();
            var wifiTotalCost    = _insedlu.GetAssetTotal(projId, "wifi").First();
            var refreshTotalCost = _insedlu.GetAssetTotal(projId, "refreshment").First();

            var breaker = new Literal();

            breaker.Text = "<br/>";
            var assetSummary = string.Format("Accommodation : R {0} \\n\\Vehicle : R {1} \\n\\Telephone : R {2} \\n\\Print Material : R {3}\\n\\Employee : R {4}\\n\\WIFI : R {5}\\n\\Refreshment : R {6}", accomoTotalCost, vehiTotalCost, telTotalCost, matTotalCost, emplTotalCost, wifiTotalCost, refreshTotalCost);

            Page.ClientScript.RegisterClientScriptBlock(GetType(), "alert", "alert('" + assetSummary + "')", true);
        }