신규 스케쥴 추가시 조회되지 않는 현상 수정

스케쥴 승인,1,2 기능 구현
This commit is contained in:
chi
2021-05-18 09:21:34 +09:00
parent d56775dc75
commit b3228bbdb6
41 changed files with 2390 additions and 723 deletions

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 템플릿에서 생성되었습니다.
//
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace JobReportMailService
{
using System;
using System.Collections.Generic;
public partial class EETGW_ProjectToDo
{
public int idx { get; set; }
public int pidx { get; set; }
public Nullable<int> pseq { get; set; }
public Nullable<int> sw { get; set; }
public Nullable<int> ww { get; set; }
public string sort { get; set; }
public string cate { get; set; }
public string title { get; set; }
public string pdate { get; set; }
public string edate { get; set; }
public Nullable<int> process { get; set; }
public string remark { get; set; }
public string remark2 { get; set; }
public string wuid { get; set; }
public System.DateTime wdate { get; set; }
}
}

View File

@@ -12,20 +12,23 @@ namespace JobReportMailService
using System;
using System.Collections.Generic;
public partial class vMailingProjectSchedule
public partial class EETGW_ProjectsSchedule
{
public int idx { get; set; }
public string pdate { get; set; }
public string name { get; set; }
public string userManager { get; set; }
public string gcode { get; set; }
public Nullable<int> project { get; set; }
public Nullable<int> no { get; set; }
public Nullable<int> seq { get; set; }
public string title { get; set; }
public Nullable<int> sw { get; set; }
public Nullable<int> ew { get; set; }
public Nullable<int> swa { get; set; }
public Nullable<int> progress { get; set; }
public Nullable<int> ewa { get; set; }
public Nullable<int> ww { get; set; }
public string uid { get; set; }
public string memo { get; set; }
public Nullable<int> appoval { get; set; }
public Nullable<int> progress { get; set; }
public string wuid { get; set; }
public System.DateTime wdate { get; set; }
}
}

View File

@@ -65,12 +65,24 @@
<DesignTime>True</DesignTime>
<DependentUpon>DataSet1.xsd</DependentUpon>
</Compile>
<Compile Include="EETGW_ProjectsSchedule.cs">
<DependentUpon>Model1.tt</DependentUpon>
</Compile>
<Compile Include="EETGW_ProjectToDo.cs">
<DependentUpon>Model1.tt</DependentUpon>
</Compile>
<Compile Include="fChildBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fChildBase.Designer.cs">
<DependentUpon>fChildBase.cs</DependentUpon>
</Compile>
<Compile Include="fNoScheduleDayWeek.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fNoScheduleDayWeek.Designer.cs">
<DependentUpon>fNoScheduleDayWeek.cs</DependentUpon>
</Compile>
<Compile Include="fSendMail.cs">
<SubType>Form</SubType>
</Compile>
@@ -136,6 +148,9 @@
</Compile>
<Compile Include="Program_bak.cs" />
<Compile Include="Program.cs" />
<Compile Include="Projects.cs">
<DependentUpon>Model1.tt</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
@@ -150,9 +165,6 @@
<Compile Include="vJobReportForUser.cs">
<DependentUpon>Model1.tt</DependentUpon>
</Compile>
<Compile Include="vMailingProjectSchedule.cs">
<DependentUpon>Model1.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
@@ -199,6 +211,9 @@
<EmbeddedResource Include="fChildBase.resx">
<DependentUpon>fChildBase.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fNoScheduleDayWeek.resx">
<DependentUpon>fNoScheduleDayWeek.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fSendMail.resx">
<DependentUpon>fSendMail.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -77,11 +77,12 @@ namespace JobReportMailService
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.printToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.statusStrip = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.menuStrip.SuspendLayout();
this.toolStrip.SuspendLayout();
this.statusStrip.SuspendLayout();
@@ -436,6 +437,7 @@ namespace JobReportMailService
this.toolStripSeparator1,
this.saveToolStripButton,
this.printToolStripButton,
this.toolStripButton2,
this.toolStripSeparator2,
this.toolStripButton1});
this.toolStrip.Location = new System.Drawing.Point(0, 24);
@@ -485,6 +487,20 @@ namespace JobReportMailService
this.printToolStripButton.Text = "스케쥴(주)";
this.printToolStripButton.Click += new System.EventHandler(this.printToolStripButton_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// toolStripButton1
//
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Black;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(111, 22);
this.toolStripButton1.Text = "메일생성및전송";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// statusStrip
//
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -502,19 +518,14 @@ namespace JobReportMailService
this.toolStripStatusLabel.Size = new System.Drawing.Size(31, 17);
this.toolStripStatusLabel.Text = "상태";
//
// toolStripSeparator2
// toolStripButton2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// toolStripButton1
//
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Black;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(111, 22);
this.toolStripButton1.Text = "메일생성및전송";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Black;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(107, 22);
this.toolStripButton2.Text = "스케쥴없음(주)";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
// MDIParent1
//
@@ -592,6 +603,7 @@ namespace JobReportMailService
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ToolStripButton toolStripButton2;
}
}

View File

@@ -125,5 +125,13 @@ namespace JobReportMailService
childForm.Show();
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
Form childForm = new fNoScheduleDayWeek();
childForm.MdiParent = this;
//childForm.Text = "창 " + childFormNumber++;
childForm.Show();
}
}
}

