protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("inquiry_list", "留言反馈")) { WindowNoPower(); } int id = RequestTool.RequestInt("id", 0); model = B_Lebi_Inquiry.GetModel(id); if (model == null) { model = new Lebi_Inquiry(); } }
/// <summary> /// 留言反馈 /// </summary> public void Inquiry() { Lebi_Inquiry model = new Lebi_Inquiry(); model = B_Lebi_Inquiry.BindForm(model); model.Time_Add = System.DateTime.Now; model.Type_id_InquiryStatus = 411; model.Language = CurrentLanguage.Code; B_Lebi_Inquiry.Add(model); //发送邮件 Email.SendEmail_inquiry(model); //发送短信 SMS.SendSMS_inquiry(model); Response.Write("{\"msg\":\"OK\"}"); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("inquiry_list", "留言反馈")) { PageReturnMsg = PageNoPowerMsg(); } PageSize = RequestTool.getpageSize(25); lang = RequestTool.RequestString("lang"); key = RequestTool.RequestString("key"); status = RequestTool.RequestInt("status", 0); dateFrom = RequestTool.RequestString("dateFrom"); dateTo = RequestTool.RequestString("dateTo"); DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom"); DateTime lbsql_dateTo = RequestTool.RequestDate("dateTo"); string where = "1=1"; if (key != "") { where += " and Subject like lbsql{'%" + key + "%'}"; } if (status > 0) { where += " and Type_id_CommentStatus = " + status + ""; } if (lang != "") { where += " and Language = lbsql{'" + lang + "'}"; } if (dateFrom != "" && dateTo != "") { where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)"; } models = B_Lebi_Inquiry.GetList(where, "id desc", PageSize, page); int recordCount = B_Lebi_Inquiry.Counts(where); PageString = Pager.GetPaginationString("?page={0}&lang=" + lang + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&key=" + key, page, PageSize, recordCount); }