예제 #1
0
        static public void SaveRemarks(string ownerGUIDFieldName, string ownerGUID, string userMessagePrefix, DataView v)
        {
            if (v == null)
            {
                return;
            }

            string savefilter = v.RowFilter;

            v.RowFilter = "";

// ReSharper disable InconsistentNaming
            using (var Remark_u = new iTRAACProc("Remark_u"))
// ReSharper restore InconsistentNaming
                foreach (var remark in v.Cast <DataRowView>().Where(remark => remark.IsDirty()))
                {
                    Remark_u.AssignValues(remark);
                    if (!Remark_u.ExecuteNonQuery(userMessagePrefix + " Save Remark: "))
                    {
                        continue;
                    }
                    remark["RowGUID"] = Remark_u["@RowGUID"]; //for inserts
                    remark.AcceptChanges();
                }
            v.RowFilter = savefilter;
        }
예제 #2
0
        static public void SaveLocalSettings(bool displaySuccess = false)
        {
// ReSharper disable InconsistentNaming
            using (var Settings_u = new iTRAACProc("Settings_u"))
// ReSharper restore InconsistentNaming
            {
                Settings_u["@Settings"] = Local._table;
                Settings_u.ExecuteNonQuery("Settings - ", displaySuccess);
            }
        }
예제 #3
0
            public override bool Execute()
            {
                if (!IsPrintOK())
                {
                    return(false);
                }

                string[] taxFormGUIDs;
                using (var taxFormPackageNew = new iTRAACProc("TaxFormPackage_New"))
                {
                    taxFormPackageNew["@PackageCode"] = PackageCode; //for merging multiple requests for the same form type during this same customer session
                    taxFormPackageNew["@FormTypeID"]  = Convert.ToInt32(FormType);
                    taxFormPackageNew["@FormCount"]   = Qty;
                    taxFormPackageNew["@SponsorGUID"] = SponsorGUID;
                    taxFormPackageNew["@ClientGUID"]  = AuthorizedDependentClientGUID;
                    taxFormPackageNew["@Pending"]     = IsPending;

                    taxFormPackageNew.ExecuteNonQuery();

                    Price        = (decimal)taxFormPackageNew["@ServiceFee"];
                    GUID         = taxFormPackageNew["@TaxFormPackageGUID"].ToString();
                    PackageCode  = taxFormPackageNew["@PackageCode"].ToString();
                    taxFormGUIDs = taxFormPackageNew["@TaxFormGUIDs"].ToString().Split(',');

                    IsPending = false;
                    NotifyPropertyChanged("IsPending");
                }

                if (taxFormGUIDs.Any(taxFormGUID => !Print(PackageComponent.OrderForm | PackageComponent.Abw, taxFormGUID)))
                {
                    return(false);
                }

                FormStatusChangeCallback(SponsorGUID);

                return(true);
            }
예제 #4
0
      public override bool Execute()
      {
        if (!IsPrintOK()) return (false);

        string[] taxFormGUIDs;
        using (var taxFormPackageNew = new iTRAACProc("TaxFormPackage_New"))
        {
          taxFormPackageNew["@PackageCode"] = PackageCode; //for merging multiple requests for the same form type during this same customer session
          taxFormPackageNew["@FormTypeID"] = Convert.ToInt32(FormType);
          taxFormPackageNew["@FormCount"] = Qty;
          taxFormPackageNew["@SponsorGUID"] = SponsorGUID;
          taxFormPackageNew["@ClientGUID"] = AuthorizedDependentClientGUID;
          taxFormPackageNew["@Pending"] = IsPending;

          taxFormPackageNew.ExecuteNonQuery();

          Price = (decimal)taxFormPackageNew["@ServiceFee"];
          GUID = taxFormPackageNew["@TaxFormPackageGUID"].ToString();
          PackageCode = taxFormPackageNew["@PackageCode"].ToString();
          taxFormGUIDs = taxFormPackageNew["@TaxFormGUIDs"].ToString().Split(',');

          IsPending = false;
          NotifyPropertyChanged("IsPending");
        }

        if (taxFormGUIDs.Any(taxFormGUID => !Print(PackageComponent.OrderForm | PackageComponent.Abw, taxFormGUID)))
        {
          return(false);
        }

        FormStatusChangeCallback(SponsorGUID);

        return (true);
      }
예제 #5
0
    static public void SaveRemarks(string ownerGUIDFieldName, string ownerGUID, string userMessagePrefix, DataView v)
    {
      if (v == null) return;

      string savefilter = v.RowFilter;
      v.RowFilter = "";

// ReSharper disable InconsistentNaming
      using (var Remark_u = new iTRAACProc("Remark_u"))
// ReSharper restore InconsistentNaming
      foreach (var remark in v.Cast<DataRowView>().Where(remark => remark.IsDirty()))
      {
        Remark_u.AssignValues(remark);
        if (!Remark_u.ExecuteNonQuery(userMessagePrefix + " Save Remark: ")) continue;
        remark["RowGUID"] = Remark_u["@RowGUID"]; //for inserts
        remark.AcceptChanges();
      }
      v.RowFilter = savefilter;
    }