View File

@@ -358,6 +358,22 @@
7KsQbgqUGgqaXhN8oTjoWBqB72ksLqcwsfADw5NR9DtXSDGXQzwxKecF9ZJWyG7oMDrpJ9/2b1IgYJGo
HqKiTokywRVwmd+0qKoJB3mNOHDiAvaWC7GnrB67ubX5YkH53+BwfgHgHTGbZU7qDAAAAABJRU5ErkJg
gg==
</value>
</data>
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIqSURBVDhPrZL7T1JxAMVZP/b/tLa2Wm21mail1YZlRjid
k6JhTApClhGmktrDWlKjK3OBDrLAMWJaY9MZZJbo0umWQIEFXRPQMB6ne788HFpbW322s93d3fM598X5
7xjtUxh0vId5dOaPMY14kL18O6zgrcePrWz8TMIbWMGgbQIlZy6DW31pu4Qts0ml0gjRETjdH0iGHC4Y
LONwz/hQJVITQbZSiN7qxsfPdHYzA7u8Go1jdnEZJruLLP92XWsaB5sks+4LhgvWbc5puDxeVDaocOSs
HBrtM9zps21KFJ1PSHnENZ9fzS0HwzHML4XRa3CglC+Dsqsfj0xjKGVEpNzUpof6/hAoyxs8MDqhf/4a
tyk7rt4yQtyiBb+xA+U1ChSfluLkuevo1lkhUWlRnHuMm49fIBKLk+WtJJIprMcT5E6+0uv49CUKeTuF
OmkXcweyjEB1zwzLq3d46nCDMr/E3b5hqHsGIGvXQdTcA8HFDvAaWnBUIEfRKQnOM+cqhdew/7goI1B2
D8AfCGU3C4msbcAbXMVOcEh2UBzwxW0oqZZi1+GajKC504DpuSUw7ywPe/wtmsCcfw1jszQpW7OCY7UK
7KsQbgqUGgqaXhN8oTjoWBqB72ksLqcwsfADw5NR9DtXSDGXQzwxKecF9ZJWyG7oMDrpJ9/2b1IgYJGo
HqKiTokywRVwmd+0qKoJB3mNOHDiAvaWC7GnrB67ubX5YkH53+BwfgHgHTGbZU7qDAAAAABJRU5ErkJg
gg==
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@@ -31,6 +31,8 @@ namespace JobReportMailService
public virtual DbSet<vJobReportForUser> vJobReportForUser { get; set; }
public virtual DbSet<HolidayLIst> HolidayLIst { get; set; }
public virtual DbSet<MailForm> MailForm { get; set; }
public virtual DbSet<vMailingProjectSchedule> vMailingProjectSchedule { get; set; }
public virtual DbSet<EETGW_ProjectToDo> EETGW_ProjectToDo { get; set; }
public virtual DbSet<Projects> Projects { get; set; }
public virtual DbSet<EETGW_ProjectsSchedule> EETGW_ProjectsSchedule { get; set; }
}
}

View File

