fleet-contractor/ConsoleApplication1/IronIntelDebugHost.cs

62 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Configuration;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;
using IronIntel.DataModel;
using IronIntel.DataModel.Admin.Customers;
using IronIntel.DataModel.Admin.Users;
using Foresight.Services.Log;
namespace ConsoleApplication1
{
class IronIntelDebugHost : IIronIntelHost
{
public CustomerInfo GetCustomerInfo(string custid)
{
throw new NotImplementedException();
}
public CustomerManager GetCustomerManager()
{
return new CustomerManager(ConfigurationManager.AppSettings["MasterDb"]);
}
public string GetIronIntelDbConnectionString(string custid)
{
throw new NotImplementedException();
}
public LoginManager GetLoginManager()
{
return new LoginManager(ConfigurationManager.AppSettings["MasterDb"]);
}
public int SendEmail(string customerid, MailMessage msg)
{
var mail = new Foresight.Services.Mail.MailSender(@"net.tcp://192.168.25.210:20100/fisvcs/systemsvc");
mail.AppName = "fleet_dev";
return (int)mail.SendMail("fleet_dev", customerid, "", msg);
}
public void WriteLog(string logtype, string source, string message, string detail, string extmsg)
{
LogWriter log = new LogWriter(@"net.tcp://192.168.25.210:20100/fisvcs/systemsvc");
log.WriteLog("fleet_dev", "Foresight", "hq-pc", "SystemService", logtype, source, message, detail, extmsg);
}
public void WriteLog(string customerid, string logtype, string source, string message, string detail, string extmsg)
{
LogWriter log = new LogWriter(@"net.tcp://192.168.25.210:20100/fisvcs/systemsvc");
log.WriteLog("fleet_dev", customerid, "hq-pc", "SystemService", logtype, source, message, detail, extmsg);
}
long IIronIntelHost.SendEmail(string customerid, MailMessage msg)
{
throw new NotImplementedException();
}
}
}