Exemple #1
0
        void Feedback()
        {
            BLL.dt_feedback bll     = new BLL.dt_feedback();
            string          title   = request["title"];
            string          content = request["content"];

            try {
                Model.dt_feedback item = new Model.dt_feedback
                {
                    Title     = title,
                    Content   = content,
                    AddTime   = DateTime.Now,
                    IsDel     = 0,
                    ManagerId = 2
                };
                int re = bll.Add(item);
                if (re > 0)
                {
                    this.res = JsonHelper2.GetCommonObj(0, "反馈成功");
                }
                else
                {
                    this.res = JsonHelper2.GetCommonObj(1, "反馈失败");
                }
            }catch (Exception ex)
            {
                Log.Error(ex.Message);
                this.res = JsonHelper2.GetCommonObj(1, "系统异常");
            }
        }
Exemple #2
0
        void GetFeedbackList()
        {
            BLL.dt_feedback bll        = new BLL.dt_feedback();
            int             pageSize   = int.Parse(request["pagesize"]);
            int             pageIdx    = int.Parse(request["pageidx"]);
            int             totalCount = 0;
            var             ds         = bll.GetList(pageSize, pageIdx, " ", " i.id desc", out totalCount);
            var             data       = (from DataRow dr in ds.Tables[0].Rows select new DBRowConvertor(dr).ConvertToEntity <Model.dt_feedback>()).ToList();

            this.res = DTcms.Common.JsonHelper2.GetCommonObj(0, data);
        }
Exemple #3
0
        public void LoadNotebook(int p)
        {
            int UID = WEBUserCurrent.UserID;

            BLL.dt_feedback bllfeed = new BLL.dt_feedback();
            DataTable       dt      = bllfeed.list_pagesWhere(1, 20, " and UserID=" + UID + "", "");

            if (dt != null)
            {
                rptList.DataSource = dt.DefaultView;
                rptList.DataBind();
            }
        }
Exemple #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string name = txtUserName.Value;
            string sex  = "男";

            if (radio2.Checked == true)
            {
                sex = "女";
            }
            string mobile          = txtPhone.Value;
            string telNuM          = txtTel.Value;
            string EmailValue      = txtEmail.Value;
            string NoteBookContent = txtContent.Value;
            string zhuzhi          = Request.Form["chkZhuZhi"];
            string DiDian          = Request.Form["dpProvince"] + "|";

            DiDian += Request.Form["dpCity"] + "|";
            DiDian += txtWrite.Value;
            string ClassName = Request.Form["chkCatagory"];
            string GongNeng  = Request.Form["chkFunction"];
            string Money     = txtOwer.Value;
            string MianJi    = txtOwerTel.Value;

            Model.dt_feedback Model = new Model.dt_feedback();
            Model.UserID     = WEBUserCurrent.UserID;
            Model.user_name  = name;
            Model.user_qq    = sex;
            Model.user_tel   = mobile;
            Model.title      = telNuM;
            Model.user_email = EmailValue;
            Model.content    = NoteBookContent;
            Model.zhuzhi     = zhuzhi;
            //if (Model.zhuzhi == "介紹房屋出售")
            //{
            //    BLL.users User = new BLL.users();
            //    User.UpPoint(WEBUserCurrent.UserID, 5000);
            //}
            Model.user_Address  = DiDian;
            Model.user_Class    = ClassName;
            Model.user_Function = GongNeng;
            Model.user_Money    = Money;
            Model.user_MianJi   = MianJi;
            BLL.dt_feedback bll = new BLL.dt_feedback();

            bll.Add(Model);

            this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('留言添加成功');window.location.href='index.aspx'</script>");
        }
Exemple #5
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("orders", DTEnums.ActionEnum.Delete.ToString()); //檢查許可權
     BLL.dt_feedback bll = new BLL.dt_feedback();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             Model.dt_feedback model = bll.GetModel(id);
             if (model != null)
             {
                 bll.Delete(id);
             }
         }
     }
     JscriptMsg("留言已刪除!", Utils.CombUrlTxt("NoteBook.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemple #6
0
        private void RptBind()
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.dt_feedback bllfeed = new BLL.dt_feedback();
            DataTable       dt      = bllfeed.list_pagesWhere(this.page, this.pageSize, "", " order by id desc");

            this.totalCount = bllfeed.GetRecordCount("");
            txtPageNum.Text = this.pageSize.ToString();
            if (dt != null)
            {
                rptList.DataSource = dt.DefaultView;
                rptList.DataBind();
            }

            //綁定頁碼
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("NoteBook.aspx", "group_id={0}&keywords={1}&page={2}", "", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }