예제 #1
0
        public ActionResult EditFeedBack(FeedBackModel model, int Id = -1)
        {
            FeedBackInfo feedBackInfo = FeedBack.GetFeedBackById(Id);

            if (feedBackInfo == null)
            {
                return(PromptView("信息反馈信息不存在"));
            }

            if (ModelState.IsValid)
            {
                feedBackInfo.Tag     = model.Tag;
                feedBackInfo.LinkMan = model.LinkMan;
                feedBackInfo.Tel     = model.Tel;
                feedBackInfo.Mobile  = model.Mobile;
                feedBackInfo.Email   = model.Email;
                feedBackInfo.Title   = model.Title;
                feedBackInfo.Body    = model.Body;
                feedBackInfo.Reply   = model.Reply;
                feedBackInfo.State   = model.State;
                feedBackInfo.IsOut   = model.IsOut;

                if (model.State.Equals(1))
                {
                    feedBackInfo.ReplyTime = DateTime.Now;
                }

                FeedBack.UpdateFeedBackInfo(feedBackInfo);

                return(PromptView("信息反馈修改成功"));
            }
            ViewData["referer"] = SiteUtils.GetAdminRefererCookie();
            return(View(model));
        }
예제 #2
0
        public ActionResult SearchByKey()
        {
            string key = WebHelper.GetFormString("searchkey");
            //if (string.IsNullOrEmpty(key))
            //{

            FeedBackInfo info = BonSite.Services.FeedBack.GetFeedBackBySearchKey(key);

            if (info != null)
            {
                string sb = string.Format("\"title\":\"{0}\",\"body\":\"{1}\",\"reply\":\"{2}\"", info.Title, info.Body, info.Reply);

                return(AjaxResult("success", "{" + sb + "}", true));
            }
            else
            {
                return(AjaxResult("error", "查询码错误或是问题尚未回复!"));
            }

            //}
            //else
            //{
            //    return AjaxResult("error", "请输入查询码!");
            //}
        }
예제 #3
0
        public ActionResult SubmitFeedBack()
        {
            string key = Randoms.CreateRandomValue(2, true) + DateTime.Now.Ticks.ToString();
            //;

            FeedBackInfo info = new FeedBackInfo
            {
                FeedBackTypeId = WebHelper.GetFormInt("typeid"),
                Tag            = WebHelper.GetFormString("tag"),
                LinkMan        = WebHelper.GetFormString("LinkMan"),
                Tel            = WebHelper.GetFormString("Tel"),
                Mobile         = WebHelper.GetFormString("Moblie"),
                Email          = WebHelper.GetFormString("Email"),
                Title          = WebHelper.GetFormString("Title"),
                Body           = WebHelper.GetFormString("body"),
                AddTime        = DateTime.Now,
                Reply          = "",
                ReplyTime      = DateTime.Now,
                State          = 0,
                IsOut          = WebHelper.GetFormInt("isOut"),
                Ip             = WebHelper.GetIP(),
                SearchKey      = key
            };

            FeedBack.CreateFeedBackInfo(info);

            //发送邮件提醒
            Emails.SendFeedbackMsg(info);


            return(AjaxResult("success", key));
        }
예제 #4
0
        public ActionResult EditFeedBack(int Id = -1)
        {
            FeedBackInfo feedBackInfo = FeedBack.GetFeedBackById(Id);

            if (feedBackInfo == null)
            {
                return(PromptView("信息反馈信息不存在"));
            }

            FeedBackModel model = new FeedBackModel
            {
                Id             = feedBackInfo.Id,
                FeedBackTypeId = feedBackInfo.FeedBackTypeId,
                Tag            = feedBackInfo.Tag,
                LinkMan        = feedBackInfo.LinkMan,
                Tel            = feedBackInfo.Tel,
                Mobile         = feedBackInfo.Mobile,
                Email          = feedBackInfo.Email,
                Title          = feedBackInfo.Title,
                Body           = feedBackInfo.Body,
                AddTime        = feedBackInfo.AddTime,
                Reply          = feedBackInfo.Reply,
                ReplyTime      = feedBackInfo.ReplyTime,
                State          = feedBackInfo.State,
                IsOut          = feedBackInfo.IsOut,
                Ip             = feedBackInfo.Ip,
                SearchKey      = feedBackInfo.SearchKey
            };

            ViewData["referer"] = SiteUtils.GetAdminRefererCookie();
            return(View(model));
        }
