public DynamicDataWebMethodReturnType ViewActivations() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectURL = "~/Sales_LicenseKeyActivations/List.aspx?LicenseKeyId=" + Id.ToString(); return ret; }
public DynamicDataWebMethodReturnType Receivables() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectURL = "~/Accounting_LedgerItems/List.aspx?LedgerType=Receivable&AccountId=" + Id.ToString(); return ret; }
public DynamicDataWebMethodReturnType GeoLocatetheIP() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectURL = "http://www.maxmind.com/app/locate_demo_ip?ips=" + DownloadedByIP; return ret; }
public DynamicDataWebMethodReturnType Reboot() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "The server is restarting.."; ret.Message = "Please wait while your server restarts."; ret.Exception = false; return ret; }
public DynamicDataWebMethodReturnType TurnOffPower() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "The server is turning off.."; ret.Message = "Please wait your server is turning off!"; ret.Exception = false; return ret; }
public DynamicDataWebMethodReturnType Apply2() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectWidth = 800; ret.RedirectHeight = 500; ret.RedirectURL = "~/HR_Applications/Details.aspx"; return ret; }
public DynamicDataWebMethodReturnType DownloadPrintablePDF() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.FilePath = GeneratePDF(); ret.FileMimeType = "application/octet-stream"; ret.FileName = "Check " + CheckNumber.ToString() + ".pdf"; //ret.RedirectRequest = true; //ret.RedirectURL = "~/Accounting_LedgerItems/List.aspx?AccountId=" + AccountId.ToString() + "&LedgerType=" + LedgerType.ToString(); return ret; }
public DynamicDataWebMethodReturnType TurnOnPower() { // do the power up DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "The server is turning on.."; ret.Message = "Please wait while your server spins up."; ret.Exception = false; return ret; }
public DynamicDataWebMethodReturnType Receivables() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; // real url = String.Format("~/{0}/{1}.aspx?Id={2}", TableName, PageTemplate, ObjectId.ToString()); ret.RedirectURL = Path; ret.RedirectWidth = 800; ret.RedirectHeight = 500; return ret; }
public DynamicDataWebMethodReturnType ImportBillPaymentData() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "Bill Payment Import Tool"; var financialAccount = GetAccount(); if (financialAccount.LedgerType == LedgerType.Checking.ToString()) { ret.Message = "The import was successful!\r\n\r\nImported/Updated: "; int addedItems = ImportScheduledPayments(); ret.Message += addedItems.ToString(); } else { ret.Message = "This option can only be used on Checking accounts."; } return ret; }
public DynamicDataWebMethodReturnType UpdateCachedBalances() { // call UpdateCachedBalances() instead ?? DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "Balance Update"; decimal remoteAvailableBalance = 0.0m; decimal remoteLedgerBalance = 0.0m; bool retrieved = GetBalances(GetAccount(), out remoteAvailableBalance, out remoteLedgerBalance); if (retrieved) { using (WeavverEntityContainer data = new WeavverEntityContainer()) { var ofxSettings = (from x in data.Accounting_OFXSettings where x.Id == Id select x).FirstOrDefault(); ofxSettings.AvailableBalance = remoteAvailableBalance; ofxSettings.LedgerBalance = remoteLedgerBalance; int changes = data.SaveChanges(); if (changes > 0) { ret.Message = "Balances updated."; ret.RefreshData = true; return ret; } } } ret.Message = "Could not update the balance."; return ret; }
public DynamicDataWebMethodReturnType TestConnection() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "OFX Check"; var financialAccount = GetAccount(); if (financialAccount.LedgerType == LedgerType.Checking.ToString() || financialAccount.LedgerType == LedgerType.Savings.ToString()) { nsoftware.InEBank.Account account = new nsoftware.InEBank.Account(); account.Firewall.AutoDetect = false; account.Firewall.FirewallType = nsoftware.InEBank.FirewallTypes.fwNone; account.FIUrl = Url; account.FIOrganization = FinancialInstitutionName; account.FIId = FinancialInstitutionId.ToString(); account.OFXAppId = "QWIN"; account.OFXAppVersion = "1800"; account.OFXUser = Username; account.OFXPassword = Password; try { account.GetInfo(); ret.Message = "The connection succeeded."; } catch (Exception ex) { ret.Message = "The OFX connection failed: " + ex.Message; } } if (financialAccount.LedgerType == LedgerType.CreditCard.ToString()) { Accounting_Accounts ccAccount = GetAccount(); nsoftware.InEBank.Ccstatement ccStatement = new nsoftware.InEBank.Ccstatement(); ccStatement.OFXAppId = "QWIN"; ccStatement.OFXAppVersion = "1800"; ccStatement.FIUrl = Url; ccStatement.FIId = FinancialInstitutionId.ToString(); ccStatement.FIOrganization = FinancialInstitutionName; ccStatement.CardNumber = ccAccount.AccountNumber; ccStatement.OFXUser = Username; ccStatement.OFXPassword = Password; ccStatement.StartDate = DateTime.Now.Subtract(TimeSpan.FromDays(40)).ToString("MM/dd/yyyy hh:mm:ss"); try { ccStatement.GetStatement(); ret.Message = "The connection succeeded."; } catch (Exception ex) { ret.Message = "The test connection failed: " + ex.Message; } } return ret; }
public DynamicDataWebMethodReturnType ListAccounts() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); Accounting_Accounts account = GetAccount(); nsoftware.InEBank.Account remoteAccount = new Account(); remoteAccount.OFXAppId = "QWIN"; remoteAccount.OFXAppVersion = "1800"; remoteAccount.FIUrl = Url; remoteAccount.FIId = FinancialInstitutionId.ToString(); remoteAccount.FIOrganization = FinancialInstitutionName; remoteAccount.OFXUser = Username; remoteAccount.OFXPassword = Password; remoteAccount.GetInfo(); string acctList = "<br />No accounts found"; if (remoteAccount.Accounts.Count > 0) { acctList = "<br />"; foreach (var acct in remoteAccount.Accounts) { acctList += acct.Id; if (!String.IsNullOrEmpty(acct.Description)) { acctList += ": " + acct.Description; } acctList += "<br />"; acctList += " - Type: " + acct.AccType + "<br />"; acctList += " - Status: " + acct.Status + "<br />"; acctList += " - Is Checking: " + (acct.Checking ? "yes" : "no") + "<br /><br />"; } } ret.Status = "Remote Account List"; ret.Message = acctList; return ret; }
public DynamicDataWebMethodReturnType SendviaBillPay() { // check if there is an OFX settings record for the selected Funding Source // do a search on the server sidepayees for the payeeid // if the payee does not exist, create it and get the payeeid // we now have the payeeid DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "Not implemented."; ret.Message = "Not implemented."; return ret; }
public DynamicDataWebMethodReturnType GenerateKey() { ushort ushortserial = ushort.Parse("1"); //i.ToString()//key.Id.ToString()); //changed sept 7 string checksum = EncryptedLicense.Checksum(FullName + "|" + Organization); //DateTime future = DateTime.UtcNow.Add(TimeSpan.FromDays(365)); DateTime future = DateTime.UtcNow.Add(TimeSpan.FromDays(545)); EncryptedLicenseProvider licenseProvider = new EncryptedLicenseProvider(); string licensekey = licenseProvider.GenerateKey(ConfigurationManager.AppSettings["snap_productkey"], "C" + checksum + "$D" + future.Month.ToString() + "/" + future.Day.ToString() + "/" + future.Year.ToString(), ushortserial); //Key = licensekey; DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "License Key"; ret.Message = "Your license key is:\r\n\r\n";// +licensekey; ret.Exception = false; return ret; }
public DynamicDataWebMethodReturnType ImportLedgerItems() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "Import Status"; using (WeavverEntityContainer data = new WeavverEntityContainer()) { //data.Accounting_OFXSettings.Attach(this); DateTime startAt = DateTime.Now.Subtract(TimeSpan.FromDays(7)); if (LastSuccessfulConnection.HasValue) startAt = LastSuccessfulConnection.Value; List<Accounting_OFXLedgerItem> items = GetRemoteLedgerItems(startAt, DateTime.Now); foreach (var item in items) { if (!item.HasBeenImported) { data.Accounting_LedgerItems.Add(item.LedgerItem); } } LastSuccessfulConnection = DateTime.UtcNow; int results = data.SaveChanges(); ret.Message = "Ledger items added/updated: " + results.ToString(); } return ret; }
public DynamicDataWebMethodReturnType PushUnbilledItems() { int periodsBilled = BillAccount(Id); DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "Account Billed"; ret.Message = "Total periods billed: " + periodsBilled.ToString(); ret.RefreshData = true; return ret; }
public DynamicDataWebMethodReturnType OFXSettings() { using (WeavverEntityContainer data = new WeavverEntityContainer()) { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectWidth = 800; ret.RedirectHeight = 500; var settings = GetOFXSettings(); if (settings == null) { ret.RedirectURL = "~/Accounting_OFXSettings/Details.aspx?AccountId=" + Id.ToString(); } else { ret.RedirectURL = "~/Accounting_OFXSettings/Details.aspx?Id=" + settings.Id.ToString(); } return ret; } }
public DynamicDataWebMethodReturnType ViewLedger() { string url = "~/Accounting_LedgerItems/List.aspx?AccountId={0}&LedgerType={1}"; if (AccountFrom == OrganizationId) { //string apbalance = Accounting.Balance_ForLedger(LedgerType.Payable, LoggedInUser.OrganizationId, item.AccountTo, null, null).ToString("C"); url = String.Format(url, AccountTo, LedgerType.Payable.ToString()); } else { //string arbalance = //Master.AddAttachmentLink("Receivables - " + arbalance, "); url = String.Format(url, AccountFrom, LedgerType.Receivable.ToString()); } DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectURL = url; return ret; }
public DynamicDataWebMethodReturnType ReceivableBalance() { // do the power up DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.Status = "Not implemented"; ret.Message = "not implemented"; ret.Exception = false; return ret; //string arbalance = Accounting.Balance_ForLedger(LedgerType.Receivable, SelectedOrganization.Id, item.Id, null, null).ToString("C"); //Master.AddAttachmentLink("Receivable Ledger " + arbalance, "~/company/accounting/ledger?ledgertype=Receivable&id=" + item.Id.ToString(), ""); }
public DynamicDataWebMethodReturnType ImportData() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectWidth = 800; ret.RedirectHeight = 500; ret.RedirectURL = "~/Imports/Accounting_LedgerItems.aspx?AccountId=" + Id.ToString(); return ret; }
public DynamicDataWebMethodReturnType ViewLedgerPeriod() { string ledgerlink = "~/Accounting_LedgerItems/List.aspx?AccountId={0}&LedgerType={1}&PostAt_Start={2}&PostAt_End={3}"; using (WeavverEntityContainer data = new WeavverEntityContainer()) { var account = (from x in data.Accounting_Accounts where x.Id == Account select x).First(); ledgerlink = String.Format(ledgerlink, Account.ToString(), account.LedgerType.ToString(), StartAt.ToLocalTime().ToString("MM/dd/yy"), EndAt.ToLocalTime().ToString("MM/dd/yy")); } DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectURL = ledgerlink; ret.RedirectRequest = true; return ret; }
public DynamicDataWebMethodReturnType ViewLedger() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectWidth = 1192; ret.RedirectHeight = 492; ret.RedirectURL = "~/Accounting_LedgerItems/List.aspx?AccountId=" + Id.ToString() + "&LedgerType=" + LedgerType.ToString(); return ret; }
public DynamicDataWebMethodReturnType ViewTransaction() { DynamicDataWebMethodReturnType ret = new DynamicDataWebMethodReturnType(); ret.RedirectRequest = true; ret.RedirectURL = "~/Accounting_LedgerItems/List.aspx?TransactionId=" + Id.ToString(); return ret; }