コード例 #1
0
 private void RemoveRemarkReasonPopupResult(ReasonPopupResultEventArgs args)
 {
     if (args.OK)
     {
         Taxform.RemoveRemark(args.State as DataRowView, args.Comments);
     }
 }
コード例 #2
0
 private void DiaryAddPopupResult(ReasonPopupResultEventArgs args)
 {
     if (args.OK)
     {
         RemarkModel.AddNew(Sponsor, Sponsor.SponsorRemarks, 0, args.Comments, null, args.IsAlert);
     }
 }
コード例 #3
0
 private void ViolationReasonPopupResult(ReasonPopupResultEventArgs args)
 {
     if (args.OK)
     {
         Taxform.SetViolation(Convert.ToInt16(args.SelectedValue), args.Comments);
     }
     else
     {
         btnViolation.IsChecked = false;
     }
 }
コード例 #4
0
 private void SuspensionReasonPopupResult(ReasonPopupResultEventArgs args)
 {
     if (args.OK)
     {
         Sponsor.Suspend(btnSuspend.IsChecked != null && btnSuspend.IsChecked.Value ? SponsorModel.SuspendDuration.Forever : SponsorModel.SuspendDuration.Remove, args.Comments);
     }
     else
     {
         btnSuspend.IsChecked = !btnSuspend.IsChecked; //otherwise this leaves the button where it was before the user clicked it.
     }
 }
コード例 #5
0
        void ActiveChangeReasonResult(ReasonPopupResultEventArgs args)
        {
            var chkClientActive = args.State as CheckBox;

            Debug.Assert(chkClientActive != null && chkClientActive.IsChecked != null, "chkClientActive != null");

            if (!args.OK)
            {
                return;
            }
            string message;
            bool   reasonRequired;

            if (Sponsor.CheckClientActiveRules(chkClientActive.Tag as DataRowView,
                                               !chkClientActive.IsChecked.Value, //gotta flip the IsChecked bool because we nixed the flip prior to coming here (in case the user wound up aborting the reason input prior to coming here)
                                               out message, out reasonRequired, args.Comments))
            {
                chkClientActive.IsChecked = !chkClientActive.IsChecked.Value;
            }
        }
コード例 #6
0
        private void FormStatusReasonPopupResult(ReasonPopupResultEventArgs args)
        {
            int            iRemarkTypeId = Convert.ToInt16(args.SelectedValue);
            UcToggleButton btn           = ((Math.Abs(iRemarkTypeId) == 25) ? btnLost : btnVoid); //could be negative for "UN-xxx" action

            if (!args.OK)
            {
                btn.IsChecked = !btn.IsChecked; return;
            }

            RemarkModel.SaveNew(Taxform.GUID, iRemarkTypeId, args.Comments);

            if (iRemarkTypeId == 25) //LOST, popup the Lost Forms Memo
            {
                var pdf = new PDFFormFiller("Lost-Forms-Memo.pdf", Taxform.Fields["OrderNumber"].ToString());
                pdf.SetField("CustomerNum", Taxform.Fields["SponsorCCode"]);
                pdf.SetField("CustomerName", Taxform.Fields["SponsorName"]);
                pdf.SetField("OrderNum1", Taxform.Fields["OrderNumber"]);
                pdf.SetField("Date", DateTime.Today.ToShortDateString());
                pdf.SetField("VATAgentName", UserModel.Current.Name);
                pdf.Display();
            }
        }
コード例 #7
0
 private void RemoveRemarkReasonPopupResult(ReasonPopupResultEventArgs args)
 {
   if (args.OK) Taxform.RemoveRemark(args.State as DataRowView, args.Comments);
 }
コード例 #8
0
 private void ViolationReasonPopupResult(ReasonPopupResultEventArgs args)
 {
   if (args.OK) Taxform.SetViolation(Convert.ToInt16(args.SelectedValue), args.Comments);
   else btnViolation.IsChecked = false;
 }
コード例 #9
0
    private void FormStatusReasonPopupResult(ReasonPopupResultEventArgs args)
    {
      int iRemarkTypeId = Convert.ToInt16(args.SelectedValue); 
      UcToggleButton btn = ((Math.Abs(iRemarkTypeId) == 25) ? btnLost : btnVoid); //could be negative for "UN-xxx" action

      if (!args.OK) { btn.IsChecked = !btn.IsChecked; return; }

      RemarkModel.SaveNew(Taxform.GUID, iRemarkTypeId, args.Comments);

      if (iRemarkTypeId == 25) //LOST, popup the Lost Forms Memo
      {
        var pdf = new PDFFormFiller("Lost-Forms-Memo.pdf", Taxform.Fields["OrderNumber"].ToString());
        pdf.SetField("CustomerNum", Taxform.Fields["SponsorCCode"]);
        pdf.SetField("CustomerName", Taxform.Fields["SponsorName"]);
        pdf.SetField("OrderNum1", Taxform.Fields["OrderNumber"]);
        pdf.SetField("Date", DateTime.Today.ToShortDateString());
        pdf.SetField("VATAgentName", UserModel.Current.Name);
        pdf.Display();
      }
    }
コード例 #10
0
 private void DisableRemarkAlertReasonPopupResult(ReasonPopupResultEventArgs args)
 {
     _disableRemarkAlertReasonPopupDispatcherFrame.Continue = false; //nugget: cancels the nested pump which allows the code after the PushFrame above to continue
 }
コード例 #11
0
 private void DisableRemarkAlertReasonPopupResult(ReasonPopupResultEventArgs args)
 {
   _disableRemarkAlertReasonPopupDispatcherFrame.Continue = false; //nugget: cancels the nested pump which allows the code after the PushFrame above to continue
 }
コード例 #12
0
 private void DiaryAddPopupResult(ReasonPopupResultEventArgs args)
 {
   if (args.OK)
     RemarkModel.AddNew(Sponsor, Sponsor.SponsorRemarks, 0, args.Comments, null, args.IsAlert);
 }
コード例 #13
0
    void ActiveChangeReasonResult(ReasonPopupResultEventArgs args)
    {
      var chkClientActive = args.State as CheckBox;
      Debug.Assert(chkClientActive != null && chkClientActive.IsChecked != null, "chkClientActive != null");

      if (!args.OK) return;
      string message;
      bool reasonRequired;
      if (Sponsor.CheckClientActiveRules(chkClientActive.Tag as DataRowView, 
                                         !chkClientActive.IsChecked.Value, //gotta flip the IsChecked bool because we nixed the flip prior to coming here (in case the user wound up aborting the reason input prior to coming here)
                                         out message, out reasonRequired, args.Comments))
        chkClientActive.IsChecked = !chkClientActive.IsChecked.Value;
    }
コード例 #14
0
 private void SuspensionReasonPopupResult(ReasonPopupResultEventArgs args)
 {
   if (args.OK) Sponsor.Suspend(btnSuspend.IsChecked != null && btnSuspend.IsChecked.Value ? SponsorModel.SuspendDuration.Forever : SponsorModel.SuspendDuration.Remove, args.Comments);
   else btnSuspend.IsChecked = !btnSuspend.IsChecked; //otherwise this leaves the button where it was before the user clicked it.
 }