예제 #5
0
파일: Feedback.cs 프로젝트: Abnertd/public
    public void FeedBack_SupplierReply()
    {
        int          feedback_id    = tools.CheckInt(Request["feedback_id"]);
        string       feedback_reply = tools.CheckStr(Request.Form["Feedback_Reply_Content"]);
        FeedBackInfo feedback       = MyFeedback.GetFeedBackByID(feedback_id, Public.GetUserPrivilege());

        if (feedback != null)
        {
            feedback.Feedback_Reply_Content = feedback_reply;
            feedback.Feedback_Reply_Addtime = DateTime.Now;
            if (MyFeedback.EditFeedBack(feedback, Public.GetUserPrivilege()))
            {
                switch (feedback.Feedback_Type)
                {
                //case 1:
                //    Public.Msg("positive", "操作成功", "操作成功", true, "feedback_list.aspx?listtype=message");
                //    break;
                //case 2:
                //    Public.Msg("positive", "操作成功", "操作成功", true, "feedback_list.aspx?listtype=idea");
                //    break;
                //case 3:
                //    Public.Msg("positive", "操作成功", "操作成功", true, "feedback_list.aspx?listtype=suggest");
                //    break;
                //case 4:
                //    Public.Msg("positive", "操作成功", "操作成功", true, "feedback_list.aspx?listtype=suggest");
                //    break;
                //case 5:
                //    Public.Msg("positive", "操作成功", "操作成功", true, "feedback_list.aspx?listtype=complain");
                //    break;
                //case 6:
                //    Public.Msg("positive", "操作成功", "操作成功", true, "feedback_list.aspx?listtype=complain");
                //    break;
                case 1:
                    Public.Msg("positive", "操作成功", "操作成功", true, "/supplier/feedback_list.aspx?listtype=message&menu_id=267");
                    break;

                case 2:
                    Public.Msg("positive", "操作成功", "操作成功", true, "/supplier/feedback_list.aspx?listtype=idea&menu_id=268");
                    break;

                case 3:
                    Public.Msg("positive", "操作成功", "操作成功", true, "/supplier/feedback_list.aspx?listtype=idea&menu_id=268");
                    break;

                case 4:
                    Public.Msg("positive", "操作成功", "操作成功", true, "/supplier/feedback_list.aspx?listtype=idea&menu_id=268");
                    break;
                }
            }
            else
            {
                Public.Msg("error", "错误信息", "操作失败,请稍后重试3", false, "{back}");
            }
        }
        else
        {
            Public.Msg("error", "错误信息", "操作失败,请稍后重试1", false, "{back}");
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            NotifyClient client;

            base.Response.Write("success");
            SiteSettings masterSettings = SettingsManager.GetMasterSettings(true);

            if (masterSettings.EnableSP)
            {
                client = new NotifyClient(masterSettings.Main_AppId, masterSettings.WeixinAppSecret, masterSettings.Main_Mch_ID, masterSettings.Main_PayKey, true, masterSettings.WeixinAppId, masterSettings.WeixinPartnerID);
            }
            else
            {
                client = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, false, "", "");
            }
            FeedBackNotify feedBackNotify = client.GetFeedBackNotify(base.Request.InputStream);

            if (feedBackNotify != null)
            {
                string msgType = feedBackNotify.MsgType;
                if (msgType != null)
                {
                    if (!(msgType == "request"))
                    {
                        if (msgType == "confirm")
                        {
                            feedBackNotify.MsgType = "已完成";
                        }
                    }
                    else
                    {
                        feedBackNotify.MsgType = "未处理";
                    }
                }
                if (VShopHelper.GetFeedBack(feedBackNotify.FeedBackId) != null)
                {
                    VShopHelper.UpdateFeedBackMsgType(feedBackNotify.FeedBackId, feedBackNotify.MsgType);
                }
                else
                {
                    FeedBackInfo info = new FeedBackInfo
                    {
                        AppId      = feedBackNotify.AppId,
                        ExtInfo    = feedBackNotify.ExtInfo,
                        FeedBackId = feedBackNotify.FeedBackId,
                        MsgType    = feedBackNotify.MsgType,
                        OpenId     = feedBackNotify.OpenId,
                        Reason     = feedBackNotify.Reason,
                        Solution   = feedBackNotify.Solution,
                        TransId    = feedBackNotify.TransId
                    };
                    VShopHelper.SaveFeedBack(info);
                }
            }
        }
예제 #7
0
        public FeedBackInfo Get(string feedBackID)
        {
            FeedBackInfo info             = new FeedBackInfo();
            DbCommand    sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM vshop_FeedBackNotify WHERE FeedBackId=@FeedBackId");

            this.database.AddInParameter(sqlStringCommand, "FeedBackId", DbType.String, feedBackID);
            using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand))
            {
                return(ReaderConvert.ReaderToModel <FeedBackInfo>(reader));
            }
        }
