Esempio n. 1
0
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (ValidationManager.Validate(this.QuerySection))
     {
         filter   = model.ConvertVM <NewsAdvReplyQueryVM, NewsAdvReplyQueryFilter>();
         filterVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <NewsAdvReplyQueryFilter>(filter);
         QueryResultGrid.QueryCriteria = this.filter;
         QueryResultGrid.Bind();
     }
 }
Esempio n. 2
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);
            });
        }