문자편집기 창 별도 추가했음,

휴가내역 정렬 수정
This commit is contained in:
chi
2020-06-05 13:10:14 +09:00
parent a844e35d0b
commit bd442b73a8
20 changed files with 2697 additions and 1198 deletions

View File

@@ -31,6 +31,7 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fHolyday));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.dsMSSQL = new FBS0000.dsMSSQL();
@@ -400,6 +401,7 @@
//
this.termDataGridViewTextBoxColumn.DataPropertyName = "term";
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Red;
this.termDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1;
this.termDataGridViewTextBoxColumn.HeaderText = "사용";
this.termDataGridViewTextBoxColumn.Name = "termDataGridViewTextBoxColumn";
@@ -408,6 +410,9 @@
// termDr
//
this.termDr.DataPropertyName = "termDr";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Blue;
this.termDr.DefaultCellStyle = dataGridViewCellStyle2;
this.termDr.HeaderText = "발생";
this.termDr.Name = "termDr";
this.termDr.ReadOnly = true;

View File

@@ -103,10 +103,13 @@ namespace FBS0000
//잔량계산
double sumdr = this.dsMSSQL.vHoliday_uselist.Sum(t => t.termDr);
double sumdr = this.dsMSSQL.vHoliday_uselist.Sum(t => t.termDr); //전체발생수량
double sumdrN = this.dsMSSQL.vHoliday_uselist.Where(t => t.cate == "10").Sum(t => t.termDr); //일반발생
double sumdrE = this.dsMSSQL.vHoliday_uselist.Where(t => t.cate != "10").Sum(t => t.termDr); //기타발생
double sumcr = this.dsMSSQL.vHoliday_uselist.Sum(t => t.term);
double jan = sumdr - sumcr;
sbGen.Text = sumdr.ToString("N0");
sbGen.Text = string.Format("{0}+{1}",sumdrN, sumdrE);
sbUse.Text = sumcr.ToString("N0");
sbJan.Text = jan.ToString("N0");
if (jan < 0) sbJan.ForeColor = Color.Red;
@@ -159,7 +162,7 @@ namespace FBS0000
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as dsMSSQL.vHoliday_uselistRow;
if(dr.cate == "0")
if(dr.cate == "10" || dr.cate=="11")
{
var f = new fHolyday_Add(dr.idx);
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)

View File

@@ -42,6 +42,8 @@
this.cmbUser = new System.Windows.Forms.ComboBox();
this.btOK = new System.Windows.Forms.Button();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.radNormall = new System.Windows.Forms.RadioButton();
this.radEtc = new System.Windows.Forms.RadioButton();
sdateLabel = new System.Windows.Forms.Label();
contentsLabel = new System.Windows.Forms.Label();
uidLabel = new System.Windows.Forms.Label();
@@ -135,7 +137,7 @@
this.dateTimePicker1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bs, "sdate", true));
this.dateTimePicker1.Location = new System.Drawing.Point(87, 45);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(422, 27);
this.dateTimePicker1.Size = new System.Drawing.Size(300, 27);
this.dateTimePicker1.TabIndex = 3;
this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged);
//
@@ -174,11 +176,35 @@
this.numericUpDown1.TabIndex = 7;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// radNormall
//
this.radNormall.AutoSize = true;
this.radNormall.Checked = true;
this.radNormall.Location = new System.Drawing.Point(393, 47);
this.radNormall.Name = "radNormall";
this.radNormall.Size = new System.Drawing.Size(55, 23);
this.radNormall.TabIndex = 9;
this.radNormall.TabStop = true;
this.radNormall.Text = "일반";
this.radNormall.UseVisualStyleBackColor = true;
//
// radEtc
//
this.radEtc.AutoSize = true;
this.radEtc.Location = new System.Drawing.Point(454, 47);
this.radEtc.Name = "radEtc";
this.radEtc.Size = new System.Drawing.Size(55, 23);
this.radEtc.TabIndex = 10;
this.radEtc.Text = "기타";
this.radEtc.UseVisualStyleBackColor = true;
//
// fHolyday_Add
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(523, 340);
this.Controls.Add(this.radEtc);
this.Controls.Add(this.radNormall);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(label1);
this.Controls.Add(this.btOK);
@@ -192,7 +218,7 @@
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MinimizeBox = false;
this.Name = "fHolyday_Add";
this.Text = "휴가 등록";
this.Text = "휴가 발생 등록";
this.TopMost = true;
this.Load += new System.EventHandler(this.@__Load);
((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit();
@@ -214,5 +240,7 @@
private System.Windows.Forms.ComboBox cmbUser;
private System.Windows.Forms.Button btOK;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.RadioButton radNormall;
private System.Windows.Forms.RadioButton radEtc;
}
}

View File

@@ -34,6 +34,8 @@ namespace FBS0000
{
ta.FillByIdx(this.dsMSSQL.Holyday, FCOMMON.info.Login.gcode, idx);
this.dr = this.dsMSSQL.Holyday.Rows[0] as dsMSSQL.HolydayRow;
if (dr.cate == "10") radNormall.Checked = true;
else radEtc.Checked = true;
}
this.cmbUser.DataSource = FCOMMON.DBM.getUserTable();
@@ -53,9 +55,9 @@ namespace FBS0000
private void btOK_Click(object sender, EventArgs e)
{
if (radEtc.Checked) dr.cate = "11"; //OT년차발생
else dr.cate = "10";//일반 년차발생
//기본값처리
this.Validate();
this.bs.EndEdit();
this.dr.EndEdit();