示例#1
0
文件: NewsDA.cs 项目: sanlonezhang/ql
        /// <summary>
        /// 评论回复
        /// </summary>
        /// <param name="item"></param>
        public void CreateNewsAdvReply(NewsAdvReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("News_CreateNewsAdvReply");

            dc.SetParameterValue <NewsAdvReply>(item);
            dc.ExecuteNonQuery();
        }
示例#2
0
文件: NewsDA.cs 项目: sanlonezhang/ql
        /// <summary>
        /// 更新公告及促销评论展示状态
        /// </summary>
        /// <param name="item"></param>
        public void UpdateNewsAdvReply(NewsAdvReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("News_UpdateNewsAdvReply");

            dc.SetParameterValue("@SysNoString", item.SysNo.Value);
            dc.SetParameterValue("@Status", item.Status);
            dc.SetParameterValueAsCurrentUserSysNo("LastEditUserSysNo");
            dc.ExecuteNonQuery();
        }
示例#3
0
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hlUpdate_Click(object sender, RoutedEventArgs e)
        {
            NewsAdvReplyVM vm   = this.QueryResultGrid.SelectedItem as NewsAdvReplyVM;
            NewsAdvReply   item = vm.ConvertVM <NewsAdvReplyVM, NewsAdvReply>();

            facade.UpdateNewsAdvReplyStatus(item, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                QueryResultGrid.Bind();
            });
        }
示例#4
0
文件: NewsDA.cs 项目: sanlonezhang/ql
        /// <summary>
        /// 加载公告及促销评论
        /// </summary>
        /// <param name="sysNo"></param>
        /// <returns></returns>
        public NewsAdvReply LoadNewsAdvReply(int sysNo)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("News_GetNewsAdvReply");

            dc.SetParameterValue("@SysNo", sysNo);
            //return dc.ExecuteEntity<NewsAdvReply>();


            DataTable    dt   = dc.ExecuteDataTable();
            NewsAdvReply item = new NewsAdvReply();

            //item.ReplyContent = new LanguageContent("zh-CN", dt.Rows[0]["ReplyContent"].ToString().Trim());
            item = DataMapper.GetEntity <NewsAdvReply>(dt.Rows[0]);
            return(item);
        }
示例#5
0
        /// <summary>
        /// 保存回复
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            vm = LayoutRoot.DataContext as NewsAdvReplyQueryVM;
            //if (invalidStatus.IsChecked==true)
            //    vm.Status = "D";
            //else
            //    vm.Status = "A";
            NewsAdvReply item = vm.ConvertVM <NewsAdvReplyQueryVM, NewsAdvReply>();

            item.CompanyCode = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;

            facade.CreateNewsAdvReply(item, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResNewsInfo.Information_CreateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
            });
        }
        /// <summary>
        /// 单个更新状态
        /// </summary>
        /// <param name="item"></param>
        /// <param name="callback"></param>
        public void UpdateNewsAdvReplyStatus(NewsAdvReply item, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/MKTService/NewsInfo/UpdateNewsAdvReply";

            restClient.Update(relativeUrl, item, callback);
        }
示例#7
0
 /// <summary>
 /// 更新公告及促销评论展示状态
 /// </summary>
 /// <param name="item"></param>
 public virtual void UpdateNewsAdvReply(NewsAdvReply item)
 {
     newsDA.UpdateNewsAdvReply(item);
 }
示例#8
0
 /// <summary>
 /// 评论回复
 /// </summary>
 /// <param name="item"></param>
 public virtual void CreateNewsAdvReply(NewsAdvReply item)
 {
     newsDA.CreateNewsAdvReply(item);
 }
示例#9
0
 /// <summary>
 /// 更新公告及促销评论展示状态
 /// </summary>
 /// <param name="item"></param>
 public virtual void UpdateNewsAdvReply(NewsAdvReply item)
 {
     ObjectFactory <NewsProcessor> .Instance.UpdateNewsAdvReply(item);
 }
示例#10
0
 public void UpdateNewsAdvReply(NewsAdvReply item)
 {
     newsAppService.UpdateNewsAdvReply(item);
 }
示例#11
0
 public virtual void CreateNewsAdvReply(NewsAdvReply item)
 {
     newsAppService.CreateNewsAdvReply(item);
 }