sendmail 별도의 프로세스로 분리하고 클라우드서버에서 실행함
This commit is contained in:
13
Sub/Console_SendMail/App.config
Normal file
13
Sub/Console_SendMail/App.config
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="Console_SendMail.Properties.Settings.gwcs" connectionString="Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertificate=True"
|
||||
providerName="System.Data.SqlClient" />
|
||||
<add name="Console_SendMail.Properties.Settings.cs" connectionString="Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertificate=True" />
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
83
Sub/Console_SendMail/Console_SendMail.csproj
Normal file
83
Sub/Console_SendMail/Console_SendMail.csproj
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8C94D335-7468-4964-AA24-1E3313CF7ABA}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Console_SendMail</RootNamespace>
|
||||
<AssemblyName>Console_SendMail</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataBaseManager.cs" />
|
||||
<Compile Include="DSMail.Designer.cs">
|
||||
<DependentUpon>DSMail.xsd</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ReportUserData.cs" />
|
||||
<Compile Include="_MailService.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="DSMail.xsc">
|
||||
<DependentUpon>DSMail.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DSMail.xsd">
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DSMail.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="DSMail.xss">
|
||||
<DependentUpon>DSMail.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
15164
Sub/Console_SendMail/DSMail.Designer.cs
generated
Normal file
15164
Sub/Console_SendMail/DSMail.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
Sub/Console_SendMail/DSMail.xsc
Normal file
9
Sub/Console_SendMail/DSMail.xsc
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
1678
Sub/Console_SendMail/DSMail.xsd
Normal file
1678
Sub/Console_SendMail/DSMail.xsd
Normal file
File diff suppressed because it is too large
Load Diff
22
Sub/Console_SendMail/DSMail.xss
Normal file
22
Sub/Console_SendMail/DSMail.xss
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="477" ViewPortY="20" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:MailForm" ZOrder="4" X="24" Y="30" Height="305" Width="191" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:MailData" ZOrder="5" X="262" Y="96" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:MailAuto" ZOrder="6" X="514" Y="130" Height="324" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:vMailingProjectSchedule" ZOrder="3" X="95" Y="183" Height="305" Width="289" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:ProjectsIngList" ZOrder="11" X="372" Y="176" Height="305" Width="191" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="237" />
|
||||
<Shape ID="DesignTable:EETGW_ProjectsSchedule" ZOrder="1" X="643" Y="413" Height="96" Width="291" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
|
||||
<Shape ID="DesignTable:vJobReportForUser" ZOrder="8" X="815" Y="102" Height="229" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:JobReport" ZOrder="2" X="622" Y="57" Height="400" Width="318" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="332" />
|
||||
<Shape ID="DesignTable:HolidayLIst" ZOrder="10" X="813" Y="358" Height="191" Width="210" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:vGroupUser" ZOrder="9" X="783" Y="300" Height="324" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:JobReportDateList" ZOrder="7" X="89" Y="43" Height="96" Width="212" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="45" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
158
Sub/Console_SendMail/DataBaseManager.cs
Normal file
158
Sub/Console_SendMail/DataBaseManager.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Console_SendMail
|
||||
{
|
||||
public static class DatabaseManager
|
||||
{
|
||||
public static System.Data.SqlClient.SqlConnection getCn()
|
||||
{
|
||||
string cs = Properties.Settings.Default.gwcs;
|
||||
System.Data.SqlClient.SqlConnection cn = new System.Data.SqlClient.SqlConnection();
|
||||
cn.ConnectionString = cs;
|
||||
return cn;
|
||||
}
|
||||
public static List<String> getGroupListWithoutGcode(string GroupColumn, string table, string where = "", Boolean desc = false, Boolean useColumncover = true)
|
||||
{
|
||||
List<string> retval = new List<string>();
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select {0} " +
|
||||
" from {1} WITH (nolock) " +
|
||||
" where isnull({0},'') != '' ";
|
||||
|
||||
if (table.ToUpper() == "USERS")
|
||||
sql = "select {0} " +
|
||||
" from {1} WITH (nolock) " +
|
||||
" where isnull({0},'') != '' ";
|
||||
|
||||
|
||||
if (where != "") sql += " and " + where;
|
||||
|
||||
sql += " group by {0} " +
|
||||
" order by {0} ";
|
||||
if (desc) sql += " desc";
|
||||
|
||||
if (useColumncover)
|
||||
sql = string.Format(sql, "[" + GroupColumn + "]", table);
|
||||
else
|
||||
sql = string.Format(sql, GroupColumn, table);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.Add(rdr[0].ToString());
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static string GetUserName(string gcode, string uid)
|
||||
{
|
||||
var slq = "select isnull(name,'') from vGroupUser" +
|
||||
$" where gcode = '{gcode}'" +
|
||||
$" and id = '{uid}'";
|
||||
try
|
||||
{
|
||||
return ExecuteScalar(slq);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
public static string GetUserTel(string gcode, string uid)
|
||||
{
|
||||
var slq = "select isnull(tel,'') from vGroupUser" +
|
||||
$" where gcode = '{gcode}'" +
|
||||
$" and id = '{uid}'";
|
||||
try
|
||||
{
|
||||
return ExecuteScalar(slq);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
public static int ExecuteNonQuery(string sql)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var retval = cmd.ExecuteNonQuery();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static int ExecuteScalarI(string sql)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var retval = (int)(cmd.ExecuteScalar());
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
public static string ExecuteScalar(string sql)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var retval = cmd.ExecuteScalar().ToString();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
public static List<String> getGroupList(string gcode, string GroupColumn, string table, string where = "", Boolean desc = false, Boolean useColumncover = true)
|
||||
{
|
||||
List<string> retval = new List<string>();
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
var sql = "select {0} " +
|
||||
" from {1} WITH (nolock) " +
|
||||
$" where gcode='{gcode}' and isnull({0},'') != '' ";
|
||||
|
||||
if (table.ToUpper() == "USERS")
|
||||
sql = "select {0} " +
|
||||
" from {1} WITH (nolock) " +
|
||||
" where isnull({0},'') != '' ";
|
||||
|
||||
|
||||
if (where != "") sql += " and " + where;
|
||||
|
||||
sql += " group by {0} " +
|
||||
" order by {0} ";
|
||||
if (desc) sql += " desc";
|
||||
|
||||
if (useColumncover)
|
||||
sql = string.Format(sql, "[" + GroupColumn + "]", table);
|
||||
else
|
||||
sql = string.Format(sql, GroupColumn, table);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteReader();
|
||||
while (rdr.Read())
|
||||
{
|
||||
retval.Add(rdr[0].ToString());
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
public static List<String> getDateList(string table,string where="")
|
||||
{
|
||||
return getGroupList("pdate", table,where);
|
||||
}
|
||||
}
|
||||
}
|
||||
165
Sub/Console_SendMail/Program.cs
Normal file
165
Sub/Console_SendMail/Program.cs
Normal file
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Console_SendMail
|
||||
{
|
||||
partial class Program
|
||||
{
|
||||
//DateTime redisTryTime = DateTime.Parse("1982-11-23");
|
||||
static Boolean bBW = true;
|
||||
static DateTime ChkMakeAutoTime = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkSendMailTime = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkMakeSchDayWeekTime = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkMakeSchDay = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkNoSchedule = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkJobreportDay = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkJObreportWeek = DateTime.Now.AddDays(-1);
|
||||
static DateTime ChkTakeARest = DateTime.Now.AddDays(-1);
|
||||
|
||||
public static string MailSort(string addr, string except)
|
||||
{
|
||||
if (string.IsNullOrEmpty(except)) return addr;
|
||||
var alist = addr.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
var elist = except.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
foreach (var item in elist)
|
||||
alist.Remove(item);
|
||||
if (alist.Count < 1) return string.Empty;
|
||||
return string.Join(";", alist);
|
||||
}
|
||||
|
||||
static string getdbdata(object tdata)
|
||||
{
|
||||
if (tdata == null) return string.Empty;
|
||||
return tdata.ToString();
|
||||
}
|
||||
static string getMaillist(object orgo)
|
||||
{
|
||||
var org = string.Empty;
|
||||
if (orgo != null) org = orgo.ToString();
|
||||
org = org.Replace(";", ",").Replace(":", ",");
|
||||
string list_to = "";
|
||||
foreach (var item in org.Split(','))
|
||||
{
|
||||
if (item.Trim() != "")
|
||||
{
|
||||
var atindex = item.IndexOf("@");
|
||||
if (atindex != -1)
|
||||
{
|
||||
var dotindex = item.IndexOf(".", atindex + 1);
|
||||
if (dotindex != -1)
|
||||
{
|
||||
//정상이므로 추가한다.
|
||||
if (list_to != "") list_to += ",";
|
||||
list_to += item.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list_to;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
Console.WriteLine("mail start");
|
||||
while (true)
|
||||
{
|
||||
|
||||
//메일대기내역전송
|
||||
var tsSendMail = DateTime.Now - ChkSendMailTime;
|
||||
if (tsSendMail.TotalMilliseconds > 1000)
|
||||
{
|
||||
try { SendMail(); }
|
||||
catch { }
|
||||
finally { ChkSendMailTime = DateTime.Now; }
|
||||
}
|
||||
|
||||
//자동생성 메일 작성
|
||||
var tsAutoMake = DateTime.Now - ChkMakeAutoTime;
|
||||
if (tsAutoMake.TotalMinutes >= 10)
|
||||
{
|
||||
try { MakeAutoMail(); }
|
||||
catch { }
|
||||
finally { ChkMakeAutoTime = DateTime.Now; }
|
||||
}
|
||||
|
||||
///스케쥴 기한 알림(주)
|
||||
var tsScheDayweek = DateTime.Now - ChkMakeSchDayWeekTime;
|
||||
if (tsScheDayweek.TotalMinutes > 30 && DateTime.Now.DayOfWeek == DayOfWeek.Monday && DateTime.Now.Hour >= 10 && DateTime.Now.Hour <= 18)
|
||||
{
|
||||
|
||||
try { Mail_MakeScheduleDayWeek(); }
|
||||
catch { }
|
||||
finally { ChkMakeSchDayWeekTime = DateTime.Now; }
|
||||
}
|
||||
|
||||
///스케쥴 기한 알림(일)
|
||||
var tsScheDay = DateTime.Now - ChkMakeSchDay;
|
||||
if (tsScheDay.TotalMinutes > 30 && DateTime.Now.DayOfWeek != DayOfWeek.Saturday &&
|
||||
DateTime.Now.DayOfWeek != DayOfWeek.Sunday && DateTime.Now.Hour >= 10 && DateTime.Now.Hour <= 18)
|
||||
{
|
||||
|
||||
try { Mail_MakeScheduleDay(); }
|
||||
catch { }
|
||||
finally { ChkMakeSchDay = DateTime.Now; }
|
||||
}
|
||||
|
||||
///스케쥴없음
|
||||
var tsNoSchedule = DateTime.Now - ChkNoSchedule;
|
||||
if (tsNoSchedule.TotalMinutes > 30 && DateTime.Now.DayOfWeek == DayOfWeek.Monday && DateTime.Now.Hour >= 10 && DateTime.Now.Hour <= 18)
|
||||
{
|
||||
|
||||
try { Mail_NoSchedule(); }
|
||||
catch { }
|
||||
finally { ChkNoSchedule = DateTime.Now; }
|
||||
}
|
||||
|
||||
///업무일지(주간)
|
||||
var tsjobweek = DateTime.Now - ChkJObreportWeek;
|
||||
if (tsjobweek.TotalMinutes > 30 && DateTime.Now.DayOfWeek == DayOfWeek.Monday && DateTime.Now.Hour >= 9 && DateTime.Now.Hour <= 18)
|
||||
{
|
||||
|
||||
try { Mail_JobReportWeek(); }
|
||||
catch { }
|
||||
finally { ChkJObreportWeek = DateTime.Now; }
|
||||
}
|
||||
|
||||
///업무일지(일)
|
||||
var tsjobday = DateTime.Now - ChkJobreportDay;
|
||||
if (tsjobday.TotalMinutes > 15 &&
|
||||
DateTime.Now.DayOfWeek != DayOfWeek.Saturday &&
|
||||
DateTime.Now.DayOfWeek != DayOfWeek.Sunday &&
|
||||
DateTime.Now.DayOfWeek != DayOfWeek.Monday &&
|
||||
DateTime.Now.Hour >= 9 && DateTime.Now.Hour <= 18)
|
||||
{
|
||||
|
||||
try { Mail_JobReportDay(); }
|
||||
catch { }
|
||||
finally { ChkJobreportDay = DateTime.Now; }
|
||||
}
|
||||
|
||||
///휴가신청(Remind) - 230611
|
||||
var tsTakeaRest = DateTime.Now - ChkTakeARest;
|
||||
if (tsTakeaRest.TotalMinutes > 15 &&
|
||||
DateTime.Now.DayOfWeek != DayOfWeek.Saturday &&
|
||||
DateTime.Now.DayOfWeek != DayOfWeek.Sunday &&
|
||||
DateTime.Now.Hour >= 17)
|
||||
{
|
||||
|
||||
try { Mail_Take_a_rest_remind(); }
|
||||
catch { }
|
||||
finally { ChkTakeARest = DateTime.Now; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Console.WriteLine("mail end");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
36
Sub/Console_SendMail/Properties/AssemblyInfo.cs
Normal file
36
Sub/Console_SendMail/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이러한 특성 값을 변경하세요.
|
||||
[assembly: AssemblyTitle("Console_SendMail")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ATK")]
|
||||
[assembly: AssemblyProduct("Console_SendMail")]
|
||||
[assembly: AssemblyCopyright("Copyright © ATK 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("8c94d335-7468-4964-aa24-1e3313cf7aba")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
50
Sub/Console_SendMail/Properties/Settings.Designer.cs
generated
Normal file
50
Sub/Console_SendMail/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,50 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
// 런타임 버전:4.0.30319.42000
|
||||
//
|
||||
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
// 이러한 변경 내용이 손실됩니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Console_SendMail.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Inf" +
|
||||
"o=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertific" +
|
||||
"ate=True")]
|
||||
public string gwcs {
|
||||
get {
|
||||
return ((string)(this["gwcs"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Inf" +
|
||||
"o=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertific" +
|
||||
"ate=True")]
|
||||
public string cs {
|
||||
get {
|
||||
return ((string)(this["cs"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Sub/Console_SendMail/Properties/Settings.settings
Normal file
21
Sub/Console_SendMail/Properties/Settings.settings
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Console_SendMail.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="gwcs" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&amp;DJ+ug-D;Encrypt=False;TrustServerCertificate=True</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertificate=True</Value>
|
||||
</Setting>
|
||||
<Setting Name="cs" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&amp;DJ+ug-D;Encrypt=False;TrustServerCertificate=True</ConnectionString>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertificate=True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
16
Sub/Console_SendMail/ReportUserData.cs
Normal file
16
Sub/Console_SendMail/ReportUserData.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Console_SendMail
|
||||
{
|
||||
internal class ReportUserData
|
||||
{
|
||||
public DateTime date { get; set; }
|
||||
public string uid { get; set; }
|
||||
public string uname { get; set; }
|
||||
public double hrs { get; set; }
|
||||
}
|
||||
}
|
||||
1411
Sub/Console_SendMail/_MailService.cs
Normal file
1411
Sub/Console_SendMail/_MailService.cs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user