스케쥴 추가 기능

This commit is contained in:
chi
2022-12-07 10:43:45 +09:00
parent 7c23db2ee1
commit fcdebb3b35
9 changed files with 479 additions and 221 deletions

View File

@@ -250,6 +250,7 @@ namespace FPJ0000
{
C += 1;
row.ForeColor = Color.Black;
row.BackColor = Color.LightSkyBlue;
}
}

View File

@@ -39,23 +39,23 @@
System.Windows.Forms.Label pdateLabel;
System.Windows.Forms.Label label2;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fProjectSchedule));
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType4 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType5 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType7 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType8 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType10 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType11 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType12 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType3 = new FarPoint.Win.Spread.CellType.NumberCellType();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType4 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType13 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType14 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType15 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType16 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType17 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType18 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType5 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType19 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType20 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType21 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType22 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType23 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType24 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType6 = new FarPoint.Win.Spread.CellType.NumberCellType();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.dsPRJ = new FPJ0000.dsPRJ();
this.tam = new FPJ0000.dsPRJTableAdapters.TableAdapterManager();
this.ta = new FPJ0000.dsPRJTableAdapters.EETGW_ProjectsScheduleTableAdapter();
@@ -158,6 +158,8 @@
this.toolStripButton17 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton18 = new System.Windows.Forms.ToolStripButton();
this.taReason = new FPJ0000.dsPRJTableAdapters.EETGW_ProjectResonTableAdapter();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton19 = new System.Windows.Forms.ToolStripButton();
statusLabel = new System.Windows.Forms.Label();
odateLabel = new System.Windows.Forms.Label();
edateLabel = new System.Windows.Forms.Label();
@@ -333,7 +335,9 @@
this.toolStripButton1,
this.toolStripButton10,
this.chkapp2,
this.chkapp1});
this.chkapp1,
this.toolStripSeparator8,
this.toolStripButton19});
this.bn.Location = new System.Drawing.Point(5, 248);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
@@ -600,65 +604,65 @@
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(1, 6).Value = "완료";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(1, 7).Value = "%";
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 21F;
numberCellType1.DecimalPlaces = 0;
numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType1.MaximumValue = 2147483647D;
numberCellType1.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(0).CellType = numberCellType1;
numberCellType4.DecimalPlaces = 0;
numberCellType4.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType4.MaximumValue = 2147483647D;
numberCellType4.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(0).CellType = numberCellType4;
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "seq";
this.fpSpread1_Sheet1.Columns.Get(0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(0).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(0).Width = 77F;
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType1;
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType13;
this.fpSpread1_Sheet1.Columns.Get(1).DataField = "cate";
this.fpSpread1_Sheet1.Columns.Get(1).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(1).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(1).Width = 74F;
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType2;
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType14;
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "title";
this.fpSpread1_Sheet1.Columns.Get(2).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.fpSpread1_Sheet1.Columns.Get(2).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(2).Width = 151F;
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType3;
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType15;
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "sw";
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(3).Label = "시작";
this.fpSpread1_Sheet1.Columns.Get(3).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(3).Width = 77F;
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType4;
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType16;
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "ew";
this.fpSpread1_Sheet1.Columns.Get(4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(4).Label = "완료";
this.fpSpread1_Sheet1.Columns.Get(4).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(4).Width = 77F;
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType5;
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType17;
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "swa";
this.fpSpread1_Sheet1.Columns.Get(5).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(5).Label = "시작";
this.fpSpread1_Sheet1.Columns.Get(5).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(5).Width = 77F;
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType6;
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType18;
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "ewa";
this.fpSpread1_Sheet1.Columns.Get(6).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(6).Label = "완료";
this.fpSpread1_Sheet1.Columns.Get(6).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(6).Width = 77F;
numberCellType2.DecimalPlaces = 0;
numberCellType2.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType2.MaximumValue = 2147483647D;
numberCellType2.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(7).CellType = numberCellType2;
numberCellType5.DecimalPlaces = 0;
numberCellType5.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType5.MaximumValue = 2147483647D;
numberCellType5.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(7).CellType = numberCellType5;
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "progress";
this.fpSpread1_Sheet1.Columns.Get(7).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(7).Label = "%";
this.fpSpread1_Sheet1.Columns.Get(7).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(7).Width = 77F;
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType7;
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType19;
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "uid";
this.fpSpread1_Sheet1.Columns.Get(8).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(8).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(8).Width = 151F;
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType8;
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType20;
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "memo";
this.fpSpread1_Sheet1.Columns.Get(9).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.fpSpread1_Sheet1.Columns.Get(9).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
@@ -812,27 +816,27 @@
this.fpSpread2_Sheet1.ColumnHeader.Cells.Get(0, 3).Value = "완료일";
this.fpSpread2_Sheet1.ColumnHeader.Cells.Get(0, 4).Value = "진행";
this.fpSpread2_Sheet1.ColumnHeader.Rows.Get(0).Height = 31F;
this.fpSpread2_Sheet1.Columns.Get(0).CellType = textCellType9;
this.fpSpread2_Sheet1.Columns.Get(0).CellType = textCellType21;
this.fpSpread2_Sheet1.Columns.Get(0).DataField = "sort";
this.fpSpread2_Sheet1.Columns.Get(0).Label = "No";
this.fpSpread2_Sheet1.Columns.Get(0).Width = 58F;
this.fpSpread2_Sheet1.Columns.Get(1).CellType = textCellType10;
this.fpSpread2_Sheet1.Columns.Get(1).CellType = textCellType22;
this.fpSpread2_Sheet1.Columns.Get(1).DataField = "title";
this.fpSpread2_Sheet1.Columns.Get(1).Label = "항목";
this.fpSpread2_Sheet1.Columns.Get(1).Width = 151F;
this.fpSpread2_Sheet1.Columns.Get(2).CellType = textCellType11;
this.fpSpread2_Sheet1.Columns.Get(2).CellType = textCellType23;
this.fpSpread2_Sheet1.Columns.Get(2).DataField = "pdate";
this.fpSpread2_Sheet1.Columns.Get(2).Label = "시작일";
this.fpSpread2_Sheet1.Columns.Get(2).Width = 84F;
this.fpSpread2_Sheet1.Columns.Get(3).CellType = textCellType12;
this.fpSpread2_Sheet1.Columns.Get(3).CellType = textCellType24;
this.fpSpread2_Sheet1.Columns.Get(3).DataField = "edate";
this.fpSpread2_Sheet1.Columns.Get(3).Label = "완료일";
this.fpSpread2_Sheet1.Columns.Get(3).Width = 76F;
numberCellType3.DecimalPlaces = 0;
numberCellType3.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType3.MaximumValue = 2147483647D;
numberCellType3.MinimumValue = -2147483648D;
this.fpSpread2_Sheet1.Columns.Get(4).CellType = numberCellType3;
numberCellType6.DecimalPlaces = 0;
numberCellType6.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType6.MaximumValue = 2147483647D;
numberCellType6.MinimumValue = -2147483648D;
this.fpSpread2_Sheet1.Columns.Get(4).CellType = numberCellType6;
this.fpSpread2_Sheet1.Columns.Get(4).DataField = "process";
this.fpSpread2_Sheet1.Columns.Get(4).Label = "진행";
this.fpSpread2_Sheet1.Columns.Get(4).Width = 77F;
@@ -1221,15 +1225,15 @@
this.pdateDataGridViewTextBoxColumn,
this.remarkDataGridViewTextBoxColumn});
this.dataGridView1.DataSource = this.bsReason;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.Padding = new System.Windows.Forms.Padding(1, 2, 1, 2);
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(1, 2, 1, 2);
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(10, 24);
this.dataGridView1.Name = "dataGridView1";
@@ -1250,8 +1254,8 @@
//
this.remarkDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.remarkDataGridViewTextBoxColumn.DataPropertyName = "remark";
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.remarkDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.remarkDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3;
this.remarkDataGridViewTextBoxColumn.HeaderText = "사유";
this.remarkDataGridViewTextBoxColumn.Name = "remarkDataGridViewTextBoxColumn";
//
@@ -1414,6 +1418,20 @@
//
this.taReason.ClearBeforeFill = true;
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25);
//
// toolStripButton19
//
this.toolStripButton19.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton19.Image")));
this.toolStripButton19.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton19.Name = "toolStripButton19";
this.toolStripButton19.Size = new System.Drawing.Size(119, 22);
this.toolStripButton19.Text = "변경 스케쥴 추가";
this.toolStripButton19.Click += new System.EventHandler(this.toolStripButton19_Click);
//
// fProjectSchedule
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -1570,5 +1588,7 @@
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
private System.Windows.Forms.DataGridViewTextBoxColumn pdateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn remarkDataGridViewTextBoxColumn;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripButton toolStripButton19;
}
}