예제 #8
0
파일: FeedBack.cs 프로젝트: Abnertd/public
 public virtual bool EditFeedBack(FeedBackInfo entity, RBACUserInfo UserPrivilege)
 {
     if (RBAC.CheckPrivilege(UserPrivilege, "02cc2c2c-9ecc-462a-86dc-406f792ac83a"))
     {
         return(MyDAL.EditFeedBack(entity));
     }
     else
     {
         throw new TradePrivilegeException("没有权限,权限代码:02cc2c2c-9ecc-462a-86dc-406f792ac83a错误");
     }
 }
예제 #9
0
파일: FeedBack.cs 프로젝트: Abnertd/public
 public virtual bool AddFeedBack(FeedBackInfo entity, RBACUserInfo UserPrivilege)
 {
     if (RBAC.CheckPrivilege(UserPrivilege, "8ccafb10-8a4a-425f-8111-a1e4eb46a0b4"))
     {
         return(MyDAL.AddFeedBack(entity));
     }
     else
     {
         throw new TradePrivilegeException("没有权限,权限代码:8ccafb10-8a4a-425f-8111-a1e4eb46a0b4错误");
     }
 }
예제 #10
0
        public static FeedBackInfo GetFeedBackBySearchKey(string searchKey)
        {
            FeedBackInfo feedbackInfo = null;
            IDataReader  reader       = BonSite.Core.BSData.RDBS.GetFeedBackBySearchKey(searchKey);

            if (reader.Read())
            {
                feedbackInfo = BuildFeedBackFromReader(reader);
            }
            reader.Close();
            return(feedbackInfo);
        }
예제 #11
0
        public static FeedBackInfo GetFeedBackById(int Id)
        {
            FeedBackInfo feedbackInfo = null;
            IDataReader  reader       = BonSite.Core.BSData.RDBS.GetFeedBack(Id);

            if (reader.Read())
            {
                feedbackInfo = BuildFeedBackFromReader(reader);
            }
            reader.Close();
            return(feedbackInfo);
        }
예제 #12
0
        public FeedBackInfo Get(string feedBackID)
        {
            FeedBackInfo result = new FeedBackInfo();

            System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM vshop_FeedBackNotify WHERE FeedBackId=@FeedBackId");
            this.database.AddInParameter(sqlStringCommand, "FeedBackId", System.Data.DbType.String, feedBackID);
            using (System.Data.IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                result = ReaderConvert.ReaderToModel <FeedBackInfo>(dataReader);
            }
            return(result);
        }
예제 #13
0
        public FeedBackInfo Get(int id)
        {
            FeedBackInfo result           = new FeedBackInfo();
            DbCommand    sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM vshop_FeedBackNotify WHERE FeedBackNotifyID=@FeedBackNotifyID");

            this.database.AddInParameter(sqlStringCommand, "FeedBackNotifyID", DbType.Int32, id);
            using (IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                result = ReaderConvert.ReaderToModel <FeedBackInfo>(dataReader);
            }
            return(result);
        }
