コード例 #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);
            });
        }
コード例 #6
0
        /// <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
ファイル: NewsProcessor.cs プロジェクト: sanlonezhang/ql
 /// <summary>
 /// 更新公告及促销评论展示状态
 /// </summary>
 /// <param name="item"></param>
 public virtual void UpdateNewsAdvReply(NewsAdvReply item)
 {
     newsDA.UpdateNewsAdvReply(item);
 }
コード例 #8
0
ファイル: NewsProcessor.cs プロジェクト: sanlonezhang/ql
 /// <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
ファイル: MKTService_News.cs プロジェクト: sanlonezhang/ql
 public void UpdateNewsAdvReply(NewsAdvReply item)
 {
     newsAppService.UpdateNewsAdvReply(item);
 }
コード例 #11
0
ファイル: MKTService_News.cs プロジェクト: sanlonezhang/ql
 public virtual void CreateNewsAdvReply(NewsAdvReply item)
 {
     newsAppService.CreateNewsAdvReply(item);
 }