Example #1
0
 private void BindDataLog()
 {
     try
     {
         if (PageType == "new")
         {
             //Button1.Visible = true;
             int totalCount = 0;
             int StartIndex = AspNetPager1.StartRecordIndex - 1;
             int EndIndex   = AspNetPager1.PageSize;
             int type       = 62;
             List <OperateRecordEntity> list = new OperateRecordBLL().GetDataList(StartIndex, EndIndex, type, ref totalCount);
             if (totalCount == 0)
             {
                 BtnExportLog.Visible = false;
             }
             this.Repeater1.DataSource = list;
             this.Repeater1.DataBind();
             AspNetPager1.RecordCount = totalCount;
             AspNetPager1.DataBind();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
 protected void BtnExportLog_Click(object sender, EventArgs e)
 {
     try
     {
         DataSet   dataset   = new DataSet();
         DataTable datatable = new DataTable();
         int       type      = 0;
         string    filename  = "";
         if (GroupID == 93)
         {
             type     = 63;
             filename = "GameRankingLog";
         }
         else if (GroupID == 94)
         {
             type     = 64;
             filename = "GameNewest";
         }
         dataset   = new OperateRecordBLL().GetDataList(type);
         datatable = dataset.Tables[0];
         string fileName = string.Format(filename + "_{0}.xls", DateTime.Now.ToString("yyyyMMddHHmmss"));
         string path     = Server.MapPath(ServerMapPath() + fileName);
         WriteExcel(datatable, path, fileName);
         DownloadFile(path);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #3
0
        protected void BtnExportLog_Click(object sender, EventArgs e)
        {
            DataSet   dataset   = new DataSet();
            DataTable datatable = new DataTable();

            dataset   = new OperateRecordBLL().GetDataList(61);
            datatable = dataset.Tables[0];
            string fileName = string.Format("SpecialLog_{0}.xls", DateTime.Now.ToString("yyyyMMddHHmmss"));
            string path     = Server.MapPath(ServerMapPath() + fileName);

            WriteExcel(datatable, path, fileName);
            DownloadFile(path);
        }
Example #4
0
        private void BindDataLog()
        {
            int totalCount = 0;

            int StartIndex = AspNetPager1.StartRecordIndex - 1;
            int EndIndex   = AspNetPager1.PageSize;

            List <OperateRecordEntity> list = new OperateRecordBLL().GetDataList(StartIndex, EndIndex, actype, ref totalCount);

            this.Repeater1.DataSource = list;
            this.Repeater1.DataBind();
            AspNetPager1.RecordCount = totalCount;
            AspNetPager1.DataBind();
        }
Example #5
0
        /// <summary>
        /// 绑定审核不通过原因
        /// </summary>
        /// <param name="status"></param>
        /// <param name="appid"></param>
        /// <returns></returns>
        public string BindReason(object status, object AppId)
        {
            int    Status     = Convert.ToInt32(status);
            int    appid      = Convert.ToInt32(AppId);
            string status_val = "";

            if (Status == 7)
            {
                var list = new OperateRecordBLL().GetReasonByElemId(appid);
                foreach (var item in list)
                {
                    status_val += item.reason + ",";
                }
            }
            else
            {
                status_val = "";
            }
            return(status_val);
        }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string ac = Request.QueryString["ac"];
         if (ac == "getrecord")
         {
             int id = Int32.Parse(Request.QueryString["id"]);
             if (id > 0)
             {
                 List <OperateRecordEntity> list = new OperateRecordBLL().GetListByAppId(id);
                 var list2 = list.Select(a => new { UserName = a.UserName, OperateExplain = a.OperateExplain, OperateTime = a.OperateTime.ToString("yyyy-MM-dd HH:mm:ss"), reason = a.reason }).ToList();
                 //javascript序列化器
                 JavaScriptSerializer jss = new JavaScriptSerializer();
                 //序列化学生集合对象得到json字符
                 string strJson = jss.Serialize(list2);
                 Response.Write(strJson);
                 Response.End();
             }
         }
         else if (ac == "isexist")
         {
             int id = Int32.Parse(Request.QueryString["id"]);
             if (id > 0)
             {
                 if (new AppInfoBLL().IsExistGroupElems(id))
                 {
                     Response.Write("1");
                     Response.End();
                 }
                 else
                 {
                     Response.Write("0");
                     Response.End();
                 }
             }
         }
         else if (ac == "update")
         {
             int           actype2 = int.Parse(Request.QueryString["actype"]);
             int           status  = int.Parse(Request.QueryString["status"]);
             int           id      = int.Parse(Request.QueryString["id"]);
             AppInfoEntity entity  = new AppInfoBLL().GetSingle(id);
             if (entity == null)
             {
                 entity.ShowName = "";
                 entity.PackName = "";
             }
             if (status == 1)
             {
                 string th = Request.QueryString["type"];
                 if (new AppInfoBLL().UpdateStatus(id, status))
                 {
                     OperateRecordEntity info = new OperateRecordEntity();
                     if (th == "th")
                     {
                         info.OperateType    = "3";
                         info.OperateFlag    = "1";
                         info.OperateExplain = "游戏审核通过";
                         info.OperateContent = entity.ShowName + "(" + entity.PackName + ")";
                         info.reason         = "";
                         info.ElemId         = id;
                         info.SourcePage     = actype2;
                         info.Status         = 1;
                         info.UserName       = GetUserName();
                     }
                     else
                     {
                         info.OperateType    = "2";
                         info.OperateFlag    = "6";
                         info.OperateExplain = "重新上架架游戏";
                         info.OperateContent = entity.ShowName + "(" + entity.PackName + ")";
                         info.reason         = "";
                         info.ElemId         = id;
                         info.SourcePage     = actype2;
                         info.Status         = 1;
                         info.UserName       = GetUserName();
                     }
                     new OperateRecordBLL().Insert(info);
                 }
             }
             else if (status == 2)
             {
                 string reason = Request.QueryString["reason"];
                 string th     = Request.QueryString["type"];
                 if (th == "th")
                 {
                     status = 7;
                     if (new AppInfoBLL().UpdateStatus(id, status))
                     {
                         OperateRecordEntity info = new OperateRecordEntity();
                         info.OperateType    = "3";
                         info.OperateFlag    = "2";
                         info.OperateExplain = "游戏审核不通过";
                         info.OperateContent = entity.ShowName + "(" + entity.PackName + ")";
                         info.reason         = reason;
                         info.ElemId         = id;
                         info.SourcePage     = actype2;
                         info.Status         = 1;
                         info.UserName       = GetUserName();
                         new OperateRecordBLL().Insert(info);
                     }
                 }
                 else
                 {
                     status = 2;
                     if (new AppInfoBLL().IsExistGroupElems(id))
                     {
                         new AppInfoBLL().DelGroupElems(id);
                     }
                     if (new AppInfoBLL().UpdateStatus(id, status))
                     {
                         OperateRecordEntity info = new OperateRecordEntity();
                         info.OperateType    = "2";
                         info.OperateFlag    = "5";
                         info.OperateExplain = "下架游戏";
                         info.OperateContent = entity.ShowName + "(" + entity.PackName + ")";
                         info.reason         = reason;
                         info.ElemId         = id;
                         info.SourcePage     = actype2;
                         info.Status         = 1;
                         info.UserName       = GetUserName();
                         new OperateRecordBLL().Insert(info);
                     }
                 }
             }
             else if (status == 4)
             {
                 if (new AppInfoBLL().UpdateStatus(id, status))
                 {
                     OperateRecordEntity info = new OperateRecordEntity()
                     {
                         ElemId         = id,
                         reason         = "",
                         Status         = 1,
                         OperateType    = "4",
                         OperateFlag    = "1",
                         SourcePage     = actype2,
                         OperateExplain = "修改游戏状态为接入中",
                         OperateContent = entity.ShowName + "(" + entity.PackName + ")",
                         UserName       = GetUserName(),
                     };
                     new OperateRecordBLL().Insert(info);
                 }
             }
             else if (status == 5)
             {
                 if (new AppInfoBLL().UpdateStatus(id, status))
                 {
                     OperateRecordEntity info = new OperateRecordEntity()
                     {
                         ElemId         = id,
                         reason         = "",
                         Status         = 1,
                         OperateFlag    = "2",
                         SourcePage     = actype2,
                         OperateType    = "4",
                         OperateExplain = "修改游戏状态为测试中",
                         OperateContent = entity.ShowName + "(" + entity.PackName + ")",
                         UserName       = GetUserName(),
                     };
                     new OperateRecordBLL().Insert(info);
                 }
             }
             else if (status == 6)
             {
                 if (new AppInfoBLL().UpdateStatus(id, status))
                 {
                     OperateRecordEntity info = new OperateRecordEntity()
                     {
                         ElemId         = id,
                         reason         = "",
                         Status         = 1,
                         SourcePage     = actype2,
                         OperateFlag    = "3",
                         OperateType    = "4",
                         OperateExplain = "提交游戏审核",
                         OperateContent = entity.ShowName + "(" + entity.PackName + ")",
                         UserName       = GetUserName(),
                     };
                     new OperateRecordBLL().Insert(info);
                 }
                 //Response.Redirect("http://localhost:16436/AppInfoListNew.aspx?Action=3");
                 Response.Write("1");
                 Response.End();
             }
         }
         else if (ac == "updateappinfo")
         {
             int           status  = int.Parse(Request.QueryString["status"]);
             int           id      = int.Parse(Request.QueryString["id"]);
             int           arch    = int.Parse(Request.QueryString["arch"]);
             string        reason  = Request.QueryString["reason"].ToString();
             int           actype2 = int.Parse(Request.QueryString["actype"]);
             AppInfoEntity entity  = new AppInfoBLL().GetSingle(id);
             if (entity == null)
             {
                 entity.ShowName = "";
                 entity.PackName = "";
             }
             if (new AppInfoBLL().UpdateStatus(id, status) && new AppInfoBLL().UpdateArch(id, arch))
             {
                 OperateRecordEntity info = new OperateRecordEntity()
                 {
                     ElemId      = id,
                     reason      = reason,
                     Status      = 1,
                     SourcePage  = actype2,
                     OperateType = "2",
                     UserName    = GetUserName(),
                 };
                 if (status == 1)
                 {
                     info.OperateFlag    = "6";
                     info.OperateContent = entity.ShowName + "(" + entity.PackName + "),机型适配:" + BindArch(arch);
                     info.OperateExplain = "上架游戏";
                 }
                 else if (status == 2)
                 {
                     info.OperateFlag    = "5";
                     info.OperateContent = entity.ShowName + "(" + entity.PackName + ")";
                     info.OperateExplain = "下架游戏";
                 }
                 new OperateRecordBLL().Insert(info);
                 Response.Write("修改成功");
                 Response.End();
             }
             else
             {
                 Response.Write("修改失败");
                 Response.End();
             }
             Response.Write("修改失败");
             Response.End();
         }
         else
         {
             BindData2(actype);
             BindDataLog();
         }
     }
 }