public void Flush()
 {
     if (IsEdit)
     {
         return;
     }
     lock (issn.Text)
     {
         object         isbn     = issn.Text;
         SelectLocalDAL localDAL = new SelectLocalDAL();
         if (localDAL.SelectLoacl(ref isbn))
         {
             RetrunInfo info = isbn as RetrunInfo;
             if (info.TrueOrFalse)
             {
                 List <PeriodicalsInfo>  infos = info.result as List <PeriodicalsInfo>;
                 PeriodicalChooseControl periodicalChooseControl = new PeriodicalChooseControl(infos);
                 DialogHelper.ShowDialog(periodicalChooseControl);
                 if (periodicalChooseControl.info != null)
                 {
                     Name.Text            = periodicalChooseControl.info.name;
                     fkTypeCode.Text      = periodicalChooseControl.info.fkTypeCode;
                     fkTypeName.Text      = periodicalChooseControl.info.fkTypeName;
                     fkPressName.Text     = periodicalChooseControl.info.fkPressName;
                     unifyNum.Text        = periodicalChooseControl.info.unifyNum;
                     parallelTitle.Text   = periodicalChooseControl.info.parallelTitle;
                     postIssueNumber.Text = periodicalChooseControl.info.postIssueNumber;
                     openBook.Text        = periodicalChooseControl.info.openBook;
                     issnPrice.Text       = periodicalChooseControl.info.issnPrice;
                     releaseCycle.Text    = periodicalChooseControl.info.releaseCycle;
                     remark.Text          = periodicalChooseControl.info.remark;
                     this.id = periodicalChooseControl.info.id;
                     GetCallNumberByIdDAL getCsDAL = new GetCallNumberByIdDAL();
                     object errorMsg = periodicalChooseControl.info.id;
                     if (getCsDAL.GetCallNumberById(ref errorMsg))
                     {
                         RetrunInfo retrunInfo = errorMsg as RetrunInfo;
                         if (retrunInfo.TrueOrFalse)
                         {
                             this.callNumberInfo = retrunInfo.result as CallNumberInfo;
                             if (combox.SelectedIndex == 0)
                             {
                                 callNumber.Text = this.callNumberInfo.searchNumberOrderNum;
                             }
                             else
                             {
                                 callNumber.Text = this.callNumberInfo.searchNumberAuthorNum;
                             }
                         }
                     }
                     grid.ItemsSource = null;
                 }
             }
             else
             {
                 MessageBox.Show("失败提示:" + info.result);
             }
         }
     }
 }
예제 #2
0
 private void Isbn_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         lock (Isbn.Text)
         {
             object         issn     = Isbn.Text;
             SelectLocalDAL localDAL = new SelectLocalDAL();
             if (localDAL.SelectLoacl(ref issn))
             {
                 RetrunInfo info = issn as RetrunInfo;
                 if (info.TrueOrFalse)
                 {
                     List <PeriodicalsInfo>  infos = info.result as List <PeriodicalsInfo>;
                     PeriodicalChooseControl periodicalChooseControl = new PeriodicalChooseControl(infos);
                     DialogHelper.ShowDialog(periodicalChooseControl);
                     if (periodicalChooseControl.info != null)
                     {
                         Name.Content            = periodicalChooseControl.info.name;
                         fkTypeCode.Content      = periodicalChooseControl.info.fkTypeCode;
                         fkTypeName.Content      = periodicalChooseControl.info.fkTypeName;
                         fkPressName.Content     = periodicalChooseControl.info.fkPressName;
                         Author.Content          = periodicalChooseControl.info.author;
                         unifyNum.Content        = periodicalChooseControl.info.unifyNum;
                         parallelTitle.Content   = periodicalChooseControl.info.parallelTitle;
                         postIssueNumber.Content = periodicalChooseControl.info.postIssueNumber;
                         openBook.Content        = periodicalChooseControl.info.openBook;
                         issnPrice.Content       = periodicalChooseControl.info.issnPrice;
                         releaseCycle.Content    = periodicalChooseControl.info.releaseCycle;
                         remark.Content          = periodicalChooseControl.info.remark;
                         periodicalInfo          = new PeriodicalInfo()
                         {
                             fkCataPeriodicalId = periodicalChooseControl.info.id,
                         };
                         ///弹出框
                         #region 索取号
                         GetCallNumberByIdDAL getCsDAL = new GetCallNumberByIdDAL();
                         object errorMsg = periodicalChooseControl.info.id;
                         if (getCsDAL.GetCallNumberById(ref errorMsg))
                         {
                             RetrunInfo retrunInfo = errorMsg as RetrunInfo;
                             if (retrunInfo.TrueOrFalse)
                             {
                                 this.info = retrunInfo.result as CallNumberInfo;
                                 callNumbermsg.Visibility = Visibility.Hidden;
                                 if (combox.SelectedIndex == 0)
                                 {
                                     CallNumberTxt.Text = this.info.searchNumberOrderNum;
                                 }
                                 else
                                 {
                                     CallNumberTxt.Text = this.info.searchNumberAuthorNum;
                                 }
                             }
                         }
                     }
                     #endregion
                 }
                 else
                 {
                     if (ServerSetting.IsOverDue)
                     {
                         ErrorPage errorPage = new ErrorPage(info.result.ToString(), mainControl.mainWindow);
                         DialogHelper.ShowDialog(errorPage);
                     }
                     else
                     {
                         MessageBox.Show("失败提示:" + info.result);
                     }
                 }
             }
         }
     }
 }