protected int GetAllCount(int ID) { ReserveDate condition = new ReserveDate(); condition.ID = ID; return(TableOperate <ReserveDate> .GetRowData(condition).Count); }
public void ClickOnReserve() { ReserveImage.Click(); ReserveDate.Click(); ReserveHours.Click(); ReserveSeats.Click(); Reserve.Click(); }
public static List <ReserveDate> GetRevDate() { ReserveDate condition = new ReserveDate(); ReserveDate value = new ReserveDate(); condition.ExhibitionID = AdminMethod.ExhibitionID; return(TableOperate <ReserveDate> .Select(value, condition, 0, "order by OrderID asc")); }
protected void Page_Load(object sender, EventArgs e) { ReserveDate condition = new ReserveDate(); ReserveDate value = new ReserveDate(); string title = GetstringKey("name"); if (title != "") { condition.Date = "%" + title + "%"; condition.AddAttach("Date", "like"); } condition.ExhibitionID = AdminMethod.ExhibitionID; m_tableManageList = TableOperate <ReserveDate> .SelectByPage(value, condition, "order by OrderID asc", PageSize, PageIndex, ref Count); DataBind(); name.Value = title; }
protected void AddLog(string ids) { ReserveDate condition = new ReserveDate(); ReserveDate value = new ReserveDate(); condition.AddConditon(" and id in(" + ids + ")"); List <ReserveDate> list = TableOperate <ReserveDate> .Select(value, condition); if (list.Count > 0) { string deltitle = ""; for (int i = 0; i < list.Count; i++) { deltitle += list[i].Date + ","; } deltitle = deltitle.TrimEnd(','); if (deltitle != "") { string logbrief = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "删除了【" + deltitle + "】的预约时间"; Lognet.AddLogin(logbrief); } } }
protected void Page_Load(object sender, EventArgs e) { string action = GetstringKey("action"); int ID = GetIntKey("ID"); ReserveDate condition = new ReserveDate(); ReserveDate v = new ReserveDate(); if (ID == 0) { Response.Write(""); return; } condition.ID = ID; ReserveDate myView = TableOperate <ReserveDate> .GetRowData(v, condition); if (myView.ID == 0) { Response.Write(""); return; } ReserveDate condition2 = new ReserveDate(); ReserveDate V2 = new ReserveDate(); condition2.AddConditon(" and ID<>'" + condition.ID + "'"); condition2.ExhibitionID = AdminMethod.ExhibitionID; string strOrder = string.Empty; condition2.OrderID = myView.OrderID; if (action == "up") { //向上,现在是时间越早越在上面 condition2.AddAttach("OrderID", "<"); strOrder = " order by OrderID DESC"; //时间从大到小 } else { condition2.AddAttach("OrderID", ">"); strOrder = " order by OrderID ASC"; } List <ReserveDate> desOrderMdl = TableOperate <ReserveDate> .Select(V2, condition2, 1, strOrder); if (desOrderMdl.Count != 1) { Response.Write(""); return; } ReserveDate conditionU = new ReserveDate(); conditionU.ID = myView.ID; conditionU.OrderID = desOrderMdl[0].OrderID; TableOperate <ReserveDate> .Update(conditionU); ReserveDate conditionU2 = new ReserveDate(); conditionU2.ID = desOrderMdl[0].ID; conditionU2.OrderID = myView.OrderID; TableOperate <ReserveDate> .Update(conditionU2); Response.StatusCode = 200; Response.Write(conditionU2.ID); }
protected void Page_Load(object sender, EventArgs e) { string action = GetstringKey("action"); if (action != "save") { if (!string.IsNullOrEmpty(this.Request["iD"])) { int _iD = Convert.ToInt32(this.Request["iD"]); ReserveDate condition = new ReserveDate(); condition.ID = _iD; news = TableOperate <ReserveDate> .GetRowData(condition); iD.Value = Convert.ToString(news.ID); } DataBind(); } else { Result result = new Result(); string logbrief = ""; ReserveDate newChannelNews = new ReserveDate(); newChannelNews.ID = 0; newChannelNews.AutoForm(this.Page); string Title = newChannelNews.Date; int _iD; if (!string.IsNullOrEmpty(this.Request["iD"])) { _iD = Convert.ToInt32(this.Request["iD"]); TableOperate <ReserveDate> .Update(newChannelNews); result.msg = "编辑成功,等待返回列表"; logbrief = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "编辑了为【" + Title + "】的预约时间"; } else { newChannelNews.AddTime = DateTime.Now; newChannelNews.AddID = AdminMethod.AdminID; newChannelNews.ExhibitionID = AdminMethod.ExhibitionID; newChannelNews.OrderID = CloudSQL.GetNowTime(); _iD = TableOperate <ReserveDate> .InsertReturnID(newChannelNews); result.msg = "添加成功,等待返回列表"; logbrief = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "添加了为【" + Title + "】的预约时间"; } if (_iD > 0) { result.isOk = true; Lognet.AddLogin(logbrief); } else { result.msg = "操作失败"; } Response.ContentType = "text/json"; Response.Write(new JavaScriptSerializer().Serialize(result)); Response.End(); } DataBind(); }