private void AddSavePage() { string StName = Utils.GetRequest("StName", "post", 2, @"^[\s\S]{1,20}$", "名称限1-20字"); int Types = int.Parse(Utils.GetRequest("Types", "post", 2, @"^[1-3]\d*$", "选择房间类型错误")); int GoldType = int.Parse(Utils.GetRequest("GoldType", "post", 2, @"^[0-1]\d*$", "出手方式选择错误")); int PayCent = int.Parse(Utils.GetRequest("PayCent", "post", 2, @"^[0-9]\d*$", "每场下注额填写错误")); int Expir = int.Parse(Utils.GetRequest("Expir", "post", 2, @"^[0-9]\d*$", "超时时间填写错误")); BCW.Model.Game.ktv789 model = new BCW.Model.Game.ktv789(); model.StName = StName; model.Types = Types; model.GoldType = GoldType; model.PayCent = PayCent; model.Expir = Expir; model.OneUsId = 0; model.TwoUsId = 0; model.ThrUsId = 0; model.Online = 0; model.NextShot = 1; model.PkCount = 1; new BCW.BLL.Game.ktv789().Add(model); Utils.Success("添加成功", "添加房间成功..", Utils.getUrl("ktv789.aspx"), "1"); }
private void EditSavePage() { int id = int.Parse(Utils.GetRequest("id", "post", 2, @"^[0-9]\d*$", "ID错误")); string StName = Utils.GetRequest("StName", "post", 2, @"^[\s\S]{1,20}$", "名称限1-20字"); int Types = int.Parse(Utils.GetRequest("Types", "post", 2, @"^[1-3]\d*$", "选择房间类型错误")); int GoldType = int.Parse(Utils.GetRequest("GoldType", "post", 2, @"^[0-1]\d*$", "出手方式选择错误")); int PayCent = int.Parse(Utils.GetRequest("PayCent", "post", 2, @"^[0-9]\d*$", "每场下注额填写错误")); int Expir = int.Parse(Utils.GetRequest("Expir", "post", 2, @"^[0-9]\d*$", "超时时间填写错误")); if (!new BCW.BLL.Game.ktv789().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Game.ktv789 model = new BCW.Model.Game.ktv789(); model.ID = id; model.StName = StName; model.Types = Types; model.GoldType = GoldType; model.PayCent = PayCent; model.Expir = Expir; new BCW.BLL.Game.ktv789().Update(model); Utils.Success("修改成功", "修改房间成功..", Utils.getUrl("ktv789.aspx"), "1"); }