@@ -5,6 +5,47 @@
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="EEModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
<EntityType Name="EETGW_ProjectsSchedule">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="gcode" Type="varchar" MaxLength="20" />
<Property Name="project" Type="int" />
<Property Name="no" Type="int" />
<Property Name="seq" Type="int" />
<Property Name="title" Type="varchar" MaxLength="100" />
<Property Name="sw" Type="int" />
<Property Name="ew" Type="int" />
<Property Name="swa" Type="int" />
<Property Name="ewa" Type="int" />
<Property Name="uid" Type="varchar" MaxLength="50" />
<Property Name="memo" Type="varchar(max)" />
<Property Name="appoval" Type="int" />
<Property Name="progress" Type="int" />
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
</EntityType>
<EntityType Name="EETGW_ProjectToDo">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="pidx" Type="int" Nullable="false" />
<Property Name="pseq" Type="int" />
<Property Name="sw" Type="int" />
<Property Name="ww" Type="int" />
<Property Name="sort" Type="varchar" MaxLength="2" />
<Property Name="cate" Type="nvarchar" MaxLength="100" />
<Property Name="title" Type="nvarchar" MaxLength="255" />
<Property Name="pdate" Type="varchar" MaxLength="10" />
<Property Name="edate" Type="varchar" MaxLength="10" />
<Property Name="process" Type="int" />
<Property Name="remark" Type="varchar(max)" />
<Property Name="remark2" Type="varchar(max)" />
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
</EntityType>
<EntityType Name="HolidayLIst">
<Key>
<PropertyRef Name="idx" />
@@ -86,6 +127,62 @@
<Property Name="exceptmail" Type="varchar(max)" />
<Property Name="exceptmailcc" Type="varchar(max)" />
</EntityType>
<EntityType Name="Projects">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="pidx" Type="int" />
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
<Property Name="isdel" Type="bit" />
<Property Name="category" Type="varchar" MaxLength="50" />
<Property Name="status" Type="varchar" MaxLength="50" />
<Property Name="asset" Type="varchar" MaxLength="100" />
<Property Name="level" Type="int" />
<Property Name="rev" Type="int" />
<Property Name="process" Type="varchar" MaxLength="50" />
<Property Name="part" Type="varchar" MaxLength="50" />
<Property Name="pdate" Type="varchar" MaxLength="10" />
<Property Name="name" Type="nvarchar" MaxLength="255" />
<Property Name="userManager" Type="varchar" MaxLength="50" />
<Property Name="usermain" Type="varchar" MaxLength="50" />
<Property Name="usersub" Type="varchar" MaxLength="50" />
<Property Name="userhw2" Type="varchar" MaxLength="50" />
<Property Name="reqstaff" Type="varchar" MaxLength="50" />
<Property Name="costo" Type="float" />
<Property Name="costn" Type="float" />
<Property Name="cnt" Type="int" />
<Property Name="remark_req" Type="varchar(max)" />
<Property Name="remark_ans" Type="varchar(max)" />
<Property Name="sdate" Type="varchar" MaxLength="50" />
<Property Name="ddate" Type="varchar" MaxLength="50" />
<Property Name="edate" Type="varchar" MaxLength="50" />
<Property Name="odate" Type="varchar" MaxLength="50" />
<Property Name="progress" Type="int" />
<Property Name="memo" Type="nvarchar" MaxLength="255" />
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
<Property Name="orderno" Type="varchar" MaxLength="50" />
<Property Name="crdue" Type="varchar" MaxLength="10" />
<Property Name="import" Type="bit" />
<Property Name="path" Type="varchar" MaxLength="300" />
<Property Name="userprocess" Type="nvarchar" MaxLength="100" />
<Property Name="CMP_Background" Type="nvarchar(max)" />
<Property Name="CMP_Description" Type="nvarchar(max)" />
<Property Name="CMP_Before" Type="nvarchar(max)" />
<Property Name="CMP_After" Type="nvarchar(max)" />
<Property Name="bCost" Type="bit" />
<Property Name="bFanOut" Type="bit" />
<Property Name="div" Type="varchar" MaxLength="2" />
<Property Name="EB_Site" Type="varchar" MaxLength="20" />
<Property Name="EB_Line" Type="varchar" MaxLength="10" />
<Property Name="EB_Team" Type="varchar" MaxLength="10" />
<Property Name="EB_Model" Type="varchar" MaxLength="100" />
<Property Name="EB_OutSourceName" Type="varchar" MaxLength="100" />
<Property Name="EB_RepairTime" Type="float" />
<Property Name="EB_ConstNew" Type="float" />
<Property Name="EB_BoardName" Type="nvarchar" MaxLength="255" />
</EntityType>
<!--생성 중 오류 발생:
경고 6002: 테이블/뷰 'EE.dbo.vGroupUser'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
<EntityType Name="vGroupUser">
@@ -131,35 +228,22 @@
<Property Name="svalue" Type="varchar" MaxLength="255" />
<Property Name="hrs" Type="float" />
<Property Name="ot" Type="float" />
<Property Name="userProcess" Type="nvarchar" MaxLength="100" />
<Property Name="requestpart" Type="varchar" MaxLength="50" />
<Property Name="package" Type="varchar" MaxLength="50" />
</EntityType>
<!--생성 중 오류 발생:
경고 6002: 테이블/뷰 'EE.dbo.vMailingProjectSchedule'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
<EntityType Name="vMailingProjectSchedule">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="int" Nullable="false" />
<Property Name="pdate" Type="varchar" MaxLength="10" />
<Property Name="name" Type="nvarchar" MaxLength="255" />
<Property Name="userManager" Type="varchar" MaxLength="50" />
<Property Name="seq" Type="int" />
<Property Name="title" Type="varchar" MaxLength="100" />
<Property Name="sw" Type="int" />
<Property Name="ew" Type="int" />
<Property Name="swa" Type="int" />
<Property Name="progress" Type="int" />
<Property Name="ewa" Type="int" />
<Property Name="ww" Type="int" />
<Property Name="memo" Type="varchar(max)" />
<Property Name="userProcess" Type="varchar" MaxLength="50" />
<Property Name="status" Type="varchar" MaxLength="20" />
<Property Name="projectName" Type="nvarchar" MaxLength="255" />
<Property Name="description" Type="nvarchar(max)" />
<Property Name="ww" Type="varchar" MaxLength="6" />
</EntityType>
<EntityContainer Name="EEModelStoreContainer">
<EntitySet Name="EETGW_ProjectsSchedule" EntityType="Self.EETGW_ProjectsSchedule" Schema="dbo" store:Type="Tables" />
<EntitySet Name="EETGW_ProjectToDo" EntityType="Self.EETGW_ProjectToDo" Schema="dbo" store:Type="Tables" />
<EntitySet Name="HolidayLIst" EntityType="Self.HolidayLIst" Schema="dbo" store:Type="Tables" />
<EntitySet Name="JobReport" EntityType="Self.JobReport" Schema="dbo" store:Type="Tables" />
<EntitySet Name="MailData" EntityType="Self.MailData" Schema="dbo" store:Type="Tables" />
<EntitySet Name="MailForm" EntityType="Self.MailForm" Schema="dbo" store:Type="Tables" />
<EntitySet Name="Projects" EntityType="Self.Projects" Schema="dbo" store:Type="Tables" />
<EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" store:Type="Views" store:Schema="dbo">
<DefiningQuery>SELECT
[vGroupUser].[gcode] AS [gcode],
@@ -197,28 +281,15 @@
[vJobReportForUser].[svalue] AS [svalue],
[vJobReportForUser].[hrs] AS [hrs],
[vJobReportForUser].[ot] AS [ot],
[vJobReportForUser].[userProcess] AS [userProcess],
[vJobReportForUser].[requestpart] AS [requestpart],
[vJobReportForUser].[package] AS [package]
[vJobReportForUser].[package] AS [package],
[vJobReportForUser].[userProcess] AS [userProcess],
[vJobReportForUser].[status] AS [status],
[vJobReportForUser].[projectName] AS [projectName],
[vJobReportForUser].[description] AS [description],
[vJobReportForUser].[ww] AS [ww]
FROM [dbo].[vJobReportForUser] AS [vJobReportForUser]</DefiningQuery>
</EntitySet>
<EntitySet Name="vMailingProjectSchedule" EntityType="Self.vMailingProjectSchedule" store:Type="Views" store:Schema="dbo">
<DefiningQuery>SELECT
[vMailingProjectSchedule].[idx] AS [idx],
[vMailingProjectSchedule].[pdate] AS [pdate],
[vMailingProjectSchedule].[name] AS [name],
[vMailingProjectSchedule].[userManager] AS [userManager],
[vMailingProjectSchedule].[seq] AS [seq],
[vMailingProjectSchedule].[title] AS [title],
[vMailingProjectSchedule].[sw] AS [sw],
[vMailingProjectSchedule].[ew] AS [ew],
[vMailingProjectSchedule].[swa] AS [swa],
[vMailingProjectSchedule].[progress] AS [progress],
[vMailingProjectSchedule].[ewa] AS [ewa],
[vMailingProjectSchedule].[ww] AS [ww],
[vMailingProjectSchedule].[memo] AS [memo]
FROM [dbo].[vMailingProjectSchedule] AS [vMailingProjectSchedule]</DefiningQuery>
</EntitySet>
</EntityContainer>
</Schema></edmx:StorageModels>
<!-- CSDL content -->
@@ -313,9 +384,13 @@
<Property Name="svalue" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="hrs" Type="Double" />
<Property Name="ot" Type="Double" />
<Property Name="userProcess" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
<Property Name="userProcess" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="requestpart" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="package" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="status" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
<Property Name="projectName" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
<Property Name="description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="ww" Type="String" MaxLength="6" FixedLength="false" Unicode="false" />
</EntityType>
<EntityContainer Name="EEEntities" annotation:LazyLoadingEnabled="true">
<EntitySet Name="JobReport" EntityType="Self.JobReport" />
@@ -324,7 +399,9 @@
<EntitySet Name="vJobReportForUser" EntityType="Self.vJobReportForUser" />
<EntitySet Name="HolidayLIst" EntityType="EEModel.HolidayLIst" />
<EntitySet Name="MailForm" EntityType="EEModel.MailForm" />
<EntitySet Name="vMailingProjectSchedule" EntityType="EEModel.vMailingProjectSchedule" />
<EntitySet Name="EETGW_ProjectToDo" EntityType="EEModel.EETGW_ProjectToDo" />
<EntitySet Name="Projects" EntityType="EEModel.Projects" />
<EntitySet Name="EETGW_ProjectsSchedule" EntityType="EEModel.EETGW_ProjectsSchedule" />
</EntityContainer>
<EntityType Name="HolidayLIst">
<Key>
@@ -359,23 +436,102 @@
<Property Name="exceptmail" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="exceptmailcc" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="vMailingProjectSchedule">
<EntityType Name="EETGW_ProjectToDo">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="Int32" Nullable="false" />
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="pidx" Type="Int32" Nullable="false" />
<Property Name="pseq" Type="Int32" />
<Property Name="sw" Type="Int32" />
<Property Name="ww" Type="Int32" />
<Property Name="sort" Type="String" MaxLength="2" FixedLength="false" Unicode="false" />
<Property Name="cate" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
<Property Name="title" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
<Property Name="pdate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="edate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="process" Type="Int32" />
<Property Name="remark" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="remark2" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="wuid" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
</EntityType>
<EntityType Name="Projects">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="pidx" Type="Int32" />
<Property Name="gcode" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="isdel" Type="Boolean" />
<Property Name="category" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="status" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="asset" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
<Property Name="level" Type="Int32" />
<Property Name="rev" Type="Int32" />
<Property Name="process" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="part" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="pdate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="name" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
<Property Name="userManager" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="usermain" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="usersub" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="userhw2" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="reqstaff" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="costo" Type="Double" />
<Property Name="costn" Type="Double" />
<Property Name="cnt" Type="Int32" />
<Property Name="remark_req" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="remark_ans" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="sdate" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="ddate" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="edate" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="odate" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="progress" Type="Int32" />
<Property Name="memo" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
<Property Name="wuid" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
<Property Name="orderno" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="crdue" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="import" Type="Boolean" />
<Property Name="path" Type="String" MaxLength="300" FixedLength="false" Unicode="false" />
<Property Name="userprocess" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
<Property Name="CMP_Background" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="CMP_Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="CMP_Before" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="CMP_After" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="bCost" Type="Boolean" />
<Property Name="bFanOut" Type="Boolean" />
<Property Name="div" Type="String" MaxLength="2" FixedLength="false" Unicode="false" />
<Property Name="EB_Site" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
<Property Name="EB_Line" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="EB_Team" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="EB_Model" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
<Property Name="EB_OutSourceName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
<Property Name="EB_RepairTime" Type="Double" />
<Property Name="EB_ConstNew" Type="Double" />
<Property Name="EB_BoardName" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
</EntityType>
<EntityType Name="EETGW_ProjectsSchedule">
<Key>
<PropertyRef Name="idx" />
</Key>
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="gcode" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
<Property Name="project" Type="Int32" />
<Property Name="no" Type="Int32" />
<Property Name="seq" Type="Int32" />
<Property Name="title" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
<Property Name="sw" Type="Int32" />
<Property Name="ew" Type="Int32" />
<Property Name="swa" Type="Int32" />
<Property Name="progress" Type="Int32" />
<Property Name="ewa" Type="Int32" />
<Property Name="ww" Type="Int32" />
<Property Name="uid" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="memo" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="appoval" Type="Int32" />
<Property Name="progress" Type="Int32" />
<Property Name="wuid" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
</EntityType>
</Schema>
</edmx:ConceptualModels>
@@ -463,6 +619,10 @@
<EntitySetMapping Name="vJobReportForUser">
<EntityTypeMapping TypeName="EEModel.vJobReportForUser">
<MappingFragment StoreEntitySet="vJobReportForUser">
<ScalarProperty Name="ww" ColumnName="ww" />
<ScalarProperty Name="description" ColumnName="description" />
<ScalarProperty Name="projectName" ColumnName="projectName" />
<ScalarProperty Name="status" ColumnName="status" />
<ScalarProperty Name="idx" ColumnName="idx" />
<ScalarProperty Name="pdate" ColumnName="pdate" />
<ScalarProperty Name="gcode" ColumnName="gcode" />
@@ -514,21 +674,102 @@
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="vMailingProjectSchedule">
<EntityTypeMapping TypeName="EEModel.vMailingProjectSchedule">
<MappingFragment StoreEntitySet="vMailingProjectSchedule">
<ScalarProperty Name="memo" ColumnName="memo" />
<EntitySetMapping Name="EETGW_ProjectToDo">
<EntityTypeMapping TypeName="EEModel.EETGW_ProjectToDo">
<MappingFragment StoreEntitySet="EETGW_ProjectToDo">
<ScalarProperty Name="wdate" ColumnName="wdate" />
<ScalarProperty Name="wuid" ColumnName="wuid" />
<ScalarProperty Name="remark2" ColumnName="remark2" />
<ScalarProperty Name="remark" ColumnName="remark" />
<ScalarProperty Name="process" ColumnName="process" />
<ScalarProperty Name="edate" ColumnName="edate" />
<ScalarProperty Name="pdate" ColumnName="pdate" />
<ScalarProperty Name="title" ColumnName="title" />
<ScalarProperty Name="cate" ColumnName="cate" />
<ScalarProperty Name="sort" ColumnName="sort" />
<ScalarProperty Name="ww" ColumnName="ww" />
<ScalarProperty Name="ewa" ColumnName="ewa" />
<ScalarProperty Name="sw" ColumnName="sw" />
<ScalarProperty Name="pseq" ColumnName="pseq" />
<ScalarProperty Name="pidx" ColumnName="pidx" />
<ScalarProperty Name="idx" ColumnName="idx" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Projects">
<EntityTypeMapping TypeName="EEModel.Projects">
<MappingFragment StoreEntitySet="Projects">
<ScalarProperty Name="EB_BoardName" ColumnName="EB_BoardName" />
<ScalarProperty Name="EB_ConstNew" ColumnName="EB_ConstNew" />
<ScalarProperty Name="EB_RepairTime" ColumnName="EB_RepairTime" />
<ScalarProperty Name="EB_OutSourceName" ColumnName="EB_OutSourceName" />
<ScalarProperty Name="EB_Model" ColumnName="EB_Model" />
<ScalarProperty Name="EB_Team" ColumnName="EB_Team" />
<ScalarProperty Name="EB_Line" ColumnName="EB_Line" />
<ScalarProperty Name="EB_Site" ColumnName="EB_Site" />
<ScalarProperty Name="div" ColumnName="div" />
<ScalarProperty Name="bFanOut" ColumnName="bFanOut" />
<ScalarProperty Name="bCost" ColumnName="bCost" />
<ScalarProperty Name="CMP_After" ColumnName="CMP_After" />
<ScalarProperty Name="CMP_Before" ColumnName="CMP_Before" />
<ScalarProperty Name="CMP_Description" ColumnName="CMP_Description" />
<ScalarProperty Name="CMP_Background" ColumnName="CMP_Background" />
<ScalarProperty Name="userprocess" ColumnName="userprocess" />
<ScalarProperty Name="path" ColumnName="path" />
<ScalarProperty Name="import" ColumnName="import" />
<ScalarProperty Name="crdue" ColumnName="crdue" />
<ScalarProperty Name="orderno" ColumnName="orderno" />
<ScalarProperty Name="wdate" ColumnName="wdate" />
<ScalarProperty Name="wuid" ColumnName="wuid" />
<ScalarProperty Name="memo" ColumnName="memo" />
<ScalarProperty Name="progress" ColumnName="progress" />
<ScalarProperty Name="odate" ColumnName="odate" />
<ScalarProperty Name="edate" ColumnName="edate" />
<ScalarProperty Name="ddate" ColumnName="ddate" />
<ScalarProperty Name="sdate" ColumnName="sdate" />
<ScalarProperty Name="remark_ans" ColumnName="remark_ans" />
<ScalarProperty Name="remark_req" ColumnName="remark_req" />
<ScalarProperty Name="cnt" ColumnName="cnt" />
<ScalarProperty Name="costn" ColumnName="costn" />
<ScalarProperty Name="costo" ColumnName="costo" />
<ScalarProperty Name="reqstaff" ColumnName="reqstaff" />
<ScalarProperty Name="userhw2" ColumnName="userhw2" />
<ScalarProperty Name="usersub" ColumnName="usersub" />
<ScalarProperty Name="usermain" ColumnName="usermain" />
<ScalarProperty Name="userManager" ColumnName="userManager" />
<ScalarProperty Name="name" ColumnName="name" />
<ScalarProperty Name="pdate" ColumnName="pdate" />
<ScalarProperty Name="part" ColumnName="part" />
<ScalarProperty Name="process" ColumnName="process" />
<ScalarProperty Name="rev" ColumnName="rev" />
<ScalarProperty Name="level" ColumnName="level" />
<ScalarProperty Name="asset" ColumnName="asset" />
<ScalarProperty Name="status" ColumnName="status" />
<ScalarProperty Name="category" ColumnName="category" />
<ScalarProperty Name="isdel" ColumnName="isdel" />
<ScalarProperty Name="gcode" ColumnName="gcode" />
<ScalarProperty Name="pidx" ColumnName="pidx" />
<ScalarProperty Name="idx" ColumnName="idx" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="EETGW_ProjectsSchedule">
<EntityTypeMapping TypeName="EEModel.EETGW_ProjectsSchedule">
<MappingFragment StoreEntitySet="EETGW_ProjectsSchedule">
<ScalarProperty Name="wdate" ColumnName="wdate" />
<ScalarProperty Name="wuid" ColumnName="wuid" />
<ScalarProperty Name="progress" ColumnName="progress" />
<ScalarProperty Name="appoval" ColumnName="appoval" />
<ScalarProperty Name="memo" ColumnName="memo" />
<ScalarProperty Name="uid" ColumnName="uid" />
<ScalarProperty Name="ewa" ColumnName="ewa" />
<ScalarProperty Name="swa" ColumnName="swa" />
<ScalarProperty Name="ew" ColumnName="ew" />
<ScalarProperty Name="sw" ColumnName="sw" />
<ScalarProperty Name="title" ColumnName="title" />
<ScalarProperty Name="seq" ColumnName="seq" />
<ScalarProperty Name="userManager" ColumnName="userManager" />
<ScalarProperty Name="name" ColumnName="name" />
<ScalarProperty Name="pdate" ColumnName="pdate" />
<ScalarProperty Name="no" ColumnName="no" />
<ScalarProperty Name="project" ColumnName="project" />
<ScalarProperty Name="gcode" ColumnName="gcode" />
<ScalarProperty Name="idx" ColumnName="idx" />
</MappingFragment>
</EntityTypeMapping>

