This commit is contained in:
chi
2024-11-13 17:21:49 +09:00
parent a1cb35070e
commit e6f2ce845f
12 changed files with 324 additions and 264 deletions

View File

@@ -121,6 +121,7 @@
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
this.exportDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -562,6 +563,7 @@
this.toolStripMenuItem3,
this.exportDataToolStripMenuItem,
this.toolStripMenuItem4,
this.toolStripMenuItem8,
this.ToolStripMenuItem,
this.toolStripMenuItem2,
this.ToolStripMenuItem,
@@ -574,7 +576,7 @@
this.toolStripMenuItem5,
this.SAP구매정보생성ToolStripMenuItem});
this.cm1.Name = "contextMenuStrip1";
this.cm1.Size = new System.Drawing.Size(449, 454);
this.cm1.Size = new System.Drawing.Size(449, 496);
//
// columnSizeToolStripMenuItem
//
@@ -636,6 +638,13 @@
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(445, 6);
//
// toolStripMenuItem8
//
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
this.toolStripMenuItem8.Size = new System.Drawing.Size(448, 42);
this.toolStripMenuItem8.Text = "상태 일괄 변경";
this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
//
// 입고ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "입고ToolStripMenuItem";
@@ -1177,6 +1186,8 @@
this.fpSpread1_Sheet1.Columns.Get(16).Tag = "pumunit";
this.fpSpread1_Sheet1.Columns.Get(16).Width = 51F;
numberCellType4.DecimalPlaces = 2;
numberCellType4.Separator = ",";
numberCellType4.ShowSeparator = true;
this.fpSpread1_Sheet1.Columns.Get(17).CellType = numberCellType4;
this.fpSpread1_Sheet1.Columns.Get(17).DataField = "pumpriceD";
this.fpSpread1_Sheet1.Columns.Get(17).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
@@ -1458,6 +1469,7 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem6;
private System.Windows.Forms.ToolStripMenuItem btMakeItemsData;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem8;
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
}
}

View File

@@ -112,7 +112,7 @@ namespace FEQ0000
this.dtED.Text = DateTime.Now.AddDays(10).ToShortDateString();
var gcode = FCOMMON.info.Login.gcode;
var sdatestr = FCOMMON.DBM.ExecuteScalar($"select min(pdate) from EETGW_PurchaseCR where gcode='{gcode}' and [state] in ('---','PO','PR')");
var sdatestr = FCOMMON.DBM.ExecuteScalar($"select min(pdate) from EETGW_PurchaseCR with(nolock) where gcode='{gcode}' and [state] in ('---','PO','PR')");
if (DateTime.TryParse(sdatestr, out DateTime sdate))
dtSD.Text = sdate.ToShortDateString();
@@ -142,12 +142,14 @@ namespace FEQ0000
{
btSave.Visible = true;
ToolStripMenuItem.Visible = true;
toolStripMenuItem8.Visible = true;
//fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.Normal;
//fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell;
//fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.MultiSelect;
}
else
{
toolStripMenuItem8.Visible = false;
btMakeItemsData.Visible = false;
ToolStripMenuItem.Visible = false;
btSave.Visible = false;
@@ -198,7 +200,7 @@ namespace FEQ0000
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandText = " select *,dbo.getusername(request) as requestName,dbo.getusername(receive) as receiveName" +
" from EETGW_PurchaseCR " +
" from EETGW_PurchaseCR with(nolock) " +
" where gcode='" + FCOMMON.info.Login.gcode + "' and isnull(" + dateField + ",'') between @sd and @ed ";
@@ -1529,5 +1531,42 @@ namespace FEQ0000
}
}
}
private void toolStripMenuItem8_Click(object sender, EventArgs e)
{
var selected = this.fpSpread1_Sheet1.GetSelections(); //선택된 개체확인
List<int> rows = new List<int>();
foreach (var item in selected)
{
for (int i = item.Row; i < item.Row + item.RowCount; i++)
{
if (rows.Contains(i) == false)
{
if (fpSpread1_Sheet1.IsRowBound(i))
{
rows.Add(i);
}
}
}
}
//이대상의 실제 데이터베이스 인덱스값을 생성해서 폼에 전송한다.
var codlist = DBM.getCodeList("04");
var f = new FEQ0000.Purchase.fBatchUpdate(rows);
if (f.ShowDialog() != DialogResult.OK) return;
var colstat = fpSpread1_Sheet1.Columns["state"];
var value = f.cmbState.Text;
foreach (var rowindex in rows)
{
fpSpread1_Sheet1.SetValue(rowindex, colstat.Index, value);
}
FCOMMON.Util.MsgI($"{rows.Count} 건의 자료가 변경되었습니다\n저장 버튼을 누르면 적용 됩니다\n취소하려면 새로고침을 누르세요");
}
}
}