View File

@@ -27,22 +27,22 @@ namespace FPJ0000
this.FormClosed += FProjectSchedule_FormClosed;
this.FormClosing += FProjectSchedule_FormClosing;
this.dsPRJ.EETGW_ProjectsSchedule.TableNewRow += ProjectsSchedule_TableNewRow;
//this.dsPRJ.EETGW_ProjectReson.TableNewRow += EETGW_ProjectReson_TableNewRow;
//this.dsPRJ.EETGW_ProjectReson.TableNewRow += EETGW_ProjectReson_TableNewRow;
this.KeyDown += FProjectSchedule_KeyDown;
this.KeyDown += FProjectSchedule_KeyDown;
}
private void FProjectSchedule_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.F11)
{
private void FProjectSchedule_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F11)
{
var cur = this.panel2.Visible;
panel4.Visible = !cur;
panel2.Visible = !cur;
}
}
}
}
private void FProjectSchedule_FormClosing(object sender, FormClosingEventArgs e)
private void FProjectSchedule_FormClosing(object sender, FormClosingEventArgs e)
{
this.Validate();
this.bs.EndEdit();
@@ -66,19 +66,19 @@ namespace FPJ0000
}
private void EETGW_ProjectReson_TableNewRow(object sender, DataTableNewRowEventArgs e)
{
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
e.Row["project"] = this.projectindex;
e.Row["gcode"] = FCOMMON.info.Login.gcode;
if (e.Row["wuid"] == null) e.Row["wuid"] = FCOMMON.info.Login.no;
if (e.Row["wdate"] == null) e.Row["wdate"] = DateTime.Now;
if (e.Row["project"] == null) e.Row["project"] = this.projectindex;
if (e.Row["gcode"] == null) e.Row["gcode"] = FCOMMON.info.Login.gcode;
}
void ProjectsSchedule_TableNewRow(object sender, DataTableNewRowEventArgs e)
{
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
e.Row["project"] = this.projectindex;
e.Row["appoval"] = 0; //신규추가는 확정안되는 데이터이다
e.Row["no"] = int.Parse(this.comboBox1.Text);
if (e.Row["wuid"] == null) e.Row["wuid"] = FCOMMON.info.Login.no;
if (e.Row["wdate"] == null) e.Row["wdate"] = DateTime.Now;
if (e.Row["project"] == null) e.Row["project"] = this.projectindex;
if (e.Row["appoval"] == null) e.Row["appoval"] = 0; //신규추가는 확정안되는 데이터이다
if (e.Row["no"] == null) e.Row["no"] = int.Parse(this.comboBox1.Text);
}
private void fProjectSchedule_Load(object sender, EventArgs e)
@@ -96,11 +96,15 @@ namespace FPJ0000
var db = new EEEntities();
var nolist = db.EETGW_ProjectsSchedule.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == this.projectindex).GroupBy(t => t.no).ToList();
this.comboBox1.Items.Clear();
foreach (var item in nolist)
if (nolist.Any())
{
if (item.Key == null) this.comboBox1.Items.Add("1");
else this.comboBox1.Items.Add(item.Key.ToString());
foreach (var item in nolist)
{
if (item.Key == null) continue;
this.comboBox1.Items.Add(item.Key.ToString());
}
}
db.Dispose();
if (this.comboBox1.Items.Count == 0)
@@ -110,11 +114,8 @@ namespace FPJ0000
this.comboBox1.Items.Add("1");
this.comboBox1.SelectedIndex = 0;
}
else
{
this.comboBox1.SelectedIndex = this.comboBox1.Items.Count - 1;
}
this.comboBox1.Items.Add("스케쥴 추가");
// this.comboBox1.Items.Add("스케쥴 추가");
RefreshData();
@@ -131,6 +132,13 @@ namespace FPJ0000
cmd.Connection.Close();
cmd.Dispose();
bInit = true;
if (this.comboBox1.Items.Count > 0)
{
this.comboBox1.SelectedIndex = this.comboBox1.Items.Count - 1;
}
}
int CWW = 0;
@@ -147,14 +155,13 @@ namespace FPJ0000
}
void RefreshData()
{
var scno = int.Parse(comboBox1.Text);
// var scno = int.Parse(comboBox1.Text);
try
{
//list = db.EETGW_ProjectsSchedule.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == this.projectindex).OrderBy(t => t.seq).ToList();
this.ta.Fill(this.dsPRJ.EETGW_ProjectsSchedule, FCOMMON.info.Login.gcode, this.projectindex, scno);
this.ta.Fill(this.dsPRJ.EETGW_ProjectsSchedule, FCOMMON.info.Login.gcode, this.projectindex);
this.taTodo.Fill(this.dsPRJ.EETGW_ProjectToDo, this.projectindex);
this.taReason.Fill(this.dsPRJ.EETGW_ProjectReson, FCOMMON.info.Login.gcode, this.projectindex, int.Parse(comboBox1.Text));
this.taReason.Fill(this.dsPRJ.EETGW_ProjectReson, FCOMMON.info.Login.gcode, this.projectindex);
//this.bs.DataSource = list;//.ToList();// db.EETGW_ProjectsSchedule.Local;
//this.fpSpread1_Sheet1.DataSource = this.bs;
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize1);
@@ -166,41 +173,6 @@ namespace FPJ0000
}
Application.DoEvents();
//해당스케쥴의 승인상태를 확인
var db = new EEEntities();
var dr = db.EETGW_ProjectsSchedule.Where(t => t.project == this.projectindex && t.no == scno).FirstOrDefault();
if (dr == null || dr.appoval == 0)
{
chkapp1.Checked = false;
chkapp2.Checked = false;
}
else if (dr.appoval == 1)
{
chkapp1.Checked = true;
chkapp2.Checked = false;
this.fpSpread1.Sheets[0].Columns[2].Locked = true;
this.fpSpread1.Sheets[0].Columns[3].Locked = true;
this.fpSpread1.Sheets[0].Columns[2].BackColor = Color.FromArgb(230, 230, 230);
this.fpSpread1.Sheets[0].Columns[3].BackColor = Color.FromArgb(230, 230, 230);
}
else
{
chkapp1.Checked = true;
chkapp2.Checked = true;
this.fpSpread1.Sheets[0].Columns[2].Locked = true;
this.fpSpread1.Sheets[0].Columns[3].Locked = true;
this.fpSpread1.Sheets[0].Columns[2].BackColor = Color.FromArgb(230, 230, 230);
this.fpSpread1.Sheets[0].Columns[3].BackColor = Color.FromArgb(230, 230, 230);
}
}
@@ -264,6 +236,8 @@ namespace FPJ0000
newdr.project = this.projectindex;
newdr.seq = this.bs.Count + 1;
newdr.gcode = FCOMMON.info.Login.gcode;
newdr.no = int.Parse(comboBox1.Text);
newdr.memo = string.Empty;
dsPRJ.EETGW_ProjectsSchedule.AddEETGW_ProjectsScheduleRow(newdr);
this.bs.EndEdit();
@@ -299,7 +273,13 @@ namespace FPJ0000
bnTodo.Enabled = true;
this.bsTodo.Filter = "pseq=" + dr.idx; //해당데이터만 처리하게 한다
this.bsReason.Filter = "pseq=" + dr.idx;
if (int.TryParse(comboBox1.Text, out int pno))
{
var filter_reason = $"no={pno} and pseq={ dr.idx}";
this.bsReason.Filter = filter_reason;
}
}
}
@@ -379,7 +359,9 @@ namespace FPJ0000
private void panel1_Paint(object sender, PaintEventArgs e)
{
var list = this.dsPRJ.EETGW_ProjectsSchedule.Where(t => t.RowState != DataRowState.Deleted).Where(t => t.RowState != DataRowState.Detached).OrderBy(t => t.seq).ToList();
if (int.TryParse(comboBox1.Text, out int scno) == false) return;
var list = this.dsPRJ.EETGW_ProjectsSchedule.Where(t => t.RowState != DataRowState.Deleted).Where(t => t.RowState != DataRowState.Detached).Where(t=>t.no == scno).OrderBy(t => t.seq).ToList();
e.Graphics.Clear(Color.DimGray);
//e.Graphics.DrawString(list.Count.ToString(), this.Font, Brushes.White, 10, 10);
var colsize = new int[] { 50 };
@@ -389,7 +371,7 @@ namespace FPJ0000
if (list == null || list.Count < 1) return;
var totalProgress = list.Sum(t=>t.progress) / list.Count();
var totalProgress = list.Sum(t => t.progress) / list.Count();
var vsw_s = list.Max(t => t.sw);
var vew_s = list.Max(t => t.ew);
@@ -459,7 +441,7 @@ namespace FPJ0000
var curyw = $"{DateTime.Now.Year.ToString("0000").Substring(2)}y{this.CWW:00}w";
var curww = int.Parse($"{DateTime.Now.Year.ToString("0000").Substring(2)}{this.CWW:00}");
var ProjecComplete = totalProgress > 99;
if(ProjecComplete == false)
if (ProjecComplete == false)
{
maxw = Math.Max(curww, maxw);
}
@@ -482,7 +464,7 @@ namespace FPJ0000
var ci = 0;
var titlewi = 200f;
var twidth = (rect_title.Width - titlewi) / (cols.Count - 1);
foreach (var col in cols)
{
@@ -500,7 +482,7 @@ namespace FPJ0000
e.Graphics.DrawString(col, this.Font, Brushes.White, rect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
e.Graphics.DrawRectangle(Pens.Black, rect.Left, rect.Top, rect.Width, rect.Height);
ci += 1;
}
@@ -563,7 +545,7 @@ namespace FPJ0000
ci = 0;
foreach (var col in cols)
{
var ww = ci == 0 ? 0 : int.Parse(col.Substring(0, 2) + col.Substring(3,2));// minw + (ci - 1);
var ww = ci == 0 ? 0 : int.Parse(col.Substring(0, 2) + col.Substring(3, 2));// minw + (ci - 1);
var titleWidth = ci == 0 ? titlewi : twidth;
var padX = ci > 0 ? ((ci - 1) * twidth + titlewi) : 0;
@@ -580,7 +562,7 @@ namespace FPJ0000
if (ci == 0)
{
//각 담당자 이름과 항목 이름을 표시한다
if(isBusy==false)
if (isBusy == false)
{
e.Graphics.DrawString(str + "\n" + dr.uid,
this.Font,
@@ -591,7 +573,7 @@ namespace FPJ0000
}
else
{
if(dr.progress < 1)
if (dr.progress < 1)
{
e.Graphics.DrawString(str + "\n" + dr.uid + $"\n\n[시작 안함]",
this.Font,
@@ -609,13 +591,13 @@ namespace FPJ0000
new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center }
);
}
}
}
else
{
if(col == "22y02w" && ew == 2202)
if (col == "22y02w" && ew == 2202)
Console.WriteLine("sdf");
//plan
@@ -796,11 +778,46 @@ namespace FPJ0000
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (bInit == false) return;
if (comboBox1.SelectedIndex == this.comboBox1.Items.Count - 1)
//해당 데이터만 표시한다.
this.bs.Filter = "no = " + this.comboBox1.Text;
this.bs.Sort = "seq";
this.bsReason.Filter = "no = " + this.comboBox1.Text;
//해당스케쥴의 승인상태를 확인
var scno = int.Parse(comboBox1.Text);
var db = new EEEntities();
var dr = db.EETGW_ProjectsSchedule.Where(t => t.project == this.projectindex && t.no == scno).FirstOrDefault();
if (dr == null || dr.appoval == 0)
{
util.MsgE("스케쥴 신규 추가 기능은 준비 중 입니다");
this.comboBox1.SelectedIndex = this.comboBox1.Items.Count - 2;
chkapp1.Checked = false;
chkapp2.Checked = false;
}
else if (dr.appoval == 1)
{
chkapp1.Checked = true;
chkapp2.Checked = false;
this.fpSpread1.Sheets[0].Columns[2].Locked = true;
this.fpSpread1.Sheets[0].Columns[3].Locked = true;
this.fpSpread1.Sheets[0].Columns[2].BackColor = Color.FromArgb(230, 230, 230);
this.fpSpread1.Sheets[0].Columns[3].BackColor = Color.FromArgb(230, 230, 230);
}
else
{
chkapp1.Checked = true;
chkapp2.Checked = true;
this.fpSpread1.Sheets[0].Columns[2].Locked = true;
this.fpSpread1.Sheets[0].Columns[3].Locked = true;
this.fpSpread1.Sheets[0].Columns[2].BackColor = Color.FromArgb(230, 230, 230);
this.fpSpread1.Sheets[0].Columns[3].BackColor = Color.FromArgb(230, 230, 230);
}
this.panel1.Refresh();
}
private void toolStripButton15_Click(object sender, EventArgs e)
@@ -844,5 +861,48 @@ namespace FPJ0000
{
}
private void toolStripButton19_Click(object sender, EventArgs e)
{
var dlg = util.MsgQ("스케쥴을 추가 하시겠습니까? 스케쥴 추가는 각 관리자에 협의 후 하시기 바랍니다");
if (dlg != DialogResult.Yes) return;
int maxno = 1;
var maxdata = dsPRJ.EETGW_ProjectsSchedule.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == this.projectindex);
if (maxdata.Any() == false) maxno = maxdata.Max(t => t.no);
var newno = maxno + 1;
this.comboBox1.Items.Add($"{newno}");
//기존목록을 복사함
var seq = 1;
foreach (dsPRJ.EETGW_ProjectsScheduleRow dr in this.dsPRJ.EETGW_ProjectsSchedule.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == this.projectindex && t.no == maxno).OrderBy(t => t.seq))
{
var newdr = this.dsPRJ.EETGW_ProjectsSchedule.NewEETGW_ProjectsScheduleRow();
newdr.no = newno;
newdr.seq = seq++;
newdr.wuid = FCOMMON.info.Login.no;
newdr.wdate = DateTime.Now;
newdr.gcode = dr.gcode;
newdr.project = dr.project;
newdr.title = dr.title;
newdr.sw = dr.sw;
newdr.ew = dr.ew;
newdr.swa = dr.swa;
newdr.ewa = dr.ewa;
newdr.memo = dr.memo;
newdr.progress = dr.progress;
newdr.uid = dr.uid;
newdr.appoval = 0;
newdr.cate = dr.cate;
if (newdr.IsmemoNull()) newdr.memo = string.Empty;
dsPRJ.EETGW_ProjectsSchedule.AddEETGW_ProjectsScheduleRow(newdr);
newdr.EndEdit();
}
this.comboBox1.SelectedIndex = this.comboBox1.Items.Count - 1;
}
}
}