View File

@@ -11,7 +11,9 @@
<EntityTypeShape EntityType="EEModel.vJobReportForUser" Width="1.5" PointX="6.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="EEModel.HolidayLIst" Width="1.5" PointX="0.75" PointY="6.75" />
<EntityTypeShape EntityType="EEModel.MailForm" Width="1.5" PointX="7.375" PointY="5.75" />
<EntityTypeShape EntityType="EEModel.vMailingProjectSchedule" Width="1.5" PointX="9.375" PointY="0.75" />
<EntityTypeShape EntityType="EEModel.EETGW_ProjectToDo" Width="2.875" PointX="10.125" PointY="5.75" />
<EntityTypeShape EntityType="EEModel.Projects" Width="1.5" PointX="9.75" PointY="10.75" />
<EntityTypeShape EntityType="EEModel.EETGW_ProjectsSchedule" Width="1.5" PointX="9.375" PointY="0.75" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>

View File

@@ -0,0 +1,69 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 템플릿에서 생성되었습니다.
//
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace JobReportMailService
{
using System;
using System.Collections.Generic;
public partial class Projects
{
public int idx { get; set; }
public Nullable<int> pidx { get; set; }
public string gcode { get; set; }
public Nullable<bool> isdel { get; set; }
public string category { get; set; }
public string status { get; set; }
public string asset { get; set; }
public Nullable<int> level { get; set; }
public Nullable<int> rev { get; set; }
public string process { get; set; }
public string part { get; set; }
public string pdate { get; set; }
public string name { get; set; }
public string userManager { get; set; }
public string usermain { get; set; }
public string usersub { get; set; }
public string userhw2 { get; set; }
public string reqstaff { get; set; }
public Nullable<double> costo { get; set; }
public Nullable<double> costn { get; set; }
public Nullable<int> cnt { get; set; }
public string remark_req { get; set; }
public string remark_ans { get; set; }
public string sdate { get; set; }
public string ddate { get; set; }
public string edate { get; set; }
public string odate { get; set; }
public Nullable<int> progress { get; set; }
public string memo { get; set; }
public string wuid { get; set; }
public System.DateTime wdate { get; set; }
public string orderno { get; set; }
public string crdue { get; set; }
public Nullable<bool> import { get; set; }
public string path { get; set; }
public string userprocess { get; set; }
public string CMP_Background { get; set; }
public string CMP_Description { get; set; }
public string CMP_Before { get; set; }
public string CMP_After { get; set; }
public Nullable<bool> bCost { get; set; }
public Nullable<bool> bFanOut { get; set; }
public string div { get; set; }
public string EB_Site { get; set; }
public string EB_Line { get; set; }
public string EB_Team { get; set; }
public string EB_Model { get; set; }
public string EB_OutSourceName { get; set; }
public Nullable<double> EB_RepairTime { get; set; }
public Nullable<double> EB_ConstNew { get; set; }
public string EB_BoardName { get; set; }
}
}

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("21.03.25.1300")]
[assembly: AssemblyFileVersion("21.03.25.1300")]
[assembly: AssemblyVersion("21.05.16.1600")]
[assembly: AssemblyFileVersion("21.05.16.1600")]

