Exemplo n.º 1
0
        /// <summary>
        /// 添加或更新回复,并更新咨询的回复次数
        /// </summary>
        /// <param name="item"></param>
        public void UpdateProductConsultDetailReply(ProductConsultReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("ProductConsult_UpdateProductConsultDetailReply");

            dc.SetParameterValue <ProductConsultReply>(item);
            dc.ExecuteNonQuery();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 咨询回复之批准回复
        /// </summary>
        /// <param name="item"></param>
        public virtual void ApproveProductConsultRelease(ProductConsultReply item)
        {
            //if (!comentDA.CheckProductConsultFactoryReply(item.SysNo.Value,"A"))//批准回复时,状态需要为A
            //    throw new BizException("不存在该厂商回复!");
            //comentDA.UpdateProductConsultReplyCount(item.SysNo.Value, true);

            TransactionScopeFactory.TransactionAction(() =>
            {
                if (productConsultDA.ApproveProductConsultRelease(item) == 1)
                {
                    throw new BizException(ResouceManager.GetMessageString("MKT.Comment", "Comment_VendorWithdrawData"));
                }
                else
                {
                    item.Status = "A";
                    if (productConsultDA.SendSSBForApproveProductConsultRelease(item) == 0)
                    {
                        //throw new BizException("执行存储过程出错!");//记操作日志
                        throw new BizException(ResouceManager.GetMessageString("MKT.Comment", "Comment_ExcuProError!"));//记操作日志
                    }
                }


                EventPublisher.Publish <ConsultReplyAuditMessage>(new ConsultReplyAuditMessage
                {
                    SysNo            = item.SysNo.Value,
                    CurrentUserSysNo = ServiceContext.Current.UserSysNo
                });
            });
        }
Exemplo n.º 3
0
 /// <summary>
 /// 咨询回复之批准拒绝
 /// </summary>
 /// <param name="item"></param>
 public virtual void RejectProductConsultRelease(ProductConsultReply item)
 {
     TransactionScopeFactory.TransactionAction(() =>
     {
         if (productConsultDA.RejectProductConsultRelease(item) == 1)
         {
             throw new BizException(ResouceManager.GetMessageString("MKT.Comment", "Comment_VendorWithdrawData"));
         }
         else
         {
             item.Status = "D";
             if (string.IsNullOrEmpty(item.ReplyContent))
             {
                 item.ReplyContent = ResouceManager.GetMessageString("MKT.Comment", "Comment_VendorReject");
             }
             if (productConsultDA.SendSSBForApproveProductConsultRelease(item) == 0)
             {
                 throw new BizException(ResouceManager.GetMessageString("MKT.Comment", "Comment_ExcuProError!"));//记操作日志
             }
         }
         // 发送待办消息
         EventPublisher.Publish <ConsultReplyAuditRefuseMessage>(new ConsultReplyAuditRefuseMessage
         {
             SysNo            = item.SysNo.Value,
             CurrentUserSysNo = ServiceContext.Current.UserSysNo
         });
     });
 }
Exemplo n.º 4
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(tbReplyContent.Text))
     {
         CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_ConsultContentIsNotNull, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Warning);
     }
     else
     {
         vm.ReplyContent = tbReplyContent.Text;
         ProductConsultReply item = vm.ConvertVM <ProductConsultQueryVM, ProductConsultReply>();
         item.NeedAdditionalText = cbNeedAdditionalText.IsChecked.Value ? YNStatus.Yes : YNStatus.No;
         item.CompanyCode        = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;
         item.ConsultSysNo       = SysNo;
         facade.UpdateProductConsultDetailReply(item, (obj, args) =>
         {
             if (args.FaultsHandle())
             {
                 return;
             }
             CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_UpdateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
             facade.LoadProductConsult(SysNo, (obj2, args2) =>
             {
                 if (args2.FaultsHandle())
                 {
                     return;
                 }
                 productConsult = args2.Result;
                 vm             = productConsult.Convert <ProductConsult, ProductConsultQueryVM>();
                 ProductConsultReplyList.ItemsSource = vm.ProductConsultReplyList;
             });
             tbReplyContent.Text = "";
         });
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 选中厂商回复
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FactoryReplyList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     selectVendorReplyItem = this.FactoryReplyList.SelectedItem as ProductConsultReply;
     if (selectVendorReplyItem.StatusValue == "O")
     {
         tbVendorReply.Text = selectVendorReplyItem.ReplyContent;
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// 咨询回复之批准拒绝
        /// </summary>
        /// <param name="item"></param>
        public int RejectProductConsultRelease(ProductConsultReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("ProductConsult_UpdateFactoryRefuseStatus");

            dc.SetParameterValue("@SysNo", item.SysNo.Value);
            dc.SetParameterValue("@CompanyCode", item.CompanyCode);

            dc.ExecuteNonQuery();
            return(Convert.ToInt32(dc.GetParameterValue("@IsSuccess")));
        }
Exemplo n.º 7
0
        //public int ProductConsult_UpdateFactoryActiveStatus(ProductConsultReply item)
        //{
        //    DataCommand dc = DataCommandManager.GetDataCommand("ProductConsult_UpdateFactoryActiveStatus");
        //    dc.SetParameterValue<ProductConsultReply>(item);
        //    dc.ExecuteNonQuery();
        //    return Convert.ToInt32(dc.GetParameterValue("@IsSuccess"));
        //}


        /// <summary>
        /// 咨询回复之批准回复
        /// </summary>
        /// <param name="item"></param>
        public int ApproveProductConsultRelease(ProductConsultReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("ProductConsult_UpdateFactoryActiveStatus");

            //dc.SetParameterValue<ProductConsultReply>(item);

            dc.SetParameterValue("@SysNo", item.SysNo.Value);
            dc.SetParameterValue("@ConsultSysNo", item.ConsultSysNo.Value);
            dc.SetParameterValue("@CompanyCode", item.CompanyCode);
            dc.SetParameterValueAsCurrentUserAcct("EditUser");
            dc.ExecuteNonQuery();
            return(Convert.ToInt32(dc.GetParameterValue("@IsSuccess")));
        }
Exemplo n.º 8
0
 /// <summary>
 /// 创建购物咨询回复
 /// </summary>
 /// <param name="item"></param>
 public virtual void CreateProductConsultReply(ProductConsultReply item)
 {
     //根据ConsultSysNo检测是否存在该回复,如果存在就更新,不然就新建
     //回复可能只需要新建,需要检测一下代码
     //此处有疑问
     if (productConsultDA.CheckProductConsultReply(item.SysNo.Value))
     {
         productConsultDA.UpdateProductConsultReply(item);
     }
     else
     {
         productConsultDA.CreateProductConsultReply(item);
         productConsultDA.UpdateProductConsultReplyCount(item.SysNo.Value, true);
     }
 }
Exemplo n.º 9
0
        /// <summary>
        /// 调用存储过程
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public int SendSSBForApproveProductConsultRelease(ProductConsultReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("ProductConsult_UP_VP_Reply");

            dc.SetParameterValue("@SysNo", item.SysNo.Value);
            dc.SetParameterValue("@VPSysNo", item.RefSysNo);
            //调用存储过程,需要把A状态修改为C状态
            if (item.Status == "A")
            {
                item.Status = "C";
            }
            dc.SetParameterValue("@Status", item.Status);
            dc.SetParameterValue("@Type", "C");
            dc.SetParameterValue("@Memo", item.ReplyContent);
            dc.ExecuteNonQuery();
            return(Convert.ToInt32(dc.GetParameterValue("@IsSuccess")));
        }
Exemplo n.º 10
0
        /// <summary>
        /// 拒绝发布操作
        /// </summary>
        /// <param name="sysNo"></param>
        /// <param name="callback"></param>
        public void RejectProductConsultRelease(ProductConsultReply sysNo, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/MKTService/CommentInfo/RejectProductConsultRelease";

            restClient.Update(relativeUrl, sysNo, callback);
        }
Exemplo n.º 11
0
        /// <summary>
        /// 批准发布操作
        /// </summary>
        /// <param name="item"></param>
        /// <param name="callback"></param>
        public void ApproveProductConsultRelease(ProductConsultReply item, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/MKTService/CommentInfo/ApproveProductConsultRelease";

            restClient.Update(relativeUrl, item, callback);
        }
Exemplo n.º 12
0
        /// <summary>
        /// 添加咨询管理回复
        /// </summary>
        /// <param name="filter"></param>
        /// <param name="callback"></param>
        public void UpdateProductConsultDetailReply(ProductConsultReply item, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/MKTService/CommentInfo/UpdateProductConsultDetailReply";

            restClient.Update(relativeUrl, item, callback);
        }
Exemplo n.º 13
0
 /// <summary>
 /// 更新咨询管理
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public virtual void UpdateProductConsultReply(ProductConsultReply item)
 {
     ObjectFactory <ProductConsultProcessor> .Instance.UpdateProductConsultReply(item);
 }
Exemplo n.º 14
0
 /// <summary>
 /// 咨询回复之批准拒绝
 /// </summary>
 /// <param name="item"></param>
 public virtual void RejectProductConsultRelease(ProductConsultReply item)
 {
     ObjectFactory <ProductConsultProcessor> .Instance.RejectProductConsultRelease(item);
 }
Exemplo n.º 15
0
 /// <summary>
 /// 添加或更新回复,并更新咨询的回复次数
 /// </summary>
 /// <param name="item"></param>
 public virtual void UpdateProductConsultDetailReply(ProductConsultReply item)
 {
     productConsultDA.CreateProductConsultReply(item);
     productConsultDA.UpdateProductConsultReplyCount(item.ConsultSysNo.Value, true);
     //comentDA.UpdateProductConsultDetailReply(item);
 }
Exemplo n.º 16
0
 public void ApproveProductConsultRelease(ProductConsultReply item)
 {
     productConsultAppService.ApproveProductConsultRelease(item);
 }
Exemplo n.º 17
0
 /// <summary>
 /// 更新咨询管理回复
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public virtual void UpdateProductConsultReply(ProductConsultReply item)
 {
     productConsultDA.UpdateProductConsultReply(item);
 }
Exemplo n.º 18
0
 public void RejectProductConsultRelease(ProductConsultReply item)
 {
     productConsultAppService.RejectProductConsultRelease(item);
 }
Exemplo n.º 19
0
 public virtual void UpdateProductConsultDetailReply(ProductConsultReply item)
 {
     productConsultAppService.UpdateProductConsultDetailReply(item);
 }