예제 #14
0
파일: FeedBack.cs 프로젝트: Abnertd/public
        public virtual FeedBackInfo GetFeedBackByID(int ID)
        {
            FeedBackInfo  entity  = null;
            SqlDataReader RdrList = null;

            try
            {
                string SqlList;
                SqlList = "SELECT * FROM Feedback WHERE Feedback_ID = " + ID;
                RdrList = DBHelper.ExecuteReader(SqlList);
                if (RdrList.Read())
                {
                    entity = new FeedBackInfo();

                    entity.Feedback_ID            = Tools.NullInt(RdrList["Feedback_ID"]);
                    entity.Feedback_Type          = Tools.NullInt(RdrList["Feedback_Type"]);
                    entity.Feedback_SupplierID    = Tools.NullInt(RdrList["Feedback_SupplierID"]);
                    entity.Feedback_MemberID      = Tools.NullInt(RdrList["Feedback_MemberID"]);
                    entity.Feedback_Name          = Tools.NullStr(RdrList["Feedback_Name"]);
                    entity.Feedback_Tel           = Tools.NullStr(RdrList["Feedback_Tel"]);
                    entity.Feedback_Email         = Tools.NullStr(RdrList["Feedback_Email"]);
                    entity.Feedback_CompanyName   = Tools.NullStr(RdrList["Feedback_CompanyName"]);
                    entity.Feedback_Content       = Tools.NullStr(RdrList["Feedback_Content"]);
                    entity.Feedback_Attachment    = Tools.NullStr(RdrList["Feedback_Attachment"]);
                    entity.Feedback_Addtime       = Tools.NullDate(RdrList["Feedback_Addtime"]);
                    entity.Feedback_IsRead        = Tools.NullInt(RdrList["Feedback_IsRead"]);
                    entity.Feedback_Reply_IsRead  = Tools.NullInt(RdrList["Feedback_Reply_IsRead"]);
                    entity.Feedback_Reply_Content = Tools.NullStr(RdrList["Feedback_Reply_Content"]);
                    entity.Feedback_Reply_Addtime = Tools.NullDate(RdrList["Feedback_Reply_Addtime"]);
                    entity.Feedback_Site          = Tools.NullStr(RdrList["Feedback_Site"]);


                    entity.Feedback_Address = Tools.NullStr(RdrList["Feedback_Address"]);
                    entity.Feedback_Amount  = Tools.NullDbl(RdrList["Feedback_Amount"]);
                    entity.Feedback_Note    = Tools.NullStr(RdrList["Feedback_Note"]);
                }

                return(entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (RdrList != null)
                {
                    RdrList.Close();
                    RdrList = null;
                }
            }
        }
예제 #15
0
파일: FeedBack.cs 프로젝트: Abnertd/public
        public virtual bool EditFeedBack(FeedBackInfo entity)
        {
            string    SqlAdd = null;
            DataTable DtAdd  = null;
            DataRow   DrAdd  = null;

            SqlAdd = "SELECT * FROM Feedback WHERE Feedback_ID = " + entity.Feedback_ID;
            DtAdd  = DBHelper.Query(SqlAdd);
            try
            {
                if (DtAdd.Rows.Count > 0)
                {
                    DrAdd = DtAdd.Rows[0];
                    DrAdd["Feedback_ID"]            = entity.Feedback_ID;
                    DrAdd["Feedback_Type"]          = entity.Feedback_Type;
                    DrAdd["Feedback_SupplierID"]    = entity.Feedback_SupplierID;
                    DrAdd["Feedback_MemberID"]      = entity.Feedback_MemberID;
                    DrAdd["Feedback_Name"]          = entity.Feedback_Name;
                    DrAdd["Feedback_Tel"]           = entity.Feedback_Tel;
                    DrAdd["Feedback_Email"]         = entity.Feedback_Email;
                    DrAdd["Feedback_CompanyName"]   = entity.Feedback_CompanyName;
                    DrAdd["Feedback_Content"]       = entity.Feedback_Content;
                    DrAdd["Feedback_Attachment"]    = entity.Feedback_Attachment;
                    DrAdd["Feedback_Addtime"]       = entity.Feedback_Addtime;
                    DrAdd["Feedback_IsRead"]        = entity.Feedback_IsRead;
                    DrAdd["Feedback_Reply_IsRead"]  = entity.Feedback_Reply_IsRead;
                    DrAdd["Feedback_Reply_Content"] = entity.Feedback_Reply_Content;
                    DrAdd["Feedback_Reply_Addtime"] = entity.Feedback_Reply_Addtime;
                    DrAdd["Feedback_Site"]          = entity.Feedback_Site;


                    DrAdd["Feedback_Address"] = entity.Feedback_Address;
                    DrAdd["Feedback_Amount"]  = entity.Feedback_Amount;
                    DrAdd["Feedback_Note"]    = entity.Feedback_Note;

                    DBHelper.SaveChanges(SqlAdd, DtAdd);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DtAdd.Dispose();
            }
            return(true);
        }
예제 #16
0
        public FeedBackInfo Load(int sysno)
        {
            string  sql = "select * from feedback where sysno = " + sysno;
            DataSet ds  = SqlHelper.ExecuteDataSet(sql);

            if (!Util.HasMoreRow(ds))
            {
                return(null);
            }
            FeedBackInfo oInfo = new FeedBackInfo();

            map(oInfo, ds.Tables[0].Rows[0]);
            return(oInfo);
        }
예제 #17
0
 public bool Save(FeedBackInfo info)
 {
     System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand("INSERT INTO vshop_FeedBackNotify (AppId, TimeStamp, OpenId, MsgType, FeedBackId, TransId, Reason, Solution, ExtInfo) VALUES (@AppId, @TimeStamp, @OpenId, @MsgType, @FeedBackId, @TransId, @Reason, @Solution, @ExtInfo)");
     this.database.AddInParameter(sqlStringCommand, "AppId", System.Data.DbType.String, info.AppId);
     this.database.AddInParameter(sqlStringCommand, "TimeStamp", System.Data.DbType.DateTime, info.TimeStamp);
     this.database.AddInParameter(sqlStringCommand, "OpenId", System.Data.DbType.String, info.OpenId);
     this.database.AddInParameter(sqlStringCommand, "MsgType", System.Data.DbType.String, info.MsgType);
     this.database.AddInParameter(sqlStringCommand, "FeedBackId", System.Data.DbType.String, info.FeedBackId);
     this.database.AddInParameter(sqlStringCommand, "TransId", System.Data.DbType.String, info.TransId);
     this.database.AddInParameter(sqlStringCommand, "Reason", System.Data.DbType.String, info.Reason);
     this.database.AddInParameter(sqlStringCommand, "Solution", System.Data.DbType.String, info.Solution);
     this.database.AddInParameter(sqlStringCommand, "ExtInfo", System.Data.DbType.String, info.ExtInfo);
     return(this.database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
예제 #18
0
파일: FeedBack.cs 프로젝트: Abnertd/public
        public virtual bool AddFeedBack(FeedBackInfo entity)
        {
            string    SqlAdd = null;
            DataTable DtAdd  = null;
            DataRow   DrAdd  = null;

            SqlAdd = "SELECT TOP 0 * FROM Feedback";
            DtAdd  = DBHelper.Query(SqlAdd);
            DrAdd  = DtAdd.NewRow();

            DrAdd["Feedback_ID"]            = entity.Feedback_ID;
            DrAdd["Feedback_Type"]          = entity.Feedback_Type;
            DrAdd["Feedback_SupplierID"]    = entity.Feedback_SupplierID;
            DrAdd["Feedback_MemberID"]      = entity.Feedback_MemberID;
            DrAdd["Feedback_Name"]          = entity.Feedback_Name;
            DrAdd["Feedback_Tel"]           = entity.Feedback_Tel;
            DrAdd["Feedback_Email"]         = entity.Feedback_Email;
            DrAdd["Feedback_CompanyName"]   = entity.Feedback_CompanyName;
            DrAdd["Feedback_Content"]       = entity.Feedback_Content;
            DrAdd["Feedback_Attachment"]    = entity.Feedback_Attachment;
            DrAdd["Feedback_Addtime"]       = entity.Feedback_Addtime;
            DrAdd["Feedback_IsRead"]        = entity.Feedback_IsRead;
            DrAdd["Feedback_Reply_IsRead"]  = entity.Feedback_Reply_IsRead;
            DrAdd["Feedback_Reply_Content"] = entity.Feedback_Reply_Content;
            DrAdd["Feedback_Site"]          = entity.Feedback_Site;


            DrAdd["Feedback_Address"] = entity.Feedback_Address;

            DrAdd["Feedback_Amount"] = entity.Feedback_Amount;

            DrAdd["Feedback_Note"] = entity.Feedback_Note;

            DtAdd.Rows.Add(DrAdd);
            try
            {
                DBHelper.SaveChanges(SqlAdd, DtAdd);
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DtAdd.Dispose();
            }
        }
예제 #19
0
 private void map(FeedBackInfo oParam, DataRow tempdr)
 {
     oParam.SysNo           = Util.TrimIntNull(tempdr["SysNo"]);
     oParam.CustomerSysNo   = Util.TrimIntNull(tempdr["CustomerSysNo"]);
     oParam.Subject         = Util.TrimNull(tempdr["Subject"]);
     oParam.Suggest         = Util.TrimNull(tempdr["Suggest"]);
     oParam.NickName        = Util.TrimNull(tempdr["NickName"]);
     oParam.Email           = Util.TrimNull(tempdr["Email"]);
     oParam.Phone           = Util.TrimNull(tempdr["Phone"]);
     oParam.Memo            = Util.TrimNull(tempdr["Memo"]);
     oParam.Note            = Util.TrimNull(tempdr["Note"]);
     oParam.CreateTime      = Util.TrimDateNull(tempdr["CreateTime"]);
     oParam.UpdateTime      = Util.TrimDateNull(tempdr["UpdateTime"]);
     oParam.UpdateUserSysNo = Util.TrimIntNull(tempdr["UpdateUserSysNo"]);
     oParam.Status          = Util.TrimIntNull(tempdr["Status"]);
     oParam.Sosysno         = Util.TrimIntNull(tempdr["Sosysno"]);
 }
예제 #20
0
        public static bool SendFeedbackMsg(FeedBackInfo info)
        {
            if (BSConfig.EmailConfig.SendFeedBackMail.Equals(1))
            {
                string subject = BSConfig.EmailConfig.FeedBackTitle.Replace("{linkman}", info.LinkMan);

                string body = BSConfig.EmailConfig.FeedBackBody.Replace("{linkman}", info.LinkMan)
                              .Replace("{addtime}", info.AddTime.ToString())
                              .Replace("{tel}", info.Tel)
                              .Replace("{email}", info.Email)
                              .Replace("{tag}", info.Tag)
                              .Replace("{body}", info.Body);


                return(_iemailstrategy.Send(BSConfig.EmailConfig.FeedBackMail, subject, body));
            }
            else
            {
                return(true);
            }
        }
예제 #21
0
        private void dlstPtReviews_DeleteCommand(object source, DataListCommandEventArgs e)
        {
            int id = Convert.ToInt32(e.CommandArgument, CultureInfo.InvariantCulture);

            if (e.CommandName == "Delete")
            {
                if (VShopHelper.DeleteFeedBack(id))
                {
                    this.ShowMsg("删除成功", true);
                    this.BindPtReview();
                }
                else
                {
                    this.ShowMsg("删除失败", false);
                }
            }
            else
            {
                FeedBackInfo feedBack = VShopHelper.GetFeedBack(id);
                if (feedBack != null)
                {
                    SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
                    PayAccount   account        = new PayAccount(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey);
                    NotifyClient client         = new NotifyClient(account);
                    if (client.UpdateFeedback(feedBack.FeedBackId, feedBack.OpenId))
                    {
                        VShopHelper.UpdateFeedBackMsgType(feedBack.FeedBackId, "已处理");
                        this.ShowMsg("处理成功", true);
                        this.BindPtReview();
                    }
                    else
                    {
                        this.ShowMsg("处理失败", false);
                    }
                }
            }
        }
예제 #22
0
        public static FeedBackInfo BuildFeedBackFromReader(IDataReader reader)
        {
            FeedBackInfo feedBackInfo = new FeedBackInfo
            {
                Id             = TypeHelper.ObjectToInt(reader["id"]),
                FeedBackTypeId = TypeHelper.ObjectToInt(reader["feedbacktypeid"]),
                Tag            = reader["tag"].ToString(),
                LinkMan        = reader["linkman"].ToString(),
                Tel            = reader["tel"].ToString(),
                Mobile         = reader["Mobile"].ToString(),
                Email          = reader["email"].ToString(),
                Title          = reader["title"].ToString(),
                Body           = reader["Body"].ToString(),
                AddTime        = TypeHelper.ObjectToDateTime(reader["AddTime"]),
                Reply          = reader["reply"].ToString(),
                ReplyTime      = TypeHelper.ObjectToDateTime(reader["ReplyTime"]),
                State          = TypeHelper.ObjectToInt(reader["State"]),
                IsOut          = TypeHelper.ObjectToInt(reader["isOut"]),
                Ip             = reader["IP"].ToString(),
                SearchKey      = reader["SearchKey"].ToString()
            };

            return(feedBackInfo);
        }
예제 #23
0
 public void Insert(FeedBackInfo oParam)
 {
     new FeedBackDac().Insert(oParam);
 }
예제 #24
0
        public void Import()
        {
            if (!AppConfig.IsImportable)
            {
                throw new BizException("Is Importable is false");
            }

            /*  do not  use the following code after Data Pour in */
            string  sql = " select top 1 * from feedback ";
            DataSet ds  = SqlHelper.ExecuteDataSet(sql);

            if (Util.HasMoreRow(ds))
            {
                throw new BizException("the table feedback is not empty");
            }

            TransactionOptions options = new TransactionOptions();

            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout        = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {
                string  sql1 = @"select
									1 as sysno,
									subject,
									suggest,
									usercode as nickname,
									usermail as email,
									userphone as phone,
									Icsonoutfeed as memo,
									Icsoninfeed as note,
									createtime,
									status,
									null as updatetime
									
								from ipp2003..feedback feedback"                                ;
                DataSet ds1  = SqlHelper.ExecuteDataSet(sql1);

                /*
                 *	<option selected="selected" value="0">未处理</option>
                 *      <option value="1">已处理</option>
                 *      <option value="2">Icson显示</option>
                 *      <option value="3">删除</option>
                 *      ipp2和3采用的状态是一样的,所以不需要转换
                 */
                foreach (DataRow dr1 in ds1.Tables[0].Rows)
                {
                    FeedBackInfo oFeedBack = new FeedBackInfo();
                    map(oFeedBack, dr1);
                    if (oFeedBack.Subject == AppConst.StringNull)
                    {
                        oFeedBack.Subject = "无";
                    }
                    if (oFeedBack.Suggest == AppConst.StringNull)
                    {
                        oFeedBack.Suggest = "无";
                    }
                    if (oFeedBack.NickName == AppConst.StringNull)
                    {
                        oFeedBack.NickName = "无";
                    }
                    new FeedBackDac().Insert(oFeedBack);
                }


                scope.Complete();
            }
        }
예제 #25
0
 public static bool SaveFeedBack(FeedBackInfo info)
 {
     return(new FeedBackDao().Save(info));
 }
예제 #26
0
파일: FeedBack.cs 프로젝트: Abnertd/public
        public virtual IList <FeedBackInfo> GetFeedBacks(QueryInfo Query)
        {
            int PageSize;
            int CurrentPage;
            IList <FeedBackInfo> entitys = null;
            FeedBackInfo         entity = null;
            string        SqlList, SqlField, SqlOrder, SqlParam, SqlTable;
            SqlDataReader RdrList = null;

            try
            {
                CurrentPage = Query.CurrentPage;
                PageSize    = Query.PageSize;
                SqlTable    = "Feedback";
                SqlField    = "*";
                SqlParam    = DBHelper.GetSqlParam(Query.ParamInfos);
                SqlOrder    = DBHelper.GetSqlOrder(Query.OrderInfos);
                SqlList     = DBHelper.GetSqlPage(SqlTable, SqlField, SqlParam, SqlOrder, CurrentPage, PageSize);
                RdrList     = DBHelper.ExecuteReader(SqlList);
                if (RdrList.HasRows)
                {
                    entitys = new List <FeedBackInfo>();
                    while (RdrList.Read())
                    {
                        entity                        = new FeedBackInfo();
                        entity.Feedback_ID            = Tools.NullInt(RdrList["Feedback_ID"]);
                        entity.Feedback_Type          = Tools.NullInt(RdrList["Feedback_Type"]);
                        entity.Feedback_SupplierID    = Tools.NullInt(RdrList["Feedback_SupplierID"]);
                        entity.Feedback_MemberID      = Tools.NullInt(RdrList["Feedback_MemberID"]);
                        entity.Feedback_Name          = Tools.NullStr(RdrList["Feedback_Name"]);
                        entity.Feedback_Tel           = Tools.NullStr(RdrList["Feedback_Tel"]);
                        entity.Feedback_Email         = Tools.NullStr(RdrList["Feedback_Email"]);
                        entity.Feedback_CompanyName   = Tools.NullStr(RdrList["Feedback_CompanyName"]);
                        entity.Feedback_Content       = Tools.NullStr(RdrList["Feedback_Content"]);
                        entity.Feedback_Attachment    = Tools.NullStr(RdrList["Feedback_Attachment"]);
                        entity.Feedback_Addtime       = Tools.NullDate(RdrList["Feedback_Addtime"]);
                        entity.Feedback_IsRead        = Tools.NullInt(RdrList["Feedback_IsRead"]);
                        entity.Feedback_Reply_IsRead  = Tools.NullInt(RdrList["Feedback_Reply_IsRead"]);
                        entity.Feedback_Reply_Content = Tools.NullStr(RdrList["Feedback_Reply_Content"]);
                        entity.Feedback_Reply_Addtime = Tools.NullDate(RdrList["Feedback_Reply_Addtime"]);
                        entity.Feedback_Site          = Tools.NullStr(RdrList["Feedback_Site"]);

                        entity.Feedback_Address = Tools.NullStr(RdrList["Feedback_Address"]);
                        entity.Feedback_Amount  = Tools.NullDbl(RdrList["Feedback_Amount"]);
                        entity.Feedback_Note    = Tools.NullStr(RdrList["Feedback_Note"]);

                        entitys.Add(entity);
                        entity = null;
                    }
                }
                return(entitys);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (RdrList != null)
                {
                    RdrList.Close();
                    RdrList = null;
                }
            }
        }
예제 #27
0
 /// <summary>
 /// 更新反馈
 /// </summary>
 /// <param name="feedbackInfo"></param>
 public static void UpdateFeedBackInfo(FeedBackInfo feedbackInfo)
 {
     BonSite.Data.FeedBack.UpdateFeedBackInfo(feedbackInfo);
 }
예제 #28
0
 public static void UpdateFeedBackInfo(FeedBackInfo feedbackInfo)
 {
     BonSite.Core.BSData.RDBS.UpdateFeedBack(feedbackInfo);
 }
예제 #29
0
        public int Insert(FeedBackInfo oParam)
        {
            string     sql = @"INSERT INTO FeedBack
                            (
                            CustomerSysNo,
                            Subject, Suggest, NickName, 
                            Email, Phone, Memo, Note, 
                            CreateTime, UpdateTime,UpdateUserSysNo, Status,Sosysno
                            )
                            VALUES (
                            @CustomerSysNo,
                            @Subject, @Suggest, @NickName, 
                            @Email, @Phone, @Memo, @Note, 
                            @CreateTime, @UpdateTime,@UpdateUserSysNo, @Status,@Sosysno
                            );set @SysNo = SCOPE_IDENTITY();";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo           = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramCustomerSysNo   = new SqlParameter("@CustomerSysNo", SqlDbType.Int, 4);
            SqlParameter paramSubject         = new SqlParameter("@Subject", SqlDbType.NVarChar, 250);
            SqlParameter paramSuggest         = new SqlParameter("@Suggest", SqlDbType.NVarChar, 2000);
            SqlParameter paramNickName        = new SqlParameter("@NickName", SqlDbType.NVarChar, 50);
            SqlParameter paramEmail           = new SqlParameter("@Email", SqlDbType.NVarChar, 50);
            SqlParameter paramPhone           = new SqlParameter("@Phone", SqlDbType.NVarChar, 50);
            SqlParameter paramMemo            = new SqlParameter("@Memo", SqlDbType.NVarChar, 500);
            SqlParameter paramNote            = new SqlParameter("@Note", SqlDbType.NVarChar, 500);
            SqlParameter paramCreateTime      = new SqlParameter("@CreateTime", SqlDbType.DateTime);
            SqlParameter paramUpdateTime      = new SqlParameter("@UpdateTime", SqlDbType.DateTime);
            SqlParameter paramUpdateUserSysNo = new SqlParameter("@UpdateUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramStatus          = new SqlParameter("@Status", SqlDbType.Int, 4);
            SqlParameter paramSosysno         = new SqlParameter("@Sosysno", SqlDbType.Int, 4);

            paramSysNo.Direction = ParameterDirection.Output;

            if (oParam.CustomerSysNo != AppConst.IntNull)
            {
                paramCustomerSysNo.Value = oParam.CustomerSysNo;
            }
            else
            {
                paramCustomerSysNo.Value = System.DBNull.Value;
            }

            if (oParam.Subject != AppConst.StringNull)
            {
                paramSubject.Value = oParam.Subject;
            }
            else
            {
                paramSubject.Value = System.DBNull.Value;
            }
            if (oParam.Suggest != AppConst.StringNull)
            {
                paramSuggest.Value = oParam.Suggest;
            }
            else
            {
                paramSuggest.Value = System.DBNull.Value;
            }
            if (oParam.NickName != AppConst.StringNull)
            {
                paramNickName.Value = oParam.NickName;
            }
            else
            {
                paramNickName.Value = System.DBNull.Value;
            }
            if (oParam.Email != AppConst.StringNull)
            {
                paramEmail.Value = oParam.Email;
            }
            else
            {
                paramEmail.Value = System.DBNull.Value;
            }
            if (oParam.Phone != AppConst.StringNull)
            {
                paramPhone.Value = oParam.Phone;
            }
            else
            {
                paramPhone.Value = System.DBNull.Value;
            }
            if (oParam.Memo != AppConst.StringNull)
            {
                paramMemo.Value = oParam.Memo;
            }
            else
            {
                paramMemo.Value = System.DBNull.Value;
            }
            if (oParam.Note != AppConst.StringNull)
            {
                paramNote.Value = oParam.Note;
            }
            else
            {
                paramNote.Value = System.DBNull.Value;
            }
            if (oParam.CreateTime != AppConst.DateTimeNull)
            {
                paramCreateTime.Value = oParam.CreateTime;
            }
            else
            {
                paramCreateTime.Value = System.DBNull.Value;
            }
            if (oParam.UpdateTime != AppConst.DateTimeNull)
            {
                paramUpdateTime.Value = oParam.UpdateTime;
            }
            else
            {
                paramUpdateTime.Value = System.DBNull.Value;
            }
            if (oParam.UpdateUserSysNo != AppConst.IntNull)
            {
                paramUpdateUserSysNo.Value = oParam.UpdateUserSysNo;
            }
            else
            {
                paramUpdateUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.Status != AppConst.IntNull)
            {
                paramStatus.Value = oParam.Status;
            }
            else
            {
                paramStatus.Value = System.DBNull.Value;
            }
            if (oParam.Sosysno != AppConst.IntNull)
            {
                paramSosysno.Value = oParam.Sosysno;
            }
            else
            {
                paramSosysno.Value = System.DBNull.Value;
            }

            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramCustomerSysNo);
            cmd.Parameters.Add(paramSubject);
            cmd.Parameters.Add(paramSuggest);
            cmd.Parameters.Add(paramNickName);
            cmd.Parameters.Add(paramEmail);
            cmd.Parameters.Add(paramPhone);
            cmd.Parameters.Add(paramMemo);
            cmd.Parameters.Add(paramNote);
            cmd.Parameters.Add(paramCreateTime);
            cmd.Parameters.Add(paramUpdateTime);
            cmd.Parameters.Add(paramUpdateUserSysNo);
            cmd.Parameters.Add(paramStatus);
            cmd.Parameters.Add(paramSosysno);
            return(SqlHelper.ExecuteNonQuery(cmd, out oParam.SysNo));
        }