View File

@@ -0,0 +1,83 @@

namespace JobReportMailService
{
partial class fNoScheduleDayWeek
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fNoScheduleDayWeek));
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(473, 25);
this.toolStrip1.TabIndex = 2;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(48, 22);
this.toolStripButton1.Text = "Run";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// fNoScheduleDayWeek
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(473, 416);
this.Controls.Add(this.toolStrip1);
this.Name = "fNoScheduleDayWeek";
this.Text = "스케쥴없음(주보고)";
this.Load += new System.EventHandler(this.fJobReportDay_Load);
this.Controls.SetChildIndex(this.toolStrip1, 0);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
}

View File

@@ -0,0 +1,241 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace JobReportMailService
{
public partial class fNoScheduleDayWeek : fChildBase
{
public fNoScheduleDayWeek()
{
InitializeComponent();
}
private void fJobReportDay_Load(object sender, EventArgs e)
{
task = Task.Run(() =>
{
while (taskrun)
{
if (taskwait)
{
if (task != null)
task.Wait(1000);
continue;
}
var ts = DateTime.Now - LastUpdateTime;
if (ts.TotalMinutes <= 15)
{
if ((DateTime.Now - ConsoleTime).TotalHours >= 1.0)
{
addmsg("15분 미만이라 동작하지 않습니다");
ConsoleTime = DateTime.Now;
}
}
else if (DateTime.Now.DayOfWeek != DayOfWeek.Monday)
{
//토,일요일에는 동작하지 않는다
if ((DateTime.Now - ConsoleTime).TotalHours >= 1.0)
{
addmsg("월요일에만 동작 합니다");
ConsoleTime = DateTime.Now;
}
}
else if (DateTime.Now.Hour < 10) //10시부터 동작한다
{
if ((DateTime.Now - ConsoleTime).TotalHours >= 1.0)
{
addmsg("9시 이전에는 동작하지 않습니다");
ConsoleTime = DateTime.Now;
}
}
else
{
LastUpdateTime = DateTime.Now;
try
{
RunData();
}
catch (Exception ex)
{
addmsg(ex.Message);
task.Wait(5000);
}
}
Task.Delay(Delaytime).Wait();
}
});
timer1.Start();
}
void RunData()
{
addmsg("스케쥴입력(주) 미 작성자 추출 작업을 시작 합니다");
var db = new EEEntities();
//메일양식이 지정되어있는지 체크
var MailJD = db.MailForm.AsNoTracking().Where(t => t.gcode == Pub.vGcode & t.cate == "SN").FirstOrDefault();
if (MailJD == null)
{
//토,일요일에는 동작하지 않는다
addmsg("메일 양식(SN)이 입력되지 않았습니다");
return;
}
//기준일자는 오늘부터 -15일이다
var sd = DateTime.Now.AddDays(-15);
var ed = DateTime.Now;
var str_sd = sd.ToShortDateString();
var str_ed = ed.ToShortDateString();
var str_dt = DateTime.Now.ToShortDateString();
//오늘날짜로 데이터가 등록되어있느지 확인한다.
db = new EEEntities();
var Existweek = db.MailData.AsNoTracking().Where(t => t.gcode == Pub.vGcode && t.cate == "SN" && t.wuid == "395552" && t.pdate == str_dt).Any();
if (Existweek)
{
addmsg($"스케쥴(day)({str_dt}) 보고 메일이 이미 등록되어 있습니다");
return;
}
//대상 사용자 목록을 추출한다
//var ta = new DataSet1TableAdapters.vMailingProjectScheduleTableAdapter();
//var users = new DataSet1.vMailingProjectScheduleDataTable();
//ta.Fill(users);
db = new EEEntities();
var projects = db.Projects.AsNoTracking().Where(t => t.gcode == Pub.vGcode && t.status == "진행" && (t.isdel == null || t.isdel == false)).OrderBy(t => t.sdate).ToList();
// db.vMailingProjectSchedule.ToList();// .vJobReportForUser.Where(t => t.gcode == Pub.vGcode).GroupBy(t => t.id);
addmsg($"{projects.Count} 건의 데이터가 확인 되었습니다");
//메일데이터 생성
var body = new System.Text.StringBuilder();
body.AppendLine("<table border='1' cellspacing='1' cellpadding='1' style='text-align:center;'>");
body.AppendLine("<tr>");
body.AppendLine("<td>시작일</td>");
body.AppendLine("<td>상태</td>");
body.AppendLine("<td>번호</td>");
body.AppendLine("<td>Project</td>");
body.AppendLine("<td>요청</td>");
body.AppendLine("<td>Champion</td>");
body.AppendLine("<td>협업</td>");
body.AppendLine("<td>만료일</td>");
body.AppendLine("<td>수량</td>");
body.AppendLine("<td>외주금액</td>");
body.AppendLine("<td>자체금액</td>");
body.AppendLine("<td>절감액</td>");
body.AppendLine("<td>CR/CF</td>");
body.AppendLine("</tr>");
//var gp = projects.GroupBy(t => t.idx);
foreach (var row in projects)
{
//스케쥴에서 데이터를 찾는다.
var cnt = db.EETGW_ProjectsSchedule.AsNoTracking().Where(t => t.gcode == Pub.vGcode && t.project == row.idx && t.appoval > 1).Any();
if (cnt == true) continue; //등록되었다
body.AppendLine($"<tr>");
body.AppendLine($"<td>{row.sdate}</td>");
body.AppendLine($"<td>{row.status}</td>");
body.AppendLine($"<td>{row.idx}</td>");
body.AppendLine($"<td>{row.name}</td>");
body.AppendLine($"<td>{row.reqstaff}</td>");
body.AppendLine($"<td>{row.userManager}</td>");
body.AppendLine($"<td>{row.usermain}/{row.usersub}/{row.userhw2}</td>");
body.AppendLine($"<td>{row.edate}</td>");
body.AppendLine($"<td>{row.cnt}</td>");
body.AppendLine($"<td>{row.costo}</td>");
body.AppendLine($"<td>{row.costn}</td>");
body.AppendLine($"<td>{row.costo - row.costn}</td>");
body.AppendLine($"<td>{row.orderno}</td>");
body.AppendLine($"</tr>");
}
body.AppendLine("</table>");
//일별경고(월요일제외)
if (MailJD != null)
{
var mail_subject = MailJD.subject;//.Replace("{담당자}", userinfo.name).Replace("{사번}", userinfo.id);
var mail_to = MailJD.tolist;//.Replace("{담당자}", userinfo.email);
var mail_cc = string.Empty; //
if (MailJD.cc != null) mail_cc = MailJD.cc;//.Replace("{담당자}", userinfo.email);
var mail_bcc = string.Empty;
if (MailJD.bcc != null) mail_bcc = MailJD.bcc;//.Replace("{담당자}", userinfo.email);
var mail_body = MailJD.body;//.Replace("{담당자}", userinfo.name);
//mail_body = mail_body.Replace("{사번}", userinfo.id);
//메일본문을 생성해서 진행해야함
var mail_content = mail_body.Replace("{data}", body.ToString());
//메일데이터를 생성한다.
//mail_to = "chikyun.kim@amkor.co.kr";
//mail_bcc = string.Empty;
//mail_cc = string.Empty;
mail_to = Pub.MailSort(mail_to, MailJD.exceptmail);
if (string.IsNullOrEmpty(mail_to) == false)
{
db = new EEEntities();
db.MailData.Add(new MailData
{
gcode = Pub.vGcode,
cate = "SN",
subject = mail_subject,
fromlist = "eetgw@amkor.co.kr",
tolist = Pub.MailSort(mail_to, MailJD.exceptmail),
bcc = mail_bcc,
cc = Pub.MailSort(mail_cc, MailJD.exceptmailcc),
pdate = DateTime.Now.ToShortDateString(),
body = mail_content,
wuid = "395552",
wdate = DateTime.Now,
});
db.SaveChanges();
addmsg($"메일 전송 완료(no스케쥴week)");
System.Threading.Thread.Sleep(10000);
}
else
{
addmsg("받는사람이 소거되어 메일을 생성하지 않습니다");
}
}
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
taskwait = !taskwait;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (task != null)
{
if (task.IsCompleted) this.toolStripButton1.Text = "완료";
else if (task.IsCanceled) this.toolStripButton1.Text = "취소";
else if (taskwait) this.toolStripButton1.Text = "대기상태";
else this.toolStripButton1.Text = "가동중";
this.toolStripButton1.Enabled = true;
}
else
{
this.toolStripButton1.Text = "사용불가";
this.toolStripButton1.Enabled = false;
}
}
}
}

View File

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>104, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
</root>

View File

@@ -27,5 +27,9 @@ namespace JobReportMailService
public string userProcess { get; set; }
public string requestpart { get; set; }
public string package { get; set; }
public string status { get; set; }
public string projectName { get; set; }
public string description { get; set; }
public string ww { get; set; }
}
}