chat 서버 기능 추가
This commit is contained in:
		
							
								
								
									
										11
									
								
								EETGW.sln
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								EETGW.sln
									
									
									
									
									
								
							| @@ -35,6 +35,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arControl", "Sub\arCtl\arCo | |||||||
| EndProject | EndProject | ||||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmkorRestfulService", "Sub\AmkorRestfulService\AmkorRestfulService.csproj", "{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}" | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmkorRestfulService", "Sub\AmkorRestfulService\AmkorRestfulService.csproj", "{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}" | ||||||
| EndProject | EndProject | ||||||
|  | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arTCPService.Shared", "Sub\tcpservice\arTCPService.Shared\arTCPService.Shared.csproj", "{3CD79316-211A-4B57-A6B4-00FA6091C29D}" | ||||||
|  | EndProject | ||||||
| Global | Global | ||||||
| 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||||
| 		Debug|Any CPU = Debug|Any CPU | 		Debug|Any CPU = Debug|Any CPU | ||||||
| @@ -137,6 +139,14 @@ Global | |||||||
| 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}.Release|Any CPU.Build.0 = Release|Any CPU | 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}.Release|Any CPU.Build.0 = Release|Any CPU | ||||||
| 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}.Release|x86.ActiveCfg = Release|x86 | 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}.Release|x86.ActiveCfg = Release|x86 | ||||||
| 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}.Release|x86.Build.0 = Release|x86 | 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990}.Release|x86.Build.0 = Release|x86 | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Debug|x86.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Debug|x86.Build.0 = Debug|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Release|Any CPU.Build.0 = Release|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Release|x86.ActiveCfg = Release|Any CPU | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D}.Release|x86.Build.0 = Release|Any CPU | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(SolutionProperties) = preSolution | 	GlobalSection(SolutionProperties) = preSolution | ||||||
| 		HideSolutionNode = FALSE | 		HideSolutionNode = FALSE | ||||||
| @@ -153,6 +163,7 @@ Global | |||||||
| 		{D01A7891-AD0B-489B-8C45-F598C875FE26} = {6C7EC99E-7367-4255-A039-EF5E8D75A2F6} | 		{D01A7891-AD0B-489B-8C45-F598C875FE26} = {6C7EC99E-7367-4255-A039-EF5E8D75A2F6} | ||||||
| 		{F31C242C-1B15-4518-9733-48558499FE4B} = {28105E67-9D33-4627-8E26-FCE67700622F} | 		{F31C242C-1B15-4518-9733-48558499FE4B} = {28105E67-9D33-4627-8E26-FCE67700622F} | ||||||
| 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990} = {28105E67-9D33-4627-8E26-FCE67700622F} | 		{58CFC90C-5068-46A2-A8DE-0E92EE9E0990} = {28105E67-9D33-4627-8E26-FCE67700622F} | ||||||
|  | 		{3CD79316-211A-4B57-A6B4-00FA6091C29D} = {28105E67-9D33-4627-8E26-FCE67700622F} | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(ExtensibilityGlobals) = postSolution | 	GlobalSection(ExtensibilityGlobals) = postSolution | ||||||
| 		SolutionGuid = {B5B1FD72-356F-4840-83E8-B070AC21C8D9} | 		SolutionGuid = {B5B1FD72-356F-4840-83E8-B070AC21C8D9} | ||||||
|   | |||||||
| @@ -29,5 +29,6 @@ namespace Project | |||||||
|         public virtual DbSet<UserGroup> UserGroup { get; set; } |         public virtual DbSet<UserGroup> UserGroup { get; set; } | ||||||
|         public virtual DbSet<Users> Users { get; set; } |         public virtual DbSet<Users> Users { get; set; } | ||||||
|         public virtual DbSet<vGroupUser> vGroupUser { get; set; } |         public virtual DbSet<vGroupUser> vGroupUser { get; set; } | ||||||
|  |         public virtual DbSet<EETGW_LoginInfo> EETGW_LoginInfo { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -17,6 +17,18 @@ | |||||||
|           <Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" /> |           <Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" /> | ||||||
|           <Property Name="wdate" Type="smalldatetime" Nullable="false" /> |           <Property Name="wdate" Type="smalldatetime" Nullable="false" /> | ||||||
|         </EntityType> |         </EntityType> | ||||||
|  |         <EntityType Name="EETGW_LoginInfo"> | ||||||
|  |           <Key> | ||||||
|  |             <PropertyRef Name="idx" /> | ||||||
|  |           </Key> | ||||||
|  |           <Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> | ||||||
|  |           <Property Name="uid" Type="varchar" MaxLength="10" Nullable="false" /> | ||||||
|  |           <Property Name="login" Type="datetime" /> | ||||||
|  |           <Property Name="ip" Type="varchar" MaxLength="20" /> | ||||||
|  |           <Property Name="hostname" Type="varchar" MaxLength="50" /> | ||||||
|  |           <Property Name="wuid" Type="varchar" MaxLength="20" /> | ||||||
|  |           <Property Name="wdate" Type="smalldatetime" /> | ||||||
|  |         </EntityType> | ||||||
|         <EntityType Name="UserGroup"> |         <EntityType Name="UserGroup"> | ||||||
|           <Key> |           <Key> | ||||||
|             <PropertyRef Name="dept" /> |             <PropertyRef Name="dept" /> | ||||||
| @@ -80,6 +92,7 @@ | |||||||
|         </EntityType> |         </EntityType> | ||||||
|         <EntityContainer Name="EEModelMainStoreContainer"> |         <EntityContainer Name="EEModelMainStoreContainer"> | ||||||
|           <EntitySet Name="EETGW_GroupUser" EntityType="Self.EETGW_GroupUser" Schema="dbo" store:Type="Tables" /> |           <EntitySet Name="EETGW_GroupUser" EntityType="Self.EETGW_GroupUser" Schema="dbo" store:Type="Tables" /> | ||||||
|  |           <EntitySet Name="EETGW_LoginInfo" EntityType="Self.EETGW_LoginInfo" Schema="dbo" store:Type="Tables" /> | ||||||
|           <EntitySet Name="UserGroup" EntityType="Self.UserGroup" Schema="dbo" store:Type="Tables" /> |           <EntitySet Name="UserGroup" EntityType="Self.UserGroup" Schema="dbo" store:Type="Tables" /> | ||||||
|           <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" /> |           <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" /> | ||||||
|           <EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" store:Type="Views" store:Schema="dbo"> |           <EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" store:Type="Views" store:Schema="dbo"> | ||||||
| @@ -105,8 +118,7 @@ | |||||||
|     FROM [dbo].[vGroupUser] AS [vGroupUser]</DefiningQuery> |     FROM [dbo].[vGroupUser] AS [vGroupUser]</DefiningQuery> | ||||||
|           </EntitySet> |           </EntitySet> | ||||||
|         </EntityContainer> |         </EntityContainer> | ||||||
|       </Schema> |       </Schema></edmx:StorageModels> | ||||||
|     </edmx:StorageModels> |  | ||||||
|     <!-- CSDL content --> |     <!-- CSDL content --> | ||||||
|     <edmx:ConceptualModels> |     <edmx:ConceptualModels> | ||||||
|       <Schema Namespace="EEModelMain" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"> |       <Schema Namespace="EEModelMain" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"> | ||||||
| @@ -186,7 +198,20 @@ | |||||||
|           <EntitySet Name="UserGroup" EntityType="Self.UserGroup" /> |           <EntitySet Name="UserGroup" EntityType="Self.UserGroup" /> | ||||||
|           <EntitySet Name="Users" EntityType="Self.Users" /> |           <EntitySet Name="Users" EntityType="Self.Users" /> | ||||||
|           <EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" /> |           <EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" /> | ||||||
|  |           <EntitySet Name="EETGW_LoginInfo" EntityType="EEModelMain.EETGW_LoginInfo" /> | ||||||
|         </EntityContainer> |         </EntityContainer> | ||||||
|  |         <EntityType Name="EETGW_LoginInfo"> | ||||||
|  |           <Key> | ||||||
|  |             <PropertyRef Name="idx" /> | ||||||
|  |           </Key> | ||||||
|  |           <Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> | ||||||
|  |           <Property Name="uid" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" /> | ||||||
|  |           <Property Name="login" Type="DateTime" Precision="3" /> | ||||||
|  |           <Property Name="ip" Type="String" MaxLength="20" FixedLength="false" Unicode="false" /> | ||||||
|  |           <Property Name="hostname" Type="String" MaxLength="50" FixedLength="false" Unicode="false" /> | ||||||
|  |           <Property Name="wuid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" /> | ||||||
|  |           <Property Name="wdate" Type="DateTime" Precision="0" /> | ||||||
|  |         </EntityType> | ||||||
|       </Schema> |       </Schema> | ||||||
|     </edmx:ConceptualModels> |     </edmx:ConceptualModels> | ||||||
|     <!-- C-S mapping content --> |     <!-- C-S mapping content --> | ||||||
| @@ -268,6 +293,19 @@ | |||||||
|               </MappingFragment> |               </MappingFragment> | ||||||
|             </EntityTypeMapping> |             </EntityTypeMapping> | ||||||
|           </EntitySetMapping> |           </EntitySetMapping> | ||||||
|  |           <EntitySetMapping Name="EETGW_LoginInfo"> | ||||||
|  |             <EntityTypeMapping TypeName="EEModelMain.EETGW_LoginInfo"> | ||||||
|  |               <MappingFragment StoreEntitySet="EETGW_LoginInfo"> | ||||||
|  |                 <ScalarProperty Name="wdate" ColumnName="wdate" /> | ||||||
|  |                 <ScalarProperty Name="wuid" ColumnName="wuid" /> | ||||||
|  |                 <ScalarProperty Name="hostname" ColumnName="hostname" /> | ||||||
|  |                 <ScalarProperty Name="ip" ColumnName="ip" /> | ||||||
|  |                 <ScalarProperty Name="login" ColumnName="login" /> | ||||||
|  |                 <ScalarProperty Name="uid" ColumnName="uid" /> | ||||||
|  |                 <ScalarProperty Name="idx" ColumnName="idx" /> | ||||||
|  |               </MappingFragment> | ||||||
|  |             </EntityTypeMapping> | ||||||
|  |           </EntitySetMapping> | ||||||
|         </EntityContainerMapping> |         </EntityContainerMapping> | ||||||
|       </Mapping> |       </Mapping> | ||||||
|     </edmx:Mappings> |     </edmx:Mappings> | ||||||
|   | |||||||
| @@ -9,6 +9,7 @@ | |||||||
|         <EntityTypeShape EntityType="EEModelMain.UserGroup" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" /> |         <EntityTypeShape EntityType="EEModelMain.UserGroup" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" /> | ||||||
|         <EntityTypeShape EntityType="EEModelMain.Users" Width="1.5" PointX="2.75" PointY="3.75" IsExpanded="true" /> |         <EntityTypeShape EntityType="EEModelMain.Users" Width="1.5" PointX="2.75" PointY="3.75" IsExpanded="true" /> | ||||||
|         <EntityTypeShape EntityType="EEModelMain.vGroupUser" Width="1.5" PointX="4.75" PointY="0.75" IsExpanded="true" /> |         <EntityTypeShape EntityType="EEModelMain.vGroupUser" Width="1.5" PointX="4.75" PointY="0.75" IsExpanded="true" /> | ||||||
|  |         <EntityTypeShape EntityType="EEModelMain.EETGW_LoginInfo" Width="1.5" PointX="5.375" PointY="6.75" /> | ||||||
|       </Diagram> |       </Diagram> | ||||||
|     </edmx:Diagrams> |     </edmx:Diagrams> | ||||||
|   </edmx:Designer> |   </edmx:Designer> | ||||||
|   | |||||||
							
								
								
									
										102
									
								
								Project/Dialog/fChat.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								Project/Dialog/fChat.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,102 @@ | |||||||
|  | namespace Project.Dialog | ||||||
|  | { | ||||||
|  |     partial class fChat | ||||||
|  |     { | ||||||
|  |         /// <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() | ||||||
|  |         { | ||||||
|  |             this.panel4 = new System.Windows.Forms.Panel(); | ||||||
|  |             this.tbMsg = new System.Windows.Forms.TextBox(); | ||||||
|  |             this.btnSend = new System.Windows.Forms.Button(); | ||||||
|  |             this.richTextBox1 = new System.Windows.Forms.RichTextBox(); | ||||||
|  |             this.panel4.SuspendLayout(); | ||||||
|  |             this.SuspendLayout(); | ||||||
|  |             //  | ||||||
|  |             // panel4 | ||||||
|  |             //  | ||||||
|  |             this.panel4.Controls.Add(this.tbMsg); | ||||||
|  |             this.panel4.Controls.Add(this.btnSend); | ||||||
|  |             this.panel4.Dock = System.Windows.Forms.DockStyle.Bottom; | ||||||
|  |             this.panel4.Location = new System.Drawing.Point(0, 500); | ||||||
|  |             this.panel4.Name = "panel4"; | ||||||
|  |             this.panel4.Padding = new System.Windows.Forms.Padding(5); | ||||||
|  |             this.panel4.Size = new System.Drawing.Size(444, 40); | ||||||
|  |             this.panel4.TabIndex = 0; | ||||||
|  |             //  | ||||||
|  |             // tbMsg | ||||||
|  |             //  | ||||||
|  |             this.tbMsg.Dock = System.Windows.Forms.DockStyle.Fill; | ||||||
|  |             this.tbMsg.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); | ||||||
|  |             this.tbMsg.Location = new System.Drawing.Point(5, 5); | ||||||
|  |             this.tbMsg.Name = "tbMsg"; | ||||||
|  |             this.tbMsg.Size = new System.Drawing.Size(335, 29); | ||||||
|  |             this.tbMsg.TabIndex = 0; | ||||||
|  |             //  | ||||||
|  |             // btnSend | ||||||
|  |             //  | ||||||
|  |             this.btnSend.Dock = System.Windows.Forms.DockStyle.Right; | ||||||
|  |             this.btnSend.Location = new System.Drawing.Point(340, 5); | ||||||
|  |             this.btnSend.Name = "btnSend"; | ||||||
|  |             this.btnSend.Size = new System.Drawing.Size(99, 30); | ||||||
|  |             this.btnSend.TabIndex = 1; | ||||||
|  |             this.btnSend.Text = "전송"; | ||||||
|  |             this.btnSend.UseVisualStyleBackColor = true; | ||||||
|  |             //  | ||||||
|  |             // richTextBox1 | ||||||
|  |             //  | ||||||
|  |             this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||||
|  |             this.richTextBox1.Location = new System.Drawing.Point(0, 0); | ||||||
|  |             this.richTextBox1.Name = "richTextBox1"; | ||||||
|  |             this.richTextBox1.ReadOnly = true; | ||||||
|  |             this.richTextBox1.Size = new System.Drawing.Size(444, 500); | ||||||
|  |             this.richTextBox1.TabIndex = 1; | ||||||
|  |             this.richTextBox1.TabStop = false; | ||||||
|  |             this.richTextBox1.Text = ""; | ||||||
|  |             //  | ||||||
|  |             // fChat | ||||||
|  |             //  | ||||||
|  |             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||||
|  |             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||||
|  |             this.ClientSize = new System.Drawing.Size(444, 540); | ||||||
|  |             this.Controls.Add(this.richTextBox1); | ||||||
|  |             this.Controls.Add(this.panel4); | ||||||
|  |             this.Name = "fChat"; | ||||||
|  |             this.Text = "fChat"; | ||||||
|  |             this.Load += new System.EventHandler(this.fChat_Load); | ||||||
|  |             this.panel4.ResumeLayout(false); | ||||||
|  |             this.panel4.PerformLayout(); | ||||||
|  |             this.ResumeLayout(false); | ||||||
|  |  | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         #endregion | ||||||
|  |  | ||||||
|  |         private System.Windows.Forms.Panel panel4; | ||||||
|  |         private System.Windows.Forms.TextBox tbMsg; | ||||||
|  |         private System.Windows.Forms.Button btnSend; | ||||||
|  |         private System.Windows.Forms.RichTextBox richTextBox1; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										91
									
								
								Project/Dialog/fChat.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								Project/Dialog/fChat.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,91 @@ | |||||||
|  | using arTCPService.Shared.Messages; | ||||||
|  | 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 Project.Dialog | ||||||
|  | { | ||||||
|  |     public partial class fChat : Form | ||||||
|  |     { | ||||||
|  |  | ||||||
|  |         arTCPService.Server.Receiver client; | ||||||
|  |         public fChat(arTCPService.Server.Receiver client_) | ||||||
|  |         { | ||||||
|  |             InitializeComponent(); | ||||||
|  |             this.client = client_; | ||||||
|  |             this.client.DataSend += Svr_DataSend; | ||||||
|  |             this.client.DataReceived += Svr_DataReceived; | ||||||
|  |             this.client.ClientDisconnected += Svr_ClientDisconnected; | ||||||
|  |             this.client.Message += Svr_Message; | ||||||
|  |             this.FormClosed += FChat_FormClosed; | ||||||
|  |             this.KeyDown += (s1, e1) => | ||||||
|  |             { | ||||||
|  |                 if (e1.KeyCode == Keys.Escape) this.Close(); | ||||||
|  |             }; | ||||||
|  |  | ||||||
|  |             tbMsg.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) btnSend.PerformClick(); }; | ||||||
|  |             btnSend.Click += (s1, e1) => | ||||||
|  |             { | ||||||
|  |                 this.client.SendMessage(new Packet(Header.Message, tbMsg.Text)); | ||||||
|  |                 tbMsg.SelectAll(); | ||||||
|  |                 tbMsg.Focus(); | ||||||
|  |             }; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void FChat_FormClosed(object sender, FormClosedEventArgs e) | ||||||
|  |         { | ||||||
|  |             this.client.DataSend -= Svr_DataSend; | ||||||
|  |             this.client.DataReceived -= Svr_DataReceived; | ||||||
|  |             this.client.ClientDisconnected -= Svr_ClientDisconnected; | ||||||
|  |             this.client.Message -= Svr_Message; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void Svr_DataSend(arTCPService.Server.Receiver arg1, arTCPService.Shared.Messages.Packet arg2) | ||||||
|  |         { | ||||||
|  |             if (arg2.header == arTCPService.Shared.Messages.Header.Message) | ||||||
|  |                 addLog("발신:" + arg2.Message); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void Svr_Message(arTCPService.Server.Receiver arg1, string arg2, bool arg3) | ||||||
|  |         { | ||||||
|  |             addLog("시스템메세지:" + arg2); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void Svr_ClientDisconnected(arTCPService.Server.Receiver obj) | ||||||
|  |         { | ||||||
|  |             addLog("연결종료"); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void Svr_DataReceived(arTCPService.Server.Receiver arg1, arTCPService.Shared.Messages.Packet arg2) | ||||||
|  |         { | ||||||
|  |             if (arg2.header == arTCPService.Shared.Messages.Header.Message) | ||||||
|  |             { | ||||||
|  |                 addLog("수신:" + arg2.Message); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void fChat_Load(object sender, EventArgs e) | ||||||
|  |         { | ||||||
|  |             addLog("채팅이 시작되었습니다 :" + this.client.ID); | ||||||
|  |         } | ||||||
|  |         private void InvokeUI(Action action) | ||||||
|  |         { | ||||||
|  |             this.Invoke(action); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         void addLog(string m) | ||||||
|  |         { | ||||||
|  |             richTextBox1.Invoke(new Action(() => | ||||||
|  |             { | ||||||
|  |                 this.richTextBox1.AppendText(m + "\r\n"); | ||||||
|  |                 this.richTextBox1.ScrollToCaret(); | ||||||
|  |             })); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										120
									
								
								Project/Dialog/fChat.resx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								Project/Dialog/fChat.resx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,120 @@ | |||||||
|  | <?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> | ||||||
|  | </root> | ||||||
| @@ -4,6 +4,8 @@ using System.ComponentModel; | |||||||
| using System.Data; | using System.Data; | ||||||
| using System.Drawing; | using System.Drawing; | ||||||
| using System.Linq; | using System.Linq; | ||||||
|  | using System.Net; | ||||||
|  | using System.Net.NetworkInformation; | ||||||
| using System.Text; | using System.Text; | ||||||
| using System.Windows.Forms; | using System.Windows.Forms; | ||||||
|  |  | ||||||
| @@ -17,7 +19,8 @@ namespace Project.Dialog | |||||||
|             this.tbID.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) tbPW.Focus(); }; |             this.tbID.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) tbPW.Focus(); }; | ||||||
|             this.tbPW.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) btLogin.PerformClick(); }; |             this.tbPW.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) btLogin.PerformClick(); }; | ||||||
|             this.KeyPreview = true; |             this.KeyPreview = true; | ||||||
|             this.KeyDown += (s1, e1) => { |             this.KeyDown += (s1, e1) => | ||||||
|  |             { | ||||||
|                 if (e1.KeyCode == Keys.Escape) this.Close(); |                 if (e1.KeyCode == Keys.Escape) this.Close(); | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| @@ -37,7 +40,7 @@ namespace Project.Dialog | |||||||
|  |  | ||||||
|             //마지막으로사용한 부서이름 |             //마지막으로사용한 부서이름 | ||||||
|             if (Pub.setting.lastdpt.isEmpty()) this.cmbDept.SelectedIndex = -1; |             if (Pub.setting.lastdpt.isEmpty()) this.cmbDept.SelectedIndex = -1; | ||||||
|             else this.cmbDept.Text =Pub.setting.lastdpt; |             else this.cmbDept.Text = Pub.setting.lastdpt; | ||||||
|             //foreach (var item in dlist) |             //foreach (var item in dlist) | ||||||
|             //    if (item != "") this.cmbDept.Items.Add(item); |             //    if (item != "") this.cmbDept.Items.Add(item); | ||||||
|             //if (cmbDept.Items.Count > 0) cmbDept.SelectedIndex = 0; |             //if (cmbDept.Items.Count > 0) cmbDept.SelectedIndex = 0; | ||||||
| @@ -56,12 +59,12 @@ namespace Project.Dialog | |||||||
|                 tbID.Focus(); |                 tbID.Focus(); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             if(this.tbPW.Text.isEmpty()) |             if (this.tbPW.Text.isEmpty()) | ||||||
|             { |             { | ||||||
|                 tbPW.Focus(); |                 tbPW.Focus(); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             if(cmbDept.SelectedIndex < 0) |             if (cmbDept.SelectedIndex < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.Util.MsgE("소속 부서를 선택하세요"); |                 FCOMMON.Util.MsgE("소속 부서를 선택하세요"); | ||||||
|                 cmbDept.Focus(); |                 cmbDept.Focus(); | ||||||
| @@ -101,7 +104,7 @@ namespace Project.Dialog | |||||||
|                 if (users.Rows.Count != 1) |                 if (users.Rows.Count != 1) | ||||||
|                 { |                 { | ||||||
|                     users = ta.GetByNamePw(tbID.Text.Trim(), encpass); |                     users = ta.GetByNamePw(tbID.Text.Trim(), encpass); | ||||||
|                     if(users.Rows.Count != 1) |                     if (users.Rows.Count != 1) | ||||||
|                     { |                     { | ||||||
|                         Util.MsgE("입력한 사용자 계정이 존재하지 않습니다"); |                         Util.MsgE("입력한 사용자 계정이 존재하지 않습니다"); | ||||||
|                         tbPW.SelectAll(); |                         tbPW.SelectAll(); | ||||||
| @@ -114,7 +117,7 @@ namespace Project.Dialog | |||||||
|                 var userdr = users.Rows[0] as dsMSSQL.UsersRow; |                 var userdr = users.Rows[0] as dsMSSQL.UsersRow; | ||||||
|                 var taGrpUser = new dsMSSQLTableAdapters.EETGW_GroupUserTableAdapter(); |                 var taGrpUser = new dsMSSQLTableAdapters.EETGW_GroupUserTableAdapter(); | ||||||
|                 var Exist = taGrpUser.ExistCheck(gCode, userdr.id) > 0; |                 var Exist = taGrpUser.ExistCheck(gCode, userdr.id) > 0; | ||||||
|                 if (userdr.level < 9 && Exist==false) |                 if (userdr.level < 9 && Exist == false) | ||||||
|                 { |                 { | ||||||
|                     Util.MsgE("입력한 사용자는 지정한 부서에 접속할 권한이 없습니다"); |                     Util.MsgE("입력한 사용자는 지정한 부서에 접속할 권한이 없습니다"); | ||||||
|                     return; |                     return; | ||||||
| @@ -136,15 +139,62 @@ namespace Project.Dialog | |||||||
|                 FCOMMON.info.Login.permission = 0; |                 FCOMMON.info.Login.permission = 0; | ||||||
|                 FCOMMON.info.Login.gpermission = int.Parse(gperm); |                 FCOMMON.info.Login.gpermission = int.Parse(gperm); | ||||||
|  |  | ||||||
|  |                 //로그인정보 기록 | ||||||
|  |                 AddLoginInfo(); | ||||||
|  |  | ||||||
|  |  | ||||||
|                 DialogResult = DialogResult.OK; |                 DialogResult = DialogResult.OK; | ||||||
|             }catch (Exception ex) |             } | ||||||
|  |             catch (Exception ex) | ||||||
|             { |             { | ||||||
|                 Util.MsgE("데이터베이스 조회 실패 다음 오류 메세지를 참고하세요.\n\n"+ ex.Message + "\n\n증상이 동일 할 경우 서버가 접속가능한지 먼저 확인하세요"); |                 Util.MsgE("데이터베이스 조회 실패 다음 오류 메세지를 참고하세요.\n\n" + ex.Message + "\n\n증상이 동일 할 경우 서버가 접속가능한지 먼저 확인하세요"); | ||||||
|                 DialogResult = System.Windows.Forms.DialogResult.Cancel; |                 DialogResult = System.Windows.Forms.DialogResult.Cancel; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         void AddLoginInfo() | ||||||
|  |         { | ||||||
|  |             string ip = string.Empty; | ||||||
|  |             string hostname = Dns.GetHostName(); | ||||||
|  |             string fullname = System.Net.Dns.GetHostEntry("").HostName; | ||||||
|  |  | ||||||
|  |             var nif = NetworkInterface.GetAllNetworkInterfaces(); | ||||||
|  |             var host = Dns.GetHostEntry(hostname); | ||||||
|  |             foreach (IPAddress r in host.AddressList) | ||||||
|  |             { | ||||||
|  |                 string str = r.ToString(); | ||||||
|  |  | ||||||
|  |                 if (str != "" && str.Substring(0, 3) == "10.") | ||||||
|  |                 { | ||||||
|  |                     ip = str; | ||||||
|  |                     break; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |             if (ip == "" || hostname == "") return; | ||||||
|  |  | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 var db = new EEEntitiesMain(); | ||||||
|  |                 db.EETGW_LoginInfo.Add(new EETGW_LoginInfo | ||||||
|  |                 { | ||||||
|  |                     uid = FCOMMON.info.Login.no, | ||||||
|  |                     hostname = fullname, | ||||||
|  |                     ip = ip, | ||||||
|  |                     login = DateTime.Now, | ||||||
|  |                     wuid = FCOMMON.info.Login.no, | ||||||
|  |                     wdate = DateTime.Now | ||||||
|  |                 }); | ||||||
|  |                 db.SaveChanges(); | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 FCOMMON.Util.MsgE(ex.Message); | ||||||
|  |                 Console.WriteLine(ex.Message); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         private void label3_Click(object sender, EventArgs e) |         private void label3_Click(object sender, EventArgs e) | ||||||
|         { |         { | ||||||
|  |  | ||||||
|   | |||||||
| @@ -188,6 +188,12 @@ | |||||||
|       <DependentUpon>DataSet1.xsd</DependentUpon> |       <DependentUpon>DataSet1.xsd</DependentUpon> | ||||||
|     </Compile> |     </Compile> | ||||||
|     <Compile Include="Device\Barcode.cs" /> |     <Compile Include="Device\Barcode.cs" /> | ||||||
|  |     <Compile Include="Dialog\fChat.cs"> | ||||||
|  |       <SubType>Form</SubType> | ||||||
|  |     </Compile> | ||||||
|  |     <Compile Include="Dialog\fChat.Designer.cs"> | ||||||
|  |       <DependentUpon>fChat.cs</DependentUpon> | ||||||
|  |     </Compile> | ||||||
|     <Compile Include="Dialog\fDebug.cs"> |     <Compile Include="Dialog\fDebug.cs"> | ||||||
|       <SubType>Form</SubType> |       <SubType>Form</SubType> | ||||||
|     </Compile> |     </Compile> | ||||||
| @@ -236,6 +242,9 @@ | |||||||
|     <Compile Include="Dialog\PMPUpdate.Designer.cs"> |     <Compile Include="Dialog\PMPUpdate.Designer.cs"> | ||||||
|       <DependentUpon>PMPUpdate.cs</DependentUpon> |       <DependentUpon>PMPUpdate.cs</DependentUpon> | ||||||
|     </Compile> |     </Compile> | ||||||
|  |     <Compile Include="dsMSSQL.cs"> | ||||||
|  |       <DependentUpon>dsMSSQL.xsd</DependentUpon> | ||||||
|  |     </Compile> | ||||||
|     <Compile Include="dsMSSQL.Designer.cs"> |     <Compile Include="dsMSSQL.Designer.cs"> | ||||||
|       <AutoGen>True</AutoGen> |       <AutoGen>True</AutoGen> | ||||||
|       <DesignTime>True</DesignTime> |       <DesignTime>True</DesignTime> | ||||||
| @@ -249,6 +258,9 @@ | |||||||
|     <Compile Include="EETGW_GroupUser.cs"> |     <Compile Include="EETGW_GroupUser.cs"> | ||||||
|       <DependentUpon>AdoNetEFMain.tt</DependentUpon> |       <DependentUpon>AdoNetEFMain.tt</DependentUpon> | ||||||
|     </Compile> |     </Compile> | ||||||
|  |     <Compile Include="EETGW_LoginInfo.cs"> | ||||||
|  |       <DependentUpon>AdoNetEFMain.tt</DependentUpon> | ||||||
|  |     </Compile> | ||||||
|     <Compile Include="fLog.cs"> |     <Compile Include="fLog.cs"> | ||||||
|       <SubType>Form</SubType> |       <SubType>Form</SubType> | ||||||
|     </Compile> |     </Compile> | ||||||
| @@ -341,6 +353,9 @@ | |||||||
|       <SubType>Form</SubType> |       <SubType>Form</SubType> | ||||||
|     </Compile> |     </Compile> | ||||||
|     <Compile Include="Util.cs" /> |     <Compile Include="Util.cs" /> | ||||||
|  |     <EmbeddedResource Include="Dialog\fChat.resx"> | ||||||
|  |       <DependentUpon>fChat.cs</DependentUpon> | ||||||
|  |     </EmbeddedResource> | ||||||
|     <EmbeddedResource Include="Dialog\fDebug.resx"> |     <EmbeddedResource Include="Dialog\fDebug.resx"> | ||||||
|       <DependentUpon>fDebug.cs</DependentUpon> |       <DependentUpon>fDebug.cs</DependentUpon> | ||||||
|     </EmbeddedResource> |     </EmbeddedResource> | ||||||
| @@ -547,6 +562,10 @@ | |||||||
|       <Project>{b832738c-74dd-4ce2-8a29-98d0bcbb9ea4}</Project> |       <Project>{b832738c-74dd-4ce2-8a29-98d0bcbb9ea4}</Project> | ||||||
|       <Name>StaffLayoutCtl</Name> |       <Name>StaffLayoutCtl</Name> | ||||||
|     </ProjectReference> |     </ProjectReference> | ||||||
|  |     <ProjectReference Include="..\Sub\tcpservice\arTCPService.Shared\arTCPService.Shared.csproj"> | ||||||
|  |       <Project>{3cd79316-211a-4b57-a6b4-00fa6091c29d}</Project> | ||||||
|  |       <Name>arTCPService.Shared</Name> | ||||||
|  |     </ProjectReference> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" /> |     <Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" /> | ||||||
|   | |||||||
							
								
								
									
										25
									
								
								Project/EETGW_LoginInfo.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Project/EETGW_LoginInfo.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | //------------------------------------------------------------------------------ | ||||||
|  | // <auto-generated> | ||||||
|  | //     이 코드는 템플릿에서 생성되었습니다. | ||||||
|  | // | ||||||
|  | //     이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. | ||||||
|  | //     이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. | ||||||
|  | // </auto-generated> | ||||||
|  | //------------------------------------------------------------------------------ | ||||||
|  |  | ||||||
|  | namespace Project | ||||||
|  | { | ||||||
|  |     using System; | ||||||
|  |     using System.Collections.Generic; | ||||||
|  |      | ||||||
|  |     public partial class EETGW_LoginInfo | ||||||
|  |     { | ||||||
|  |         public int idx { get; set; } | ||||||
|  |         public string uid { get; set; } | ||||||
|  |         public Nullable<System.DateTime> login { get; set; } | ||||||
|  |         public string ip { get; set; } | ||||||
|  |         public string hostname { get; set; } | ||||||
|  |         public string wuid { get; set; } | ||||||
|  |         public Nullable<System.DateTime> wdate { get; set; } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | |||||||
| // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 | // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 | ||||||
| // 지정되도록 할 수 있습니다. | // 지정되도록 할 수 있습니다. | ||||||
| // [assembly: AssemblyVersion("1.0.*")] | // [assembly: AssemblyVersion("1.0.*")] | ||||||
| [assembly: AssemblyVersion("20.10.29.1100")] | [assembly: AssemblyVersion("20.11.12.1100")] | ||||||
| [assembly: AssemblyFileVersion("20.10.29.1100")] | [assembly: AssemblyFileVersion("20.11.12.1100")] | ||||||
|   | |||||||
| @@ -108,7 +108,7 @@ namespace Project | |||||||
|            } |            } | ||||||
|  |  | ||||||
|        } |        } | ||||||
|         public static void CheckNRegister2(string prgmName, string develop, string prgmVersion) |         public static void CheckNRegister3(string prgmName, string develop, string prgmVersion) | ||||||
|         { |         { | ||||||
|             if (prgmName.Length > 50) prgmName = prgmName.Substring(0, 50); //길이제한 |             if (prgmName.Length > 50) prgmName = prgmName.Substring(0, 50); //길이제한 | ||||||
|             var task = Task.Factory.StartNew(() => |             var task = Task.Factory.StartNew(() => | ||||||
| @@ -121,6 +121,7 @@ namespace Project | |||||||
|  |  | ||||||
|                     var nif = NetworkInterface.GetAllNetworkInterfaces(); |                     var nif = NetworkInterface.GetAllNetworkInterfaces(); | ||||||
|                     var host = Dns.GetHostEntry(Dns.GetHostName()); |                     var host = Dns.GetHostEntry(Dns.GetHostName()); | ||||||
|  |                     string fullname = System.Net.Dns.GetHostEntry("").HostName; | ||||||
|                     foreach (IPAddress r in host.AddressList) |                     foreach (IPAddress r in host.AddressList) | ||||||
|                     { |                     { | ||||||
|                         string str = r.ToString(); |                         string str = r.ToString(); | ||||||
| @@ -153,7 +154,7 @@ namespace Project | |||||||
|  |  | ||||||
|                     SqlConnection conn = new SqlConnection("Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"); |                     SqlConnection conn = new SqlConnection("Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"); | ||||||
|                     conn.Open(); |                     conn.Open(); | ||||||
|                     string ProcName = "AddPrgmUser2"; |                     string ProcName = "AddPrgmUser3"; | ||||||
|                     SqlCommand cmd = new SqlCommand(ProcName, conn); |                     SqlCommand cmd = new SqlCommand(ProcName, conn); | ||||||
|                     cmd.CommandType = CommandType.StoredProcedure; |                     cmd.CommandType = CommandType.StoredProcedure; | ||||||
|  |  | ||||||
| @@ -178,8 +179,8 @@ namespace Project | |||||||
|                     param = cmd.Parameters.Add("@account", SqlDbType.NVarChar, 50); |                     param = cmd.Parameters.Add("@account", SqlDbType.NVarChar, 50); | ||||||
|                     param.Value = System.Environment.UserName; |                     param.Value = System.Environment.UserName; | ||||||
|  |  | ||||||
|  |                     param = cmd.Parameters.Add("@hostname", SqlDbType.NVarChar, 100); | ||||||
|  |                     param.Value = fullname; | ||||||
|  |  | ||||||
|                     cmd.ExecuteNonQuery(); |                     cmd.ExecuteNonQuery(); | ||||||
|                     conn.Close(); |                     conn.Close(); | ||||||
|   | |||||||
| @@ -23,6 +23,13 @@ namespace Project | |||||||
|             } |             } | ||||||
|             else sbBWRun.BackColor = Color.Red; |             else sbBWRun.BackColor = Color.Red; | ||||||
|              sbBCD.BackColor = Pub.barcode.IsInit ? Color.Lime : Color.Red; |              sbBCD.BackColor = Pub.barcode.IsInit ? Color.Lime : Color.Red; | ||||||
|  |  | ||||||
|  |             if (server != null) | ||||||
|  |             { | ||||||
|  |                 if (server.IsStarted) lbSvr.ForeColor = Color.Lime; | ||||||
|  |                 else lbSvr.ForeColor = Color.Magenta; | ||||||
|  |             } | ||||||
|  |             else lbSvr.ForeColor = Color.Red; | ||||||
|              //if (redisConnection == null) this.sbRedis.ForeColor = Color.DimGray; |              //if (redisConnection == null) this.sbRedis.ForeColor = Color.DimGray; | ||||||
|              //else if (redisConnection.IsConnected) |              //else if (redisConnection.IsConnected) | ||||||
|              //{ |              //{ | ||||||
|   | |||||||
| @@ -1 +1,8 @@ | |||||||
|  | namespace Project | ||||||
|  | { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     partial class dsMSSQL | ||||||
|  |     { | ||||||
|  |     } | ||||||
|  | } | ||||||
|   | |||||||
							
								
								
									
										23
									
								
								Project/fMain.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										23
									
								
								Project/fMain.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -107,6 +107,7 @@ | |||||||
|             this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); |             this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); | ||||||
|             this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); |             this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); | ||||||
|             this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); |             this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); | ||||||
|  |             this.lbSvr = new System.Windows.Forms.ToolStripStatusLabel(); | ||||||
|             this.cmTab.SuspendLayout(); |             this.cmTab.SuspendLayout(); | ||||||
|             this.statusStrip1.SuspendLayout(); |             this.statusStrip1.SuspendLayout(); | ||||||
|             this.menuStrip1.SuspendLayout(); |             this.menuStrip1.SuspendLayout(); | ||||||
| @@ -153,6 +154,7 @@ | |||||||
|             //  |             //  | ||||||
|             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { |             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | ||||||
|             this.sbBWRun, |             this.sbBWRun, | ||||||
|  |             this.lbSvr, | ||||||
|             this.sbBCD, |             this.sbBCD, | ||||||
|             this.sbLogin}); |             this.sbLogin}); | ||||||
|             this.statusStrip1.Location = new System.Drawing.Point(1, 622); |             this.statusStrip1.Location = new System.Drawing.Point(1, 622); | ||||||
| @@ -372,33 +374,33 @@ | |||||||
|             // dataFOLToolStripMenuItem |             // dataFOLToolStripMenuItem | ||||||
|             //  |             //  | ||||||
|             this.dataFOLToolStripMenuItem.Name = "dataFOLToolStripMenuItem"; |             this.dataFOLToolStripMenuItem.Name = "dataFOLToolStripMenuItem"; | ||||||
|             this.dataFOLToolStripMenuItem.Size = new System.Drawing.Size(180, 24); |             this.dataFOLToolStripMenuItem.Size = new System.Drawing.Size(162, 24); | ||||||
|             this.dataFOLToolStripMenuItem.Text = "FOL"; |             this.dataFOLToolStripMenuItem.Text = "FOL"; | ||||||
|             this.dataFOLToolStripMenuItem.Click += new System.EventHandler(this.dataFOLToolStripMenuItem_Click); |             this.dataFOLToolStripMenuItem.Click += new System.EventHandler(this.dataFOLToolStripMenuItem_Click); | ||||||
|             //  |             //  | ||||||
|             // dataMoldEOLToolStripMenuItem |             // dataMoldEOLToolStripMenuItem | ||||||
|             //  |             //  | ||||||
|             this.dataMoldEOLToolStripMenuItem.Name = "dataMoldEOLToolStripMenuItem"; |             this.dataMoldEOLToolStripMenuItem.Name = "dataMoldEOLToolStripMenuItem"; | ||||||
|             this.dataMoldEOLToolStripMenuItem.Size = new System.Drawing.Size(180, 24); |             this.dataMoldEOLToolStripMenuItem.Size = new System.Drawing.Size(162, 24); | ||||||
|             this.dataMoldEOLToolStripMenuItem.Text = "MOLD & EOL"; |             this.dataMoldEOLToolStripMenuItem.Text = "MOLD & EOL"; | ||||||
|             this.dataMoldEOLToolStripMenuItem.Click += new System.EventHandler(this.dataMoldEOLToolStripMenuItem_Click); |             this.dataMoldEOLToolStripMenuItem.Click += new System.EventHandler(this.dataMoldEOLToolStripMenuItem_Click); | ||||||
|             //  |             //  | ||||||
|             // dataToolStripMenuItem |             // dataToolStripMenuItem | ||||||
|             //  |             //  | ||||||
|             this.dataToolStripMenuItem.Name = "dataToolStripMenuItem"; |             this.dataToolStripMenuItem.Name = "dataToolStripMenuItem"; | ||||||
|             this.dataToolStripMenuItem.Size = new System.Drawing.Size(180, 24); |             this.dataToolStripMenuItem.Size = new System.Drawing.Size(162, 24); | ||||||
|             this.dataToolStripMenuItem.Text = "BUMP"; |             this.dataToolStripMenuItem.Text = "BUMP"; | ||||||
|             this.dataToolStripMenuItem.Click += new System.EventHandler(this.dataToolStripMenuItem_Click); |             this.dataToolStripMenuItem.Click += new System.EventHandler(this.dataToolStripMenuItem_Click); | ||||||
|             //  |             //  | ||||||
|             // toolStripMenuItem2 |             // toolStripMenuItem2 | ||||||
|             //  |             //  | ||||||
|             this.toolStripMenuItem2.Name = "toolStripMenuItem2"; |             this.toolStripMenuItem2.Name = "toolStripMenuItem2"; | ||||||
|             this.toolStripMenuItem2.Size = new System.Drawing.Size(177, 6); |             this.toolStripMenuItem2.Size = new System.Drawing.Size(159, 6); | ||||||
|             //  |             //  | ||||||
|             // 라인코드관리ToolStripMenuItem |             // 라인코드관리ToolStripMenuItem | ||||||
|             //  |             //  | ||||||
|             this.라인코드관리ToolStripMenuItem.Name = "라인코드관리ToolStripMenuItem"; |             this.라인코드관리ToolStripMenuItem.Name = "라인코드관리ToolStripMenuItem"; | ||||||
|             this.라인코드관리ToolStripMenuItem.Size = new System.Drawing.Size(180, 24); |             this.라인코드관리ToolStripMenuItem.Size = new System.Drawing.Size(162, 24); | ||||||
|             this.라인코드관리ToolStripMenuItem.Text = "라인코드관리"; |             this.라인코드관리ToolStripMenuItem.Text = "라인코드관리"; | ||||||
|             this.라인코드관리ToolStripMenuItem.Click += new System.EventHandler(this.라인코드관리ToolStripMenuItem_Click); |             this.라인코드관리ToolStripMenuItem.Click += new System.EventHandler(this.라인코드관리ToolStripMenuItem_Click); | ||||||
|             //  |             //  | ||||||
| @@ -417,14 +419,14 @@ | |||||||
|             // 근태입력ToolStripMenuItem |             // 근태입력ToolStripMenuItem | ||||||
|             //  |             //  | ||||||
|             this.근태입력ToolStripMenuItem.Name = "근태입력ToolStripMenuItem"; |             this.근태입력ToolStripMenuItem.Name = "근태입력ToolStripMenuItem"; | ||||||
|             this.근태입력ToolStripMenuItem.Size = new System.Drawing.Size(180, 24); |             this.근태입력ToolStripMenuItem.Size = new System.Drawing.Size(148, 24); | ||||||
|             this.근태입력ToolStripMenuItem.Text = "근태입력"; |             this.근태입력ToolStripMenuItem.Text = "근태입력"; | ||||||
|             this.근태입력ToolStripMenuItem.Click += new System.EventHandler(this.근태입력ToolStripMenuItem_Click); |             this.근태입력ToolStripMenuItem.Click += new System.EventHandler(this.근태입력ToolStripMenuItem_Click); | ||||||
|             //  |             //  | ||||||
|             // 근로명부ToolStripMenuItem |             // 근로명부ToolStripMenuItem | ||||||
|             //  |             //  | ||||||
|             this.근로명부ToolStripMenuItem.Name = "근로명부ToolStripMenuItem"; |             this.근로명부ToolStripMenuItem.Name = "근로명부ToolStripMenuItem"; | ||||||
|             this.근로명부ToolStripMenuItem.Size = new System.Drawing.Size(180, 24); |             this.근로명부ToolStripMenuItem.Size = new System.Drawing.Size(148, 24); | ||||||
|             this.근로명부ToolStripMenuItem.Text = "근로자명부"; |             this.근로명부ToolStripMenuItem.Text = "근로자명부"; | ||||||
|             this.근로명부ToolStripMenuItem.Click += new System.EventHandler(this.근로명부ToolStripMenuItem_Click); |             this.근로명부ToolStripMenuItem.Click += new System.EventHandler(this.근로명부ToolStripMenuItem_Click); | ||||||
|             //  |             //  | ||||||
| @@ -766,6 +768,12 @@ | |||||||
|             this.toolStripButton4.ToolTipText = "PMP 자료 보기(베타)"; |             this.toolStripButton4.ToolTipText = "PMP 자료 보기(베타)"; | ||||||
|             this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click_1); |             this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click_1); | ||||||
|             //  |             //  | ||||||
|  |             // lbSvr | ||||||
|  |             //  | ||||||
|  |             this.lbSvr.Name = "lbSvr"; | ||||||
|  |             this.lbSvr.Size = new System.Drawing.Size(19, 17); | ||||||
|  |             this.lbSvr.Text = "●"; | ||||||
|  |             //  | ||||||
|             // fMain |             // fMain | ||||||
|             //  |             //  | ||||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; |             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; | ||||||
| @@ -875,6 +883,7 @@ | |||||||
|         private System.Windows.Forms.ToolStripMenuItem 휴가관리ToolStripMenuItem; |         private System.Windows.Forms.ToolStripMenuItem 휴가관리ToolStripMenuItem; | ||||||
|         private System.Windows.Forms.ToolStripMenuItem 근태입력ToolStripMenuItem; |         private System.Windows.Forms.ToolStripMenuItem 근태입력ToolStripMenuItem; | ||||||
|         private System.Windows.Forms.ToolStripMenuItem 근로명부ToolStripMenuItem; |         private System.Windows.Forms.ToolStripMenuItem 근로명부ToolStripMenuItem; | ||||||
|  |         private System.Windows.Forms.ToolStripStatusLabel lbSvr; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| using System; | using arTCPService.Server; | ||||||
|  | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
| using System.ComponentModel; | using System.ComponentModel; | ||||||
| using System.Data; | using System.Data; | ||||||
| @@ -13,9 +14,12 @@ namespace Project | |||||||
|     public partial class fMain : Form |     public partial class fMain : Form | ||||||
|     { |     { | ||||||
|         string SearchKey = string.Empty; |         string SearchKey = string.Empty; | ||||||
|  |         arTCPService.Server.Server server; | ||||||
|  |  | ||||||
|         public fMain() |         public fMain() | ||||||
|         { |         { | ||||||
|             InitializeComponent(); |             InitializeComponent(); | ||||||
|  |             server = new Server(); | ||||||
|             this.KeyDown += (s1, e1) => |             this.KeyDown += (s1, e1) => | ||||||
|             { |             { | ||||||
|                 if (e1.KeyCode == Keys.F12) btSetting.PerformClick(); |                 if (e1.KeyCode == Keys.F12) btSetting.PerformClick(); | ||||||
| @@ -36,6 +40,35 @@ namespace Project | |||||||
|  |  | ||||||
|             this.MouseMove += (s1, e1) => { if (DateTime.Now > Pub.LastInputTime) Pub.LastInputTime = DateTime.Now; }; |             this.MouseMove += (s1, e1) => { if (DateTime.Now > Pub.LastInputTime) Pub.LastInputTime = DateTime.Now; }; | ||||||
|             this.FormClosing += __Closing; |             this.FormClosing += __Closing; | ||||||
|  |             this.FormClosed += FMain_FormClosed; | ||||||
|  |             this.server.ClientConnected += Server_ClientConnected; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void Server_ClientConnected(Receiver receiver) | ||||||
|  |         { | ||||||
|  |             this.BeginInvoke(new Action(()=> { | ||||||
|  |                 var f = new Dialog.fChat(receiver); | ||||||
|  |                 f.Show(); | ||||||
|  |                 f.Activate(); | ||||||
|  |             })); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void FMain_FormClosed(object sender, FormClosedEventArgs e) | ||||||
|  |         { | ||||||
|  |             if (server != null) | ||||||
|  |                 server.CloseChild(); | ||||||
|  |             //연결종료 | ||||||
|  |             //try | ||||||
|  |             //{ | ||||||
|  |             //    var db = new EEEntitiesMain(); | ||||||
|  |             //    var dr = db.EETGW_LoginInfo.Where(t => t.uid == FCOMMON.info.Login.no).FirstOrDefault(); | ||||||
|  |             //    if (dr != null) | ||||||
|  |             //    { | ||||||
|  |             //        db.EETGW_LoginInfo.Remove(dr); | ||||||
|  |             //        db.SaveChanges(); | ||||||
|  |             //    } | ||||||
|  |             //} | ||||||
|  |             //catch { } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         private void __Closing(object sender, FormClosingEventArgs e) |         private void __Closing(object sender, FormClosingEventArgs e) | ||||||
| @@ -91,10 +124,19 @@ namespace Project | |||||||
|             Update_Site(); |             Update_Site(); | ||||||
|             bw.RunWorkerAsync(); //background worker |             bw.RunWorkerAsync(); //background worker | ||||||
|  |  | ||||||
|          |  | ||||||
|  |  | ||||||
|             //사용기록추적 |             //사용기록추적 | ||||||
|             Pub.CheckNRegister2(Application.ProductName, "chi", Application.ProductVersion); |             Pub.CheckNRegister3(Application.ProductName, "chi", Application.ProductVersion); | ||||||
|  |  | ||||||
|  |             //서버ON | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 this.server.Start(7979);//기본 79포트로 설정한다 | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 Console.WriteLine(ex.Message); | ||||||
|  |             } | ||||||
|  |  | ||||||
|         } |         } | ||||||
|         void Update_Site() |         void Update_Site() | ||||||
|         { |         { | ||||||
| @@ -180,7 +222,7 @@ namespace Project | |||||||
|             { |             { | ||||||
|                 Menu_InventoryList(); |                 Menu_InventoryList(); | ||||||
|             } |             } | ||||||
|             else if(Pub.setting.startForm == eFormList.근태입력) |             else if (Pub.setting.startForm == eFormList.근태입력) | ||||||
|             { |             { | ||||||
|                 Menu_WorkTable(); |                 Menu_WorkTable(); | ||||||
|             } |             } | ||||||
| @@ -852,16 +894,16 @@ namespace Project | |||||||
|                         var supplyname = cmdupdate.ExecuteScalar().ToString().Trim(); |                         var supplyname = cmdupdate.ExecuteScalar().ToString().Trim(); | ||||||
|                         if (supplyname != "") |                         if (supplyname != "") | ||||||
|                         { |                         { | ||||||
|                             cmdupdate.CommandText = "update Purchase set supply=@supply where pdate = '2019-08-01' and orderno = '210000657' and sid='" +  sid + "'" ; |                             cmdupdate.CommandText = "update Purchase set supply=@supply where pdate = '2019-08-01' and orderno = '210000657' and sid='" + sid + "'"; | ||||||
|                             cmdupdate.Parameters["supply"].Value = supplyname; |                             cmdupdate.Parameters["supply"].Value = supplyname; | ||||||
|                             if (cmdupdate.ExecuteNonQuery() > 0) sidOK = true; |                             if (cmdupdate.ExecuteNonQuery() > 0) sidOK = true; | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 if(sidOK == false && itemname != "") |                 if (sidOK == false && itemname != "") | ||||||
|                 { |                 { | ||||||
|                     if(itemname == "FIBER SENSOR(반사형)") |                     if (itemname == "FIBER SENSOR(반사형)") | ||||||
|                     { |                     { | ||||||
|  |  | ||||||
|                     } |                     } | ||||||
| @@ -873,7 +915,7 @@ namespace Project | |||||||
|                         var supplyname = data.ToString().Trim(); |                         var supplyname = data.ToString().Trim(); | ||||||
|                         if (supplyname != "") |                         if (supplyname != "") | ||||||
|                         { |                         { | ||||||
|                             cmdupdate.CommandText = "update Purchase set supply=@supply where pdate = '2019-08-01' and orderno = '210000657' and pumname='" + itemname + "' and isnull(pumscale,'') = '"+ itemmodel +"'"; |                             cmdupdate.CommandText = "update Purchase set supply=@supply where pdate = '2019-08-01' and orderno = '210000657' and pumname='" + itemname + "' and isnull(pumscale,'') = '" + itemmodel + "'"; | ||||||
|                             cmdupdate.Parameters["supply"].Value = supplyname; |                             cmdupdate.Parameters["supply"].Value = supplyname; | ||||||
|                             var cnt1 = cmdupdate.ExecuteNonQuery(); |                             var cnt1 = cmdupdate.ExecuteNonQuery(); | ||||||
|                         } |                         } | ||||||
|   | |||||||
| @@ -366,16 +366,16 @@ | |||||||
|     <value> |     <value> | ||||||
|         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 | ||||||
|         YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJFSURBVDhPjVPtS1NxGP1B3r+gj/0PfUhXQgQJYWUqRFFC |         YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJFSURBVDhPjVPtS1NxGP1B3r+gj/0PfUhXQgQJYWUqRFFC | ||||||
|         QwoXhVCNrK1o6oJoA+mDkJrIvjRlkJQUgTUGEkKvRhFrRvu2INjUEdu8u3e9nJ7zu1eWqNADD/fDvec5 |         QwoXhVCNrK1o6oJoA+mDkJrIvjRlkJQUgTUGEkJvFkWsGe3bgmBTR2zz7t71cnrO715ZokIPPNwP957n | ||||||
|         z3POuep/K2so31dDzcuzIG0vGOq39B/39dYlH49lDJUnIN9zAkvB81geuIiVsB/yDu5nG0vYvIsNKpdr |         PM8556r/rayhfF8NNS/PgrS9YKjf0n/c11uXfDyWMVSegHzPCSwFz2N54CJWwn7IO7ifbSxh8y42qFyu | ||||||
|         3omlwDkUb/lRGgmgFNqH1Ugzfs72oxrcYkB2m4qlDWXmz3ahGOnDj+utMKMe2CN7UBtz+ldqAPaNTQZk |         eSeWAudQvOVHaSSAUmgfViPN+Dnbj2pwiwHZbSqWNpSZP9uFYqQPP663wox6YI/sQW3M6V+pAdg3NhmQ | ||||||
|         G9S0rFZb7r+A0t0AKuFdqLlAe2o/rOcdqL4+CTs3ivK7xvUDyEzwyuAllCeCsO54HGCiBdUXx2Cmu2F+ |         bVDTslptuf8CSncDqIR3oeYC7an9sJ53oPr6JOzcKMoLjesHkJnglcFLKE8EYd3xOMBEC6ovjsFMd8P8 | ||||||
|         OaPb/j6O8ntPfQBv5tpkJtge3q3B1tM2mB+9GvQt7cXDV50IpVow+mEQO2L/nEDBeDPXXmO2kp0wM6ex |         cka3/X0c5fee+gDezLXJTLA9vFuDradtMD96Nehb2ouHrzoRSrVg9MMgdsT+OYGC8WauvcZsJTthZk5j | ||||||
|         KuDplx3wze5F25MmHHzciOhCCNsn3AG0ip4Wb19G5WZTnVnAhc/dGJo7gHYXeCoeQO94AvHkJxy5OuMM |         VcDTLzvgm92LtidNOPi4EdF3IWyfcAfQKnpavH0ZlZtNdWYBFz53Y2juANpd4Kl4AL3jCcSTn3Dk6owz | ||||||
|         oM+0qhK7pgXjzVybzAQfEuDRB8fRey+ByWQGU8lF3H+WcQYIu48hoc+0iuxaMHdtMhMcjqc0MDr5Fj2R |         gD7TqkrsmhaMN3NtMhN8SIBHHxxH770EJpMZTCUXcf9Zxhkg7D6GhD7TKrJrwdy1yUxwOJ7SwOjkW/RE | ||||||
|         pIDj1uG+mTcUb54JY0joM62i2hSMN3NtMhPsH57TwPYrj1r16izZoMB4MmH6dvGZ7FSbgvFmrk1mgl1Y |         kgKOW4f7Zt5QvHkmjCGhz7SKalMw3sy1yUywf3hOA9uvPGrVq7NkgwLjyYTp28VnslNtCsabuTaZCXZh | ||||||
|         vWSAzWwznnp9CQkH0CrNLoKRnWuvY14r3s8fg9nW8ZSEMST0mVZRbUewTdhZtE+20D8Gs814MmEMCX2m |         9ZIBNrPNeOr1JSQcQKs0uwhGdq69jnmteD9/DGZbx1MSxpDQZ1pFtR3BNmFn0T7ZQv8YzDbjyYQxJPSZ | ||||||
|         0mwt2IZS6i+BL/Tbk6gtGgAAAABJRU5ErkJggg== |         SrO1YBtKqb9xnvTUEO87lQAAAABJRU5ErkJggg== | ||||||
| </value> | </value> | ||||||
|   </data> |   </data> | ||||||
|   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								Sub/tcpservice
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								Sub/tcpservice
									
									
									
									
									
										Submodule
									
								
							 Submodule Sub/tcpservice added at 5324c9e0bf
									
								
							| @@ -105,7 +105,7 @@ namespace FBS0000 | |||||||
|                 fpSpread1_Sheet1.Cells[rowindex, 3].Value = item.name; |                 fpSpread1_Sheet1.Cells[rowindex, 3].Value = item.name; | ||||||
|  |  | ||||||
|                 //이월잔액 |                 //이월잔액 | ||||||
|                 var jand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, item.empno, sd.ToShortDateString()); |                 var jand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, item.empno,sd.ToString("yyyy-01-01"), sd.ToShortDateString(),"999999"); | ||||||
|                 var used = 0.0; |                 var used = 0.0; | ||||||
|  |  | ||||||
|                 fpSpread1_Sheet1.Rows[rowindex].ResetBorder(); |                 fpSpread1_Sheet1.Rows[rowindex].ResetBorder(); | ||||||
|   | |||||||
| @@ -79,6 +79,7 @@ namespace FBS0000 | |||||||
|  |  | ||||||
|             //일반사용자의경우에는 상태를 변경하지 못한다. |             //일반사용자의경우에는 상태를 변경하지 못한다. | ||||||
|             int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.holyday)); |             int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.holyday)); | ||||||
|  |             curLevel = 5; | ||||||
|             if (curLevel >= 5) |             if (curLevel >= 5) | ||||||
|             { |             { | ||||||
|                 //권한이 잇으므로 모든 사용자로 한다. |                 //권한이 잇으므로 모든 사용자로 한다. | ||||||
| @@ -179,9 +180,11 @@ namespace FBS0000 | |||||||
|                 var dr = this.dsMSSQL.Holyday.Rows[drindex] as dsMSSQL.HolydayRow; |                 var dr = this.dsMSSQL.Holyday.Rows[drindex] as dsMSSQL.HolydayRow; | ||||||
|                 this.fpSpread1.ActiveSheet.Cells[i, col_name].Value = dr.UserName; |                 this.fpSpread1.ActiveSheet.Cells[i, col_name].Value = dr.UserName; | ||||||
|  |  | ||||||
|  |                 var fistdate = dr.sdate.ToString("yyyy-01-01"); | ||||||
|  |  | ||||||
|                 //이 사용자의 이전까지의 잔량을 가져온다 |                 //이 사용자의 이전까지의 잔량을 가져온다 | ||||||
|                 var yjand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, dr.uid, dr.sdate.ToShortDateString()); |                 var yjand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, dr.uid, fistdate, dr.sdate.ToShortDateString(),dr.idx.ToString("000000")); | ||||||
|                 var yjanh = qta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, dr.uid, dr.sdate.ToShortDateString()); |                 var yjanh = qta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, dr.uid, fistdate, dr.sdate.ToShortDateString(), dr.idx.ToString("000000")); | ||||||
|                 var jand = yjand + dr.termDr - dr.term; |                 var jand = yjand + dr.termDr - dr.term; | ||||||
|                 var janh = yjanh + dr.DrTime - dr.CrTime; |                 var janh = yjanh + dr.DrTime - dr.CrTime; | ||||||
|                 this.fpSpread1.ActiveSheet.Cells[i, col_yjand].Value = yjand; |                 this.fpSpread1.ActiveSheet.Cells[i, col_yjand].Value = yjand; | ||||||
| @@ -235,8 +238,12 @@ namespace FBS0000 | |||||||
|             fpSpread1.ActiveSheet.Cells[rowindex, col_name].Value = username; |             fpSpread1.ActiveSheet.Cells[rowindex, col_name].Value = username; | ||||||
|  |  | ||||||
|             //이 사용자의 이전까지의 잔량을 가져온다 |             //이 사용자의 이전까지의 잔량을 가져온다 | ||||||
|             var yjand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, this.seluid, newdr.sdate.ToShortDateString()); |             var fistdate = newdr.sdate.ToString("yyyy-01-01"); | ||||||
|             var yjanh = qta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, seluid, newdr.sdate.ToShortDateString()); |             var yjand = 0;// qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, this.seluid, fistdate, newdr.sdate.ToShortDateString(),"999999"); | ||||||
|  |             var yjanh = 0;// qta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, seluid, fistdate, newdr.sdate.ToShortDateString(), "999999"); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |          | ||||||
|             //var jand = yjand + dr.termDr - dr.term; |             //var jand = yjand + dr.termDr - dr.term; | ||||||
|             //var janh = yjanh + dr.DrTime - dr.CrTime; |             //var janh = yjanh + dr.DrTime - dr.CrTime; | ||||||
|             this.fpSpread1.ActiveSheet.Cells[rowindex, col_yjand].Value = yjand; |             this.fpSpread1.ActiveSheet.Cells[rowindex, col_yjand].Value = yjand; | ||||||
| @@ -338,6 +345,7 @@ namespace FBS0000 | |||||||
|             this.dsMSSQL.Holyday.AddHolydayRow(newdr); |             this.dsMSSQL.Holyday.AddHolydayRow(newdr); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|         private void toolStripButton4_Click(object sender, EventArgs e) |         private void toolStripButton4_Click(object sender, EventArgs e) | ||||||
|         { |         { | ||||||
|             if (this.cmbUser.SelectedIndex < 0) |             if (this.cmbUser.SelectedIndex < 0) | ||||||
| @@ -347,7 +355,7 @@ namespace FBS0000 | |||||||
|             } |             } | ||||||
|             string uid = GetUIDValue(); |             string uid = GetUIDValue(); | ||||||
|             var f = new fHolydayJobReport(tbSD.Text, tbED.Text, uid); |             var f = new fHolydayJobReport(tbSD.Text, tbED.Text, uid); | ||||||
|             f.ShowDialog(); |             f.Show(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         private void toolStripButton5_Click(object sender, EventArgs e) |         private void toolStripButton5_Click(object sender, EventArgs e) | ||||||
| @@ -355,7 +363,7 @@ namespace FBS0000 | |||||||
|             var sd = DateTime.Now.ToString("yyyy-MM-01"); |             var sd = DateTime.Now.ToString("yyyy-MM-01"); | ||||||
|             var ed = DateTime.Parse(DateTime.Now.AddMonths(1).ToString("yyyy-MM-01")).AddDays(-1).ToShortDateString(); |             var ed = DateTime.Parse(DateTime.Now.AddMonths(1).ToString("yyyy-MM-01")).AddDays(-1).ToShortDateString(); | ||||||
|             var f = new WorkTable(sd, ed, this.cmbGrp.Text); |             var f = new WorkTable(sd, ed, this.cmbGrp.Text); | ||||||
|             f.ShowDialog(); |             f.Show(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         private void toolStripButton6_Click(object sender, EventArgs e) |         private void toolStripButton6_Click(object sender, EventArgs e) | ||||||
| @@ -388,8 +396,8 @@ namespace FBS0000 | |||||||
|                 var pdate = ((DateTime)cell.Value).ToString("yyyy-MM-dd"); |                 var pdate = ((DateTime)cell.Value).ToString("yyyy-MM-dd"); | ||||||
|                 var empno = fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["empno"].Index].Value.ToString(); |                 var empno = fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["empno"].Index].Value.ToString(); | ||||||
|                 var ta = new dsMSSQLTableAdapters.QueriesTableAdapter(); |                 var ta = new dsMSSQLTableAdapters.QueriesTableAdapter(); | ||||||
|                 var jand = ta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, empno, pdate); |                 var jand = 0;// ta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, empno, pdate); | ||||||
|                 var janh = ta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, empno, pdate); |                 var janh = 0;// ta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, empno, pdate); | ||||||
|  |  | ||||||
|                 fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjand"].Index].Value = jand; |                 fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjand"].Index].Value = jand; | ||||||
|                 fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjanh"].Index].Value = janh; |                 fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjanh"].Index].Value = janh; | ||||||
| @@ -411,8 +419,8 @@ namespace FBS0000 | |||||||
|  |  | ||||||
|                     //전일잔액표시 |                     //전일잔액표시 | ||||||
|                     var ta = new dsMSSQLTableAdapters.QueriesTableAdapter(); |                     var ta = new dsMSSQLTableAdapters.QueriesTableAdapter(); | ||||||
|                     var jand = ta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, empno, pdate); |                     var jand = 0;// ta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, empno, pdate); | ||||||
|                     var janh = ta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, empno, pdate); |                     var janh = 0;// ta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, empno, pdate); | ||||||
|                     fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjand"].Index].Value = jand; |                     fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjand"].Index].Value = jand; | ||||||
|                     fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjanh"].Index].Value = janh; |                     fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjanh"].Index].Value = janh; | ||||||
|  |  | ||||||
| @@ -430,8 +438,8 @@ namespace FBS0000 | |||||||
|                     { |                     { | ||||||
|                         //전일잔액표시 |                         //전일잔액표시 | ||||||
|                         var ta = new dsMSSQLTableAdapters.QueriesTableAdapter(); |                         var ta = new dsMSSQLTableAdapters.QueriesTableAdapter(); | ||||||
|                         var jand = ta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, flov.dr.empno, pdate); |                         var jand = 0;// ta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, flov.dr.empno, pdate); | ||||||
|                         var janh = ta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, flov.dr.empno, pdate); |                         var janh = 0;// ta.WorkUserJan_YesterDay_Time(FCOMMON.info.Login.gcode, flov.dr.empno, pdate); | ||||||
|                         fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjand"].Index].Value = jand; |                         fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjand"].Index].Value = jand; | ||||||
|                         fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjanh"].Index].Value = janh; |                         fpSpread1.ActiveSheet.Cells[cell.Row.Index, fpSpread1.ActiveSheet.Columns["yjanh"].Index].Value = janh; | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										56
									
								
								SubProject/FBS0000/dsMSSQL.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										56
									
								
								SubProject/FBS0000/dsMSSQL.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -7760,19 +7760,27 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM | |||||||
