개인/월별 작업 시간 합계, 그래프에서 폼즈로 변경
This commit is contained in:
412
Project/_Common/fAddNewUser.Designer.cs
generated
Normal file
412
Project/_Common/fAddNewUser.Designer.cs
generated
Normal file
@@ -0,0 +1,412 @@
|
||||
namespace Project._Common
|
||||
{
|
||||
partial class fAddNewUser
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.Label idLabel;
|
||||
System.Windows.Forms.Label passwordLabel;
|
||||
System.Windows.Forms.Label nameLabel;
|
||||
System.Windows.Forms.Label deptLabel;
|
||||
System.Windows.Forms.Label gradeLabel;
|
||||
System.Windows.Forms.Label emailLabel;
|
||||
System.Windows.Forms.Label levelLabel;
|
||||
System.Windows.Forms.Label indateLabel;
|
||||
System.Windows.Forms.Label outdateLabel;
|
||||
System.Windows.Forms.Label memoLabel;
|
||||
System.Windows.Forms.Label label1;
|
||||
System.Windows.Forms.Label label2;
|
||||
System.Windows.Forms.Label label3;
|
||||
System.Windows.Forms.Label label4;
|
||||
System.Windows.Forms.Label label5;
|
||||
this.tbId = new System.Windows.Forms.TextBox();
|
||||
this.tbNameK = new System.Windows.Forms.TextBox();
|
||||
this.tbDept = new System.Windows.Forms.TextBox();
|
||||
this.tbGrade = new System.Windows.Forms.TextBox();
|
||||
this.tbEmail = new System.Windows.Forms.TextBox();
|
||||
this.tbLevel = new System.Windows.Forms.TextBox();
|
||||
this.tbDateIn = new System.Windows.Forms.TextBox();
|
||||
this.tbDateO = new System.Windows.Forms.TextBox();
|
||||
this.tbMemo = new System.Windows.Forms.TextBox();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.tbTel = new System.Windows.Forms.TextBox();
|
||||
this.tbHp = new System.Windows.Forms.TextBox();
|
||||
this.tbNameE = new System.Windows.Forms.TextBox();
|
||||
this.tbKJPath = new System.Windows.Forms.TextBox();
|
||||
this.tbProcess = new System.Windows.Forms.TextBox();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
idLabel = new System.Windows.Forms.Label();
|
||||
passwordLabel = new System.Windows.Forms.Label();
|
||||
nameLabel = new System.Windows.Forms.Label();
|
||||
deptLabel = new System.Windows.Forms.Label();
|
||||
gradeLabel = new System.Windows.Forms.Label();
|
||||
emailLabel = new System.Windows.Forms.Label();
|
||||
levelLabel = new System.Windows.Forms.Label();
|
||||
indateLabel = new System.Windows.Forms.Label();
|
||||
outdateLabel = new System.Windows.Forms.Label();
|
||||
memoLabel = new System.Windows.Forms.Label();
|
||||
label1 = new System.Windows.Forms.Label();
|
||||
label2 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
label4 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// idLabel
|
||||
//
|
||||
idLabel.AutoSize = true;
|
||||
idLabel.Location = new System.Drawing.Point(26, 15);
|
||||
idLabel.Name = "idLabel";
|
||||
idLabel.Size = new System.Drawing.Size(74, 21);
|
||||
idLabel.TabIndex = 0;
|
||||
idLabel.Text = "사원번호";
|
||||
//
|
||||
// passwordLabel
|
||||
//
|
||||
passwordLabel.AutoSize = true;
|
||||
passwordLabel.Location = new System.Drawing.Point(26, 49);
|
||||
passwordLabel.Name = "passwordLabel";
|
||||
passwordLabel.Size = new System.Drawing.Size(74, 21);
|
||||
passwordLabel.TabIndex = 2;
|
||||
passwordLabel.Text = "비밀번호";
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
nameLabel.AutoSize = true;
|
||||
nameLabel.Location = new System.Drawing.Point(58, 86);
|
||||
nameLabel.Name = "nameLabel";
|
||||
nameLabel.Size = new System.Drawing.Size(42, 21);
|
||||
nameLabel.TabIndex = 4;
|
||||
nameLabel.Text = "이름";
|
||||
//
|
||||
// deptLabel
|
||||
//
|
||||
deptLabel.AutoSize = true;
|
||||
deptLabel.Location = new System.Drawing.Point(58, 123);
|
||||
deptLabel.Name = "deptLabel";
|
||||
deptLabel.Size = new System.Drawing.Size(42, 21);
|
||||
deptLabel.TabIndex = 8;
|
||||
deptLabel.Text = "부서";
|
||||
//
|
||||
// gradeLabel
|
||||
//
|
||||
gradeLabel.AutoSize = true;
|
||||
gradeLabel.Location = new System.Drawing.Point(360, 123);
|
||||
gradeLabel.Name = "gradeLabel";
|
||||
gradeLabel.Size = new System.Drawing.Size(42, 21);
|
||||
gradeLabel.TabIndex = 10;
|
||||
gradeLabel.Text = "직책";
|
||||
//
|
||||
// emailLabel
|
||||
//
|
||||
emailLabel.AutoSize = true;
|
||||
emailLabel.Location = new System.Drawing.Point(26, 159);
|
||||
emailLabel.Name = "emailLabel";
|
||||
emailLabel.Size = new System.Drawing.Size(74, 21);
|
||||
emailLabel.TabIndex = 12;
|
||||
emailLabel.Text = "전자메일";
|
||||
//
|
||||
// levelLabel
|
||||
//
|
||||
levelLabel.AutoSize = true;
|
||||
levelLabel.Location = new System.Drawing.Point(360, 229);
|
||||
levelLabel.Name = "levelLabel";
|
||||
levelLabel.Size = new System.Drawing.Size(42, 21);
|
||||
levelLabel.TabIndex = 18;
|
||||
levelLabel.Text = "권한";
|
||||
//
|
||||
// indateLabel
|
||||
//
|
||||
indateLabel.AutoSize = true;
|
||||
indateLabel.Location = new System.Drawing.Point(344, 15);
|
||||
indateLabel.Name = "indateLabel";
|
||||
indateLabel.Size = new System.Drawing.Size(58, 21);
|
||||
indateLabel.TabIndex = 20;
|
||||
indateLabel.Text = "입사일";
|
||||
//
|
||||
// outdateLabel
|
||||
//
|
||||
outdateLabel.AutoSize = true;
|
||||
outdateLabel.Location = new System.Drawing.Point(344, 49);
|
||||
outdateLabel.Name = "outdateLabel";
|
||||
outdateLabel.Size = new System.Drawing.Size(58, 21);
|
||||
outdateLabel.TabIndex = 22;
|
||||
outdateLabel.Text = "퇴사일";
|
||||
//
|
||||
// memoLabel
|
||||
//
|
||||
memoLabel.AutoSize = true;
|
||||
memoLabel.Location = new System.Drawing.Point(360, 156);
|
||||
memoLabel.Name = "memoLabel";
|
||||
memoLabel.Size = new System.Drawing.Size(42, 21);
|
||||
memoLabel.TabIndex = 24;
|
||||
memoLabel.Text = "비고";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new System.Drawing.Point(10, 193);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new System.Drawing.Size(90, 21);
|
||||
label1.TabIndex = 14;
|
||||
label1.Text = "사무실전화";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new System.Drawing.Point(26, 229);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new System.Drawing.Size(74, 21);
|
||||
label2.TabIndex = 16;
|
||||
label2.Text = "휴대전화";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new System.Drawing.Point(318, 86);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new System.Drawing.Size(84, 21);
|
||||
label3.TabIndex = 6;
|
||||
label3.Text = "이름(영문)";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new System.Drawing.Point(106, 330);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new System.Drawing.Size(96, 21);
|
||||
label4.TabIndex = 27;
|
||||
label4.Text = "견적서 위치";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new System.Drawing.Point(360, 193);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new System.Drawing.Size(42, 21);
|
||||
label5.TabIndex = 29;
|
||||
label5.Text = "공정";
|
||||
//
|
||||
// tbId
|
||||
//
|
||||
this.tbId.Location = new System.Drawing.Point(105, 11);
|
||||
this.tbId.Name = "tbId";
|
||||
this.tbId.Size = new System.Drawing.Size(145, 29);
|
||||
this.tbId.TabIndex = 1;
|
||||
//
|
||||
// tbNameK
|
||||
//
|
||||
this.tbNameK.Location = new System.Drawing.Point(105, 82);
|
||||
this.tbNameK.Name = "tbNameK";
|
||||
this.tbNameK.Size = new System.Drawing.Size(200, 29);
|
||||
this.tbNameK.TabIndex = 5;
|
||||
//
|
||||
// tbDept
|
||||
//
|
||||
this.tbDept.Location = new System.Drawing.Point(105, 119);
|
||||
this.tbDept.Name = "tbDept";
|
||||
this.tbDept.Size = new System.Drawing.Size(200, 29);
|
||||
this.tbDept.TabIndex = 9;
|
||||
//
|
||||
// tbGrade
|
||||
//
|
||||
this.tbGrade.Location = new System.Drawing.Point(407, 119);
|
||||
this.tbGrade.Name = "tbGrade";
|
||||
this.tbGrade.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbGrade.TabIndex = 11;
|
||||
//
|
||||
// tbEmail
|
||||
//
|
||||
this.tbEmail.Location = new System.Drawing.Point(105, 156);
|
||||
this.tbEmail.Name = "tbEmail";
|
||||
this.tbEmail.Size = new System.Drawing.Size(200, 29);
|
||||
this.tbEmail.TabIndex = 13;
|
||||
//
|
||||
// tbLevel
|
||||
//
|
||||
this.tbLevel.Location = new System.Drawing.Point(407, 225);
|
||||
this.tbLevel.Name = "tbLevel";
|
||||
this.tbLevel.ReadOnly = true;
|
||||
this.tbLevel.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbLevel.TabIndex = 19;
|
||||
//
|
||||
// tbDateIn
|
||||
//
|
||||
this.tbDateIn.Location = new System.Drawing.Point(407, 11);
|
||||
this.tbDateIn.Name = "tbDateIn";
|
||||
this.tbDateIn.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbDateIn.TabIndex = 21;
|
||||
//
|
||||
// tbDateO
|
||||
//
|
||||
this.tbDateO.Location = new System.Drawing.Point(407, 45);
|
||||
this.tbDateO.Name = "tbDateO";
|
||||
this.tbDateO.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbDateO.TabIndex = 23;
|
||||
//
|
||||
// tbMemo
|
||||
//
|
||||
this.tbMemo.Location = new System.Drawing.Point(407, 156);
|
||||
this.tbMemo.Name = "tbMemo";
|
||||
this.tbMemo.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbMemo.TabIndex = 25;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(105, 264);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(491, 54);
|
||||
this.button2.TabIndex = 26;
|
||||
this.button2.Text = "저장(&S)";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// tbTel
|
||||
//
|
||||
this.tbTel.Location = new System.Drawing.Point(105, 190);
|
||||
this.tbTel.Name = "tbTel";
|
||||
this.tbTel.Size = new System.Drawing.Size(200, 29);
|
||||
this.tbTel.TabIndex = 15;
|
||||
//
|
||||
// tbHp
|
||||
//
|
||||
this.tbHp.Location = new System.Drawing.Point(105, 225);
|
||||
this.tbHp.Name = "tbHp";
|
||||
this.tbHp.Size = new System.Drawing.Size(200, 29);
|
||||
this.tbHp.TabIndex = 17;
|
||||
//
|
||||
// tbNameE
|
||||
//
|
||||
this.tbNameE.Location = new System.Drawing.Point(407, 82);
|
||||
this.tbNameE.Name = "tbNameE";
|
||||
this.tbNameE.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbNameE.TabIndex = 7;
|
||||
//
|
||||
// tbKJPath
|
||||
//
|
||||
this.tbKJPath.Location = new System.Drawing.Point(184, 327);
|
||||
this.tbKJPath.Name = "tbKJPath";
|
||||
this.tbKJPath.ReadOnly = true;
|
||||
this.tbKJPath.Size = new System.Drawing.Size(177, 29);
|
||||
this.tbKJPath.TabIndex = 28;
|
||||
//
|
||||
// tbProcess
|
||||
//
|
||||
this.tbProcess.Location = new System.Drawing.Point(407, 190);
|
||||
this.tbProcess.Name = "tbProcess";
|
||||
this.tbProcess.Size = new System.Drawing.Size(189, 29);
|
||||
this.tbProcess.TabIndex = 30;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(105, 45);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.Size = new System.Drawing.Size(200, 29);
|
||||
this.textBox1.TabIndex = 31;
|
||||
this.textBox1.Text = "기본값 0";
|
||||
this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Font = new System.Drawing.Font("맑은 고딕", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.button1.Location = new System.Drawing.Point(256, 11);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(49, 29);
|
||||
this.button1.TabIndex = 32;
|
||||
this.button1.Text = "조회";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// fAddNewUser
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(601, 326);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(label5);
|
||||
this.Controls.Add(this.tbProcess);
|
||||
this.Controls.Add(label4);
|
||||
this.Controls.Add(this.tbKJPath);
|
||||
this.Controls.Add(label3);
|
||||
this.Controls.Add(this.tbNameE);
|
||||
this.Controls.Add(label2);
|
||||
this.Controls.Add(this.tbHp);
|
||||
this.Controls.Add(label1);
|
||||
this.Controls.Add(this.tbTel);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(idLabel);
|
||||
this.Controls.Add(this.tbId);
|
||||
this.Controls.Add(passwordLabel);
|
||||
this.Controls.Add(nameLabel);
|
||||
this.Controls.Add(this.tbNameK);
|
||||
this.Controls.Add(deptLabel);
|
||||
this.Controls.Add(this.tbDept);
|
||||
this.Controls.Add(gradeLabel);
|
||||
this.Controls.Add(this.tbGrade);
|
||||
this.Controls.Add(emailLabel);
|
||||
this.Controls.Add(this.tbEmail);
|
||||
this.Controls.Add(levelLabel);
|
||||
this.Controls.Add(this.tbLevel);
|
||||
this.Controls.Add(indateLabel);
|
||||
this.Controls.Add(this.tbDateIn);
|
||||
this.Controls.Add(outdateLabel);
|
||||
this.Controls.Add(this.tbDateO);
|
||||
this.Controls.Add(memoLabel);
|
||||
this.Controls.Add(this.tbMemo);
|
||||
this.Font = new System.Drawing.Font("맑은 고딕", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "fAddNewUser";
|
||||
this.Text = "사용자추가";
|
||||
this.Load += new System.EventHandler(this.fUserInfo_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.TextBox tbId;
|
||||
private System.Windows.Forms.TextBox tbNameK;
|
||||
private System.Windows.Forms.TextBox tbDept;
|
||||
private System.Windows.Forms.TextBox tbGrade;
|
||||
private System.Windows.Forms.TextBox tbEmail;
|
||||
private System.Windows.Forms.TextBox tbLevel;
|
||||
private System.Windows.Forms.TextBox tbDateIn;
|
||||
private System.Windows.Forms.TextBox tbDateO;
|
||||
private System.Windows.Forms.TextBox tbMemo;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.TextBox tbTel;
|
||||
private System.Windows.Forms.TextBox tbHp;
|
||||
private System.Windows.Forms.TextBox tbNameE;
|
||||
private System.Windows.Forms.TextBox tbKJPath;
|
||||
private System.Windows.Forms.TextBox tbProcess;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
||||
146
Project/_Common/fAddNewUser.cs
Normal file
146
Project/_Common/fAddNewUser.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Project._Common
|
||||
{
|
||||
public partial class fAddNewUser : Form // FCOMMON.fBase
|
||||
{
|
||||
public fAddNewUser(string dept)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.tbDept.Text = dept;
|
||||
}
|
||||
dsMSSQL.UsersRow dr = null;
|
||||
|
||||
private void fUserInfo_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
//입력한 id확인해서 잇으면 해당 자료를 표시해준다.
|
||||
var id = this.tbId.Text.Trim();
|
||||
if (id.isEmpty())
|
||||
{
|
||||
FCOMMON.Util.MsgE("id를 입력하세요");
|
||||
this.tbId.SelectAll();
|
||||
this.tbId.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var db = new DataClasses1DataContext();
|
||||
var dr_user = db.Users.Where(t => t.id == id).FirstOrDefault();
|
||||
if (dr_user == null)
|
||||
{
|
||||
FCOMMON.Util.MsgE("등록된 자료가 없습니다");
|
||||
tbNameK.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
tbNameK.Text = dr_user.name;
|
||||
tbNameE.Text = dr_user.nameE;
|
||||
if (tbDept.Text.isEmpty()) tbDept.Text = dr_user.dept;
|
||||
tbEmail.Text = dr_user.email;
|
||||
tbTel.Text = dr_user.tel;
|
||||
tbHp.Text = dr_user.hp;
|
||||
tbDateIn.Text = dr_user.indate;
|
||||
tbDateO.Text = dr_user.outdate;
|
||||
tbGrade.Text = dr_user.grade;
|
||||
tbMemo.Text = dr_user.memo;
|
||||
|
||||
tbProcess.Text = string.Empty;
|
||||
|
||||
//부서가잇다면 해당 부서에서 해당 사용자의 공정을 찾는다
|
||||
if (tbDept.Text.isEmpty() == false)
|
||||
{
|
||||
var drGrp = db.vGroupUser.Where(t => t.id == id).FirstOrDefault();
|
||||
if (drGrp != null)
|
||||
{
|
||||
tbProcess.Text = drGrp.processs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Validate();
|
||||
var db = new DataClasses1DataContext();
|
||||
|
||||
//해당 그룹에 데이터를 추가한다.
|
||||
var drDept = db.UserGroup.Where(t => t.dept == tbDept.Text).FirstOrDefault();
|
||||
if (drDept == null)
|
||||
{
|
||||
FCOMMON.Util.MsgE("해당 부서정보가 존재하지 않습니다\n\n부서를 신규로 추가할 수는 없습니다\n관리자에 문의하세요");
|
||||
return;
|
||||
}
|
||||
|
||||
//해당 그룹에 해당 사용자가 존재하는지 확이한다.
|
||||
var gcode = drDept.gcode;
|
||||
var drGuser = db.EETGW_GroupUser.Where(t => t.gcode == gcode && t.uid == this.tbId.Text.Trim()).FirstOrDefault();
|
||||
if (drGuser != null)
|
||||
{
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
drGuser = new EETGW_GroupUser();
|
||||
drGuser.wuid = FCOMMON.info.Login.no;
|
||||
drGuser.wdate = DateTime.Now;
|
||||
drGuser.gcode = gcode;
|
||||
drGuser.level = 1;
|
||||
drGuser.uid = this.tbId.Text.Trim();
|
||||
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
db.EETGW_GroupUser.InsertOnSubmit(drGuser);
|
||||
}
|
||||
|
||||
//사용자 목록에 없다면 추가한다
|
||||
var drUser = db.Users.Where(t => t.id == tbId.Text.Trim()).FirstOrDefault();
|
||||
if(drUser == null)
|
||||
{
|
||||
drUser = new Users();
|
||||
drUser.wuid = FCOMMON.info.Login.no;
|
||||
drUser.wdate = DateTime.Now;
|
||||
drUser.gcode = gcode;
|
||||
drUser.level = 1;
|
||||
drUser.id = tbId.Text.Trim();
|
||||
|
||||
drUser.name = tbNameK.Text.Trim();
|
||||
drUser.nameE = tbNameE.Text.Trim();
|
||||
drUser.dept = this.tbDept.Text.Trim();
|
||||
drUser.email = tbEmail.Text;
|
||||
drUser.tel = tbTel.Text;
|
||||
drUser.hp = tbHp.Text;
|
||||
drUser.indate = tbDateIn.Text;
|
||||
drUser.outdate = tbDateO.Text;
|
||||
drUser.memo = tbMemo.Text;
|
||||
drUser.processs = tbProcess.Text;
|
||||
db.Users.InsertOnSubmit(drUser);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
drUser.name = tbNameK.Text.Trim();
|
||||
drUser.nameE = tbNameE.Text.Trim();
|
||||
drUser.dept = this.tbDept.Text.Trim();
|
||||
drUser.email = tbEmail.Text;
|
||||
drUser.tel = tbTel.Text;
|
||||
drUser.hp = tbHp.Text;
|
||||
drUser.indate = tbDateIn.Text;
|
||||
drUser.outdate = tbDateO.Text;
|
||||
drUser.memo = tbMemo.Text;
|
||||
drUser.processs = tbProcess.Text;
|
||||
}
|
||||
db.SubmitChanges();
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
165
Project/_Common/fAddNewUser.resx
Normal file
165
Project/_Common/fAddNewUser.resx
Normal file
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="idLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="passwordLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="nameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="deptLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="gradeLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="emailLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="levelLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="indateLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="outdateLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="memoLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user