Пример #1
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 = "";
         });
     }
 }
Пример #2
0
        /// <summary>
        /// 数据全部导出
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void QueryResultGrid_ExportAllClick(object sender, EventArgs e)
        {
            if (filterVM == null || this.QueryResultGrid.TotalCount < 1)
            {
                Window.Alert(ResComment.Information_ExportFailed);
                return;
            }
            ColumnSet col = new ColumnSet(this.QueryResultGrid);

            filter          = model.ConvertVM <ProductConsultQueryVM, ProductConsultQueryFilter>();
            filter.PageInfo = new ECCentral.QueryFilter.Common.PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };
            facade.ExportExcelFile(filterVM, new ColumnSet[] { col });
        }