Ejemplo n.º 1
0
 protected void Save()
 {
     ShowShop.BLL.Accessories.Leaveword bll = new ShowShop.BLL.Accessories.Leaveword();
     ShowShop.Model.Accessories.Leaveword model = new ShowShop.Model.Accessories.Leaveword();
     model.ID = Convert.ToInt32(ViewState["id"].ToString());
     model.Type = Convert.ToInt32(ViewState["type"].ToString());
     model.UserName = ViewState["username"].ToString();
     model.Telephone = ViewState["tel"].ToString();
     model.QQ = ViewState["qq"].ToString();
     model.MSN = ViewState["msn"].ToString();
     model.Email = ViewState["email"].ToString();
     model.IP = ViewState["ip"].ToString();
     model.IsRegUser = Convert.ToInt32(ViewState["isreg"].ToString());
     model.AddDate = Convert.ToDateTime(ViewState["adddate"].ToString());
     model.IsRead = Convert.ToInt32(ViewState["isread"].ToString());
     model.IsAuditing = Convert.ToInt32(ViewState["isauditing"].ToString());
     model.StoreId = Convert.ToInt32(ViewState["storeid"].ToString());
     //需要更新的信息
     model.Title = this.txtTitle.Text;
     model.IsReply = Convert.ToInt32(this.rabIsReply.SelectedValue);
     model.Content = this.txtContent.Text;
     model.ReplyContent = this.txtReplyContent.Text;
     model.ReplyDate = DateTime.Now;
     model.Address = ViewState["address"].ToString();
     bll.Amend(model);
     this.ltlMsg.Text = "操作成功,已回复该信息!";
     this.pnlMsg.Visible = true;
     this.pnlMsg.CssClass = "actionOk";
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 显示编辑信息
 /// </summary>
 /// <param name="id"></param>
 protected void BandInfo(int id)
 {
     ShowShop.BLL.Accessories.Leaveword bll = new ShowShop.BLL.Accessories.Leaveword();
     ShowShop.Model.Accessories.Leaveword model = bll.GetModelByID(id);
     this.txtTitle.Text = model.Title;
     this.txtContent.Text = model.Content;
     this.rabIsReply.SelectedValue = model.IsReply.ToString();
     this.txtReplyContent.Text = model.ReplyContent;
     ViewState["id"] = model.ID.ToString();
     ViewState["type"] = model.Type.ToString();
     ViewState["username"] = model.UserName;
     ViewState["tel"] = model.Telephone;
     ViewState["qq"] = model.QQ;
     ViewState["msn"] = model.MSN;
     ViewState["email"] = model.Email;
     ViewState["ip"] = model.IP;
     ViewState["isreg"] = model.IsRegUser.ToString();
     ViewState["adddate"] = model.AddDate.ToString();
     ViewState["isread"] = model.IsRead.ToString();
     ViewState["repdate"] = model.ReplyDate.ToString();
     ViewState["isauditing"] = model.IsAuditing.ToString();
     ViewState["storeid"] = model.StoreId.ToString();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            ChangeHope.WebPage.Table table = new ChangeHope.WebPage.Table();
            ShowShop.BLL.Accessories.Leaveword bll = new ShowShop.BLL.Accessories.Leaveword();
            ChangeHope.DataBase.DataByPage dataPage = bll.GetList();
            //第一步先添加表头
            table.AddHeadCol("", "<input type=\"checkbox\" id=\"chkAll\" onclick=\"CheckAll(this.form)\" alt=\"全选/取消\" />选择");
            table.AddHeadCol("", "留言类别");
            table.AddHeadCol("", "联系方式");
            table.AddHeadCol("", "留言内容");
            table.AddHeadCol("", "留言时间");
            table.AddHeadCol("", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                int count = 0;
                while (dataPage.DataReader.Read())
                {
                    count++;
                    string No = (15 * (curpage - 1) + count).ToString();

                    table.AddCol("<input ID=\"cBox\" type=\"checkbox\" value=\"" + dataPage.DataReader["id"].ToString() + "\" />");

                    table.AddCol(GetLeavType(dataPage.DataReader["type"].ToString()));

                    table.AddCol("<textarea rows=\"6\" cols=\"8\" style=\"width:200px;\">" +
                        ContactInfo(dataPage.DataReader["username"].ToString(),
                        dataPage.DataReader["telephone"].ToString(), dataPage.DataReader["qq"].ToString(),
                        dataPage.DataReader["email"].ToString(), dataPage.DataReader["msn"].ToString()) + "</textarea>");
                    table.AddCol("<textarea rows=\"6\" cols=\"8\"  style=\"width:160px;\">" + GetContent(dataPage.DataReader["title"].ToString(), dataPage.DataReader["content"].ToString()) + "</textarea>");
                    table.AddCol(dataPage.DataReader["adddate"].ToString());
                    table.AddCol(GetExamBtn(dataPage.DataReader["id"].ToString(), dataPage.DataReader["isauditing"].ToString()));
                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;
            dataPage.Dispose();
            dataPage = null;
            return view;
        }
Ejemplo n.º 4
0
 private void SetAudit(int id, int isaudit)
 {
     ShowShop.BLL.Accessories.Leaveword bll = new ShowShop.BLL.Accessories.Leaveword();
         bll.Amend(id, "isauditing", isaudit);
         Response.Write("ok");
 }
Ejemplo n.º 5
0
 private void Del(string id)
 {
     ShowShop.BLL.Accessories.Leaveword bll = new ShowShop.BLL.Accessories.Leaveword();
     bll.Delete(id);
     Response.Write("ok");
 }