View File

@@ -189,7 +189,7 @@ namespace FEQ0000
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandText = " select *,dbo.getusername(request) as requestName,dbo.getusername(receive) as receiveName" +
" from EETGW_PurchaseEB " +
" from EETGW_PurchaseEB with(nolock) " +
" where gcode='" + FCOMMON.info.Login.gcode + "' and isnull(" + dateField + ",'') between @sd and @ed ";
if (btViewDel.Checked == false)

View File

@@ -158,9 +158,9 @@
this.btViewDel = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
((System.ComponentModel.ISupportInitialize)(this.dsPurchase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
@@ -936,6 +936,31 @@
this.fpSpread1.EditModeOff += new System.EventHandler(this.fpSpread1_EditModeOff);
this.fpSpread1.ClipboardPasted += new FarPoint.Win.Spread.ClipboardPastedEventHandler(this.fpSpread1_ClipboardPasted);
this.fpSpread1.CellClick += new FarPoint.Win.Spread.CellClickEventHandler(this.fpSpread1_CellClick);
this.fpSpread1.SetViewportLeftColumn(0, 0, 13);
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label1.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label1.Location = new System.Drawing.Point(0, 639);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label1.Size = new System.Drawing.Size(1334, 23);
this.label1.TabIndex = 6;
this.label1.Text = "--";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label2.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label2.Location = new System.Drawing.Point(0, 616);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label2.Size = new System.Drawing.Size(1334, 23);
this.label2.TabIndex = 7;
this.label2.Text = "--";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// fpSpread1_Sheet1
//
@@ -1143,6 +1168,8 @@
this.fpSpread1_Sheet1.Columns.Get(22).Label = "단위";
this.fpSpread1_Sheet1.Columns.Get(22).Width = 51F;
numberCellType4.DecimalPlaces = 2;
numberCellType4.Separator = ",";
numberCellType4.ShowSeparator = true;
this.fpSpread1_Sheet1.Columns.Get(23).CellType = numberCellType4;
this.fpSpread1_Sheet1.Columns.Get(23).DataField = "pumpriceD";
this.fpSpread1_Sheet1.Columns.Get(23).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
@@ -1301,30 +1328,6 @@
this.fpSpread1_Sheet1.ShowRowSelector = true;
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label1.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label1.Location = new System.Drawing.Point(0, 639);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label1.Size = new System.Drawing.Size(1334, 23);
this.label1.TabIndex = 6;
this.label1.Text = "--";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label2.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label2.Location = new System.Drawing.Point(0, 616);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label2.Size = new System.Drawing.Size(1334, 23);
this.label2.TabIndex = 7;
this.label2.Text = "--";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// fPurchaseNR
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);

View File

@@ -228,7 +228,7 @@ namespace FEQ0000
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandText = " select *,dbo.getusername(request) as requestName,dbo.getusername(receive) as receiveName" +
" from purchase " +
" from purchase with(nolock) " +
" where gcode='" + FCOMMON.info.Login.gcode + "' and isnull(" + dateField + ",'') between @sd and @ed ";