public string GetCompanyStatById(string cid, string bd, string ed) { BidContext bc = new BidContext(); DataTable dt = bc.GetCompanyStatById(cid, bd, ed); return(JsonHelper.DataTableToJSON(dt)); }
public ActionResult StatisticDetail(string cid, string bd, string ed) { ViewBag.cid = cid; BidContext bc = new BidContext(); DataTable dt = bc.GetCompanyStatById(cid, bd, ed); if (dt.Rows.Count > 0) { ViewBag.Name = dt.Rows[0]["Name"].ToString(); ViewBag.Total = (int.Parse(dt.Rows[0]["JoinBiding"].ToString()) + int.Parse(dt.Rows[0]["NoJoin"].ToString()) + int.Parse(dt.Rows[0]["NoResponse"].ToString())).ToString(); ViewBag.JoinBiding = dt.Rows[0]["JoinBiding"].ToString(); ViewBag.NoJoin = dt.Rows[0]["NoJoin"].ToString(); ViewBag.NoResponse = dt.Rows[0]["NoResponse"].ToString(); ViewBag.NoWin = dt.Rows[0]["NoWin"].ToString(); ViewBag.Win = dt.Rows[0]["Win"].ToString(); ViewBag.TotalAmount = dt.Rows[0]["TotalAmount"].ToString(); } return(View()); }