View File

@@ -247,11 +247,29 @@
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton19.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="cm1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>239, 17</value>
</metadata>
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>653, 56</value>
</metadata>
<data name="autoToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhEAAQAIQfAJXG2JXa+ZLO5ChrlkCy4TZ1kiVvpCN0trvo9SN5xTd4lrfh7iR9zo3S+EGz7JDJ
@@ -291,12 +309,18 @@
vmv/Akgg2IMBDgsSdJwcAEICDhoECjDAmQIFBQouXNiwQYPOgqgLBgQAOw==
</value>
</data>
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>653, 56</value>
<metadata name="bnTodo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>624, 17</value>
</metadata>
<metadata name="cm2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1023, 17</value>
</metadata>
<metadata name="fpSpread2_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>719, 17</value>
</metadata>
<metadata name="bsTodo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>440, 17</value>
</metadata>
<data name="toolStripMenuItem3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhEAAQAIQfAJXG2JXa+ZLO5ChrlkCy4TZ1kiVvpCN0trvo9SN5xTd4lrfh7iR9zo3S+EGz7JDJ
@@ -336,12 +360,6 @@
vmv/Akgg2IMBDgsSdJwcAEICDhoECjDAmQIFBQouXNiwQYPOgqgLBgQAOw==
</value>
</data>
<metadata name="fpSpread2_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>719, 17</value>
</metadata>
<metadata name="bsTodo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>440, 17</value>
</metadata>
<metadata name="bnTodo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>624, 17</value>
</metadata>
@@ -434,9 +452,15 @@
<metadata name="bsPrjinfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1098, 17</value>
</metadata>
<metadata name="bsPrjinfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1098, 17</value>
</metadata>
<metadata name="taProjectInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="bnReason.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>255, 56</value>
</metadata>
<metadata name="bsReason.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>411, 56</value>
</metadata>