|             this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); |             this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Connection = new global::System.Data.SqlClient.SqlConnection(global::FBS0000.Properties.Settings.Default.gwcs); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Connection = new global::System.Data.SqlClient.SqlConnection(global::FBS0000.Properties.Settings.Default.gwcs); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).CommandText = "SELECT  ISNULL(SUM(termDr), 0) - ISNULL(SUM(term), 0) AS jan\r\nFROM     Holyday\r\nW" + |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).CommandText = "SELECT  ISNULL(SUM(termDr), 0) - ISNULL(SUM(term), 0) AS jan\r\nFROM     Holyday\r\nW" + | ||||||
|                 "HERE  (gcode = @gcode) AND (uid = @uid) AND (sdate < @pdate)"; |                 "HERE  (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= @fi" + | ||||||
|  |                 "rstdate) AND (CONVERT(CHAR(10), sdate, 23) + dbo.PadLeft(idx, \'0\', 6) < @pdate +" + | ||||||
|  |                 " @idxlen6)"; | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).CommandType = global::System.Data.CommandType.Text; |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).CommandType = global::System.Data.CommandType.Text; | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pdate", global::System.Data.SqlDbType.Date, 3, global::System.Data.ParameterDirection.Input, 0, 0, "sdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@firstdate", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|  |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pdate", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|  |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxlen6", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|             this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); |             this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Connection = new global::System.Data.SqlClient.SqlConnection(global::FBS0000.Properties.Settings.Default.gwcs); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Connection = new global::System.Data.SqlClient.SqlConnection(global::FBS0000.Properties.Settings.Default.gwcs); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandText = "SELECT  ISNULL(SUM(DrTime), 0) - ISNULL(SUM(CrTime), 0) AS jan\r\nFROM     Holyday\r" + |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandText = "SELECT  ISNULL(SUM(DrTime), 0) - ISNULL(SUM(CrTime), 0) AS jan\r\nFROM     Holyday\r" + | ||||||
|                 "\nWHERE  (gcode = @gcode) AND (uid = @uid) AND (sdate < @pdate)"; |                 "\nWHERE  (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= @" + | ||||||
|  |                 "firstdate) AND (CONVERT(CHAR(10), sdate, 23) + dbo.PadLeft(idx, \'0\', 6) < @pdate" + | ||||||
|  |                 " + @idxlen6)"; | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandType = global::System.Data.CommandType.Text; |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandType = global::System.Data.CommandType.Text; | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pdate", global::System.Data.SqlDbType.Date, 3, global::System.Data.ParameterDirection.Input, 0, 0, "sdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@firstdate", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|  |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pdate", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|  |             ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxlen6", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | ||||||
| @@ -7818,7 +7826,7 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM | |||||||
|         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | ||||||
|         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] |         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] | ||||||
|         [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] |         [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] | ||||||
|         public virtual global::System.Nullable<double> WorkUserJan_Yesterday_Day(string gcode, string uid, string pdate) { |         public virtual global::System.Nullable<double> WorkUserJan_Yesterday_Day(string gcode, string uid, string firstdate, string pdate, string idxlen6) { | ||||||
|             global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[1])); |             global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[1])); | ||||||
|             if ((gcode == null)) { |             if ((gcode == null)) { | ||||||
|                 throw new global::System.ArgumentNullException("gcode"); |                 throw new global::System.ArgumentNullException("gcode"); | ||||||
| @@ -7832,11 +7840,23 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM | |||||||
|             else { |             else { | ||||||
|                 command.Parameters[1].Value = ((string)(uid)); |                 command.Parameters[1].Value = ((string)(uid)); | ||||||
|             } |             } | ||||||
|             if ((pdate == null)) { |             if ((firstdate == null)) { | ||||||
|                 command.Parameters[2].Value = global::System.DBNull.Value; |                 throw new global::System.ArgumentNullException("firstdate"); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 command.Parameters[2].Value = ((string)(pdate)); |                 command.Parameters[2].Value = ((string)(firstdate)); | ||||||
|  |             } | ||||||
|  |             if ((pdate == null)) { | ||||||
|  |                 throw new global::System.ArgumentNullException("pdate"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 command.Parameters[3].Value = ((string)(pdate)); | ||||||
|  |             } | ||||||
|  |             if ((idxlen6 == null)) { | ||||||
|  |                 throw new global::System.ArgumentNullException("idxlen6"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 command.Parameters[4].Value = ((string)(idxlen6)); | ||||||
|             } |             } | ||||||
|             global::System.Data.ConnectionState previousConnectionState = command.Connection.State; |             global::System.Data.ConnectionState previousConnectionState = command.Connection.State; | ||||||
|             if (((command.Connection.State & global::System.Data.ConnectionState.Open)  |             if (((command.Connection.State & global::System.Data.ConnectionState.Open)  | ||||||
| @@ -7864,7 +7884,7 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM | |||||||
|         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | ||||||
|         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] |         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] | ||||||
|         [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] |         [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] | ||||||
|         public virtual global::System.Nullable<double> WorkUserJan_YesterDay_Time(string gcode, string uid, string pdate) { |         public virtual global::System.Nullable<double> WorkUserJan_YesterDay_Time(string gcode, string uid, string firstdate, string pdate, string idxlen6) { | ||||||
|             global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[2])); |             global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[2])); | ||||||
|             if ((gcode == null)) { |             if ((gcode == null)) { | ||||||
|                 throw new global::System.ArgumentNullException("gcode"); |                 throw new global::System.ArgumentNullException("gcode"); | ||||||
| @@ -7878,11 +7898,23 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM | |||||||
|             else { |             else { | ||||||
|                 command.Parameters[1].Value = ((string)(uid)); |                 command.Parameters[1].Value = ((string)(uid)); | ||||||
|             } |             } | ||||||
|             if ((pdate == null)) { |             if ((firstdate == null)) { | ||||||
|                 command.Parameters[2].Value = global::System.DBNull.Value; |                 throw new global::System.ArgumentNullException("firstdate"); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 command.Parameters[2].Value = ((string)(pdate)); |                 command.Parameters[2].Value = ((string)(firstdate)); | ||||||
|  |             } | ||||||
|  |             if ((pdate == null)) { | ||||||
|  |                 throw new global::System.ArgumentNullException("pdate"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 command.Parameters[3].Value = ((string)(pdate)); | ||||||
|  |             } | ||||||
|  |             if ((idxlen6 == null)) { | ||||||
|  |                 throw new global::System.ArgumentNullException("idxlen6"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 command.Parameters[4].Value = ((string)(idxlen6)); | ||||||
|             } |             } | ||||||
|             global::System.Data.ConnectionState previousConnectionState = command.Connection.State; |             global::System.Data.ConnectionState previousConnectionState = command.Connection.State; | ||||||
|             if (((command.Connection.State & global::System.Data.ConnectionState.Open)  |             if (((command.Connection.State & global::System.Data.ConnectionState.Open)  | ||||||
|   | |||||||
| @@ -625,11 +625,13 @@ WHERE  (gcode = @gcode) AND (empno = @empno)</CommandText> | |||||||
|               <DbCommand CommandType="Text" ModifiedByUser="true"> |               <DbCommand CommandType="Text" ModifiedByUser="true"> | ||||||
|                 <CommandText>SELECT  ISNULL(SUM(termDr), 0) - ISNULL(SUM(term), 0) AS jan |                 <CommandText>SELECT  ISNULL(SUM(termDr), 0) - ISNULL(SUM(term), 0) AS jan | ||||||
| FROM     Holyday | FROM     Holyday | ||||||
| WHERE  (gcode = @gcode) AND (uid = @uid) AND (sdate < @pdate)</CommandText> | WHERE  (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= @firstdate) AND (CONVERT(CHAR(10), sdate, 23) + dbo.PadLeft(idx, '0', 6) < @pdate + @idxlen6)</CommandText> | ||||||
|                 <Parameters> |                 <Parameters> | ||||||
|                   <Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" /> |                   <Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|                   <Parameter AllowDbNull="true" AutogeneratedName="uid" ColumnName="uid" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@uid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="uid" SourceColumnNullMapping="false" SourceVersion="Current" /> |                   <Parameter AllowDbNull="true" AutogeneratedName="uid" ColumnName="uid" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@uid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="uid" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|                   <Parameter AllowDbNull="true" AutogeneratedName="pdate" ColumnName="sdate" DataSourceName="EE.dbo.Holyday" DataTypeServer="date" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" ProviderType="Date" Scale="0" Size="3" SourceColumn="sdate" SourceColumnNullMapping="false" SourceVersion="Current" /> |                   <Parameter AllowDbNull="false" AutogeneratedName="firstdate" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@firstdate" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|  |                   <Parameter AllowDbNull="false" AutogeneratedName="pdate" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|  |                   <Parameter AllowDbNull="false" AutogeneratedName="idxlen6" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@idxlen6" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|                 </Parameters> |                 </Parameters> | ||||||
|               </DbCommand> |               </DbCommand> | ||||||
|             </SelectCommand> |             </SelectCommand> | ||||||
| @@ -639,11 +641,13 @@ WHERE  (gcode = @gcode) AND (uid = @uid) AND (sdate < @pdate)</CommandText> | |||||||
|               <DbCommand CommandType="Text" ModifiedByUser="true"> |               <DbCommand CommandType="Text" ModifiedByUser="true"> | ||||||
|                 <CommandText>SELECT  ISNULL(SUM(DrTime), 0) - ISNULL(SUM(CrTime), 0) AS jan |                 <CommandText>SELECT  ISNULL(SUM(DrTime), 0) - ISNULL(SUM(CrTime), 0) AS jan | ||||||
| FROM     Holyday | FROM     Holyday | ||||||
| WHERE  (gcode = @gcode) AND (uid = @uid) AND (sdate < @pdate)</CommandText> | WHERE  (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= @firstdate) AND (CONVERT(CHAR(10), sdate, 23) + dbo.PadLeft(idx, '0', 6) < @pdate + @idxlen6)</CommandText> | ||||||
|                 <Parameters> |                 <Parameters> | ||||||
|                   <Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" /> |                   <Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|                   <Parameter AllowDbNull="true" AutogeneratedName="uid" ColumnName="uid" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@uid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="uid" SourceColumnNullMapping="false" SourceVersion="Current" /> |                   <Parameter AllowDbNull="true" AutogeneratedName="uid" ColumnName="uid" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@uid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="uid" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|                   <Parameter AllowDbNull="true" AutogeneratedName="pdate" ColumnName="sdate" DataSourceName="EE.dbo.Holyday" DataTypeServer="date" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" ProviderType="Date" Scale="0" Size="3" SourceColumn="sdate" SourceColumnNullMapping="false" SourceVersion="Current" /> |                   <Parameter AllowDbNull="false" AutogeneratedName="firstdate" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@firstdate" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|  |                   <Parameter AllowDbNull="false" AutogeneratedName="pdate" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|  |                   <Parameter AllowDbNull="false" AutogeneratedName="idxlen6" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="AnsiString" Direction="Input" ParameterName="@idxlen6" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||||||
|                 </Parameters> |                 </Parameters> | ||||||
|               </DbCommand> |               </DbCommand> | ||||||
|             </SelectCommand> |             </SelectCommand> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 chi
					chi