예제 #1
0
    private void EditSavePage()
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1 && ManageId != 9)
        {
            Utils.Error("权限不足", "");
        }
        int      id       = int.Parse(Utils.GetRequest("id", "post", 2, @"^[1-9]\d*$", "ID错误"));
        string   OpenText = Utils.GetRequest("OpenText", "post", 2, @"^[^\^]{2,5}$", "开出结果填写错误");
        DateTime EndTime  = Utils.ParseTime(Utils.GetRequest("EndTime", "post", 2, DT.RegexTime, "开奖时间格式填写出错,正确格式如" + DT.FormatDate(DateTime.Now, 0) + ""));

        if (!new BCW.BLL.Game.Applelist().Exists(id))
        {
            Utils.Error("不存在的记录", "");
        }

        //记录日志
        if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288"))
        {
            String sLogFilePath = System.AppDomain.CurrentDomain.BaseDirectory.ToString() + "/logstr/" + DateTime.Now.ToString("MM-dd") + ".txt";
            LogHelper.Write(sLogFilePath, "操作管理员:" + ManageId + "号/编辑苹果机期数:" + id + "|是否预设:" + OpenText + "");
        }

        BCW.Model.Game.Applelist model = new BCW.Model.Game.Applelist();
        model.ID       = id;
        model.EndTime  = EndTime;
        model.OpenText = OpenText;
        new BCW.BLL.Game.Applelist().Update(model);
        Utils.Success("编辑第" + id + "期", "编辑第" + id + "期成功..", Utils.getUrl("apple.aspx?act=edit&id=" + id + "&backurl=" + Utils.getPage(0) + ""), "1");
    }
예제 #2
0
 /// <summary>
 /// 更新本期记录
 /// </summary>
 public void Update2(BCW.Model.Game.Applelist model)
 {
     dal.Update2(model);
 }
예제 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(BCW.Model.Game.Applelist model)
 {
     return(dal.Add(model));
 }