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; }
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); } }
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); }
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); }
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; }