コード例 #1
0
 public string[] GetData()
 {
     return(new string[] { Date.ToShortDateString(), SellsProfit.ToString() + "$", AdvsProfit.ToString() + "$",
                           DAU.ToString(), MAU.ToString(), LAU.ToString(), NewUsers.ToString(), PAU.ToString(),
                           NetworkPostsCount.ToString(), AvgSessionTime.ToString(), AvgSessionCount.ToString(),
                           ARPU.ToString(), ARPPU.ToString(), Involvement.ToString() + "%", ConversionRate.ToString() + "%" });
 }
コード例 #2
0
 public JsonResult Save(int id, string flag, string value)
 {
     if (flag == "mau")
     {
         MAU mau = _connect.MAUs.SingleOrDefault(p => p.ID == id);
         mau.MAUSP = value;
     }
     if (flag == "hang")
     {
         HANG hang = _connect.HANGs.SingleOrDefault(p => p.ID == id);
         hang.HANGSX = value;
     }
     if (flag == "loai")
     {
         LOAI loai = _connect.LOAIs.SingleOrDefault(p => p.ID == id);
         loai.LOAISP = value;
     }
     _connect.SaveChanges();
     return(Json(new { status = true }, JsonRequestBehavior.AllowGet));
 }
コード例 #3
0
        public JsonResult Delete(int id, string flag)
        {
            if (flag == "mau")
            {
                MAU mau = _connect.MAUs.SingleOrDefault(p => p.ID == id);

                _connect.MAUs.Remove(mau);
            }
            if (flag == "hang")
            {
                HANG hang = _connect.HANGs.SingleOrDefault(p => p.ID == id);

                _connect.HANGs.Remove(hang);
            }
            if (flag == "loai")
            {
                LOAI loai = _connect.LOAIs.SingleOrDefault(p => p.ID == id);
                _connect.LOAIs.Remove(loai);
            }
            _connect.SaveChanges();
            return(Json(new { status = true }, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public JsonResult Add(string flag, string value)
        {
            if (flag == "mau")
            {
                MAU mau = new MAU();
                mau.MAUSP = value;
                _connect.MAUs.Add(mau);
            }
            if (flag == "hang")
            {
                HANG hang = new HANG();
                hang.HANGSX = value;
                _connect.HANGs.Add(hang);
            }
            if (flag == "loai")
            {
                LOAI loai = new LOAI();
                loai.LOAISP = value;
                _connect.LOAIs.Add(loai);
            }

            _connect.SaveChanges();
            return(Json(new { status = true }, JsonRequestBehavior.AllowGet));
        }