주문내역 엑셀 업로드기능에서 공백제거 추가, 주문내역에서 품목정보 생성하는 기능 추가(관리자)

This commit is contained in:
chi
2024-01-26 11:33:04 +09:00
parent 5d7945d5c9
commit d2c5ed6bd4
39 changed files with 1198 additions and 968 deletions

View File

@@ -147,6 +147,7 @@
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btMakeItemsData = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.dsPurchase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
@@ -259,7 +260,6 @@
//
this.bindingNavigatorPositionItem.AccessibleName = "위치";
this.bindingNavigatorPositionItem.AutoSize = false;
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
this.bindingNavigatorPositionItem.Text = "0";
@@ -386,7 +386,6 @@
// tbFind
//
this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbFind.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.tbFind.Name = "tbFind";
this.tbFind.Size = new System.Drawing.Size(100, 26);
this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbFind_KeyDown);
@@ -412,7 +411,8 @@
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.toolStripMenuItem2});
this.toolStripMenuItem2,
this.btMakeItemsData});
this.toolStripButton7.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton7.Image")));
this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton7.Name = "toolStripButton7";
@@ -429,7 +429,7 @@
this.ToolStripMenuItem});
this.ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("메일전송ToolStripMenuItem.Image")));
this.ToolStripMenuItem.Name = "메일전송ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(226, 22);
this.ToolStripMenuItem.Text = "메일 전송";
//
// 현재목록ToolStripMenuItem
@@ -469,7 +469,7 @@
//
this.ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("엑셀에서가져오기ToolStripMenuItem.Image")));
this.ToolStripMenuItem.Name = "엑셀에서가져오기ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(226, 22);
this.ToolStripMenuItem.Text = "엑셀에서 가져오기";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
@@ -477,14 +477,14 @@
//
this.ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("견적서폴더열기ToolStripMenuItem.Image")));
this.ToolStripMenuItem.Name = "견적서폴더열기ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(226, 22);
this.ToolStripMenuItem.Text = "견적서 폴더 열기";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(171, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(223, 6);
//
// toolStripButton6
//
@@ -511,14 +511,14 @@
// 집계표ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "집계표ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Text = "집계표";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 구매승인양식ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "구매승인양식ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Text = "구매승인 양식";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
@@ -697,7 +697,6 @@
// dtSD
//
this.dtSD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dtSD.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.dtSD.Name = "dtSD";
this.dtSD.Size = new System.Drawing.Size(75, 37);
this.dtSD.Text = "1982-11-23";
@@ -714,7 +713,6 @@
// dtED
//
this.dtED.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dtED.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.dtED.Name = "dtED";
this.dtED.Size = new System.Drawing.Size(75, 37);
this.dtED.Text = "1982-11-23";
@@ -770,7 +768,6 @@
// tbRequest
//
this.tbRequest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbRequest.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.tbRequest.Name = "tbRequest";
this.tbRequest.Size = new System.Drawing.Size(70, 37);
this.tbRequest.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
@@ -1210,6 +1207,13 @@
this.label2.Text = "--";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btMakeItemsData
//
this.btMakeItemsData.Name = "btMakeItemsData";
this.btMakeItemsData.Size = new System.Drawing.Size(226, 22);
this.btMakeItemsData.Text = "구매내역에서 품목정보 생성";
this.btMakeItemsData.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
//
// fPurchaseEB
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -1327,5 +1331,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem btMakeItemsData;
}
}

View File

@@ -137,6 +137,7 @@ namespace FEQ0000
}
else
{
btMakeItemsData.Visible = false;
ToolStripMenuItem.Enabled = false;
ToolStripMenuItem.Enabled = false;
btSave.Visible = false;
@@ -1668,5 +1669,15 @@ namespace FEQ0000
{
MailSendNoForm(false, "PF");
}
private void toolStripMenuItem6_Click(object sender, EventArgs e)
{
var ta = new dsPurchaseTableAdapters.QueriesTableAdapter();
var dlg = FCOMMON.Util.MsgQ("구매내역에서 품목정보를 생성합니다, 중복되는 sid는 업데이트 되지 않습니다\n" +
"완료메시지 나올떄까지 기다려주세요");
if (dlg != DialogResult.Yes) return;
ta.PurchaseDataToItemsEB(FCOMMON.info.Login.gcode);
FCOMMON.Util.MsgI("업데이트 완료");
}
}
}

View File

@@ -47,7 +47,6 @@
System.Windows.Forms.Label label11;
System.Windows.Forms.Label label14;
System.Windows.Forms.Label label15;
System.Windows.Forms.Label label9;
System.Windows.Forms.Label label18;
System.Windows.Forms.Label label2;
this.tbSC = new System.Windows.Forms.TextBox();
@@ -95,6 +94,7 @@
this.dsPurchase = new FEQ0000.dsPurchase();
this.purchaseBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.purchaseTableAdapter = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter();
this.lbcurrentwon = new System.Windows.Forms.Label();
receiveLabel = new System.Windows.Forms.Label();
scLabel = new System.Windows.Forms.Label();
sidLabel = new System.Windows.Forms.Label();
@@ -112,7 +112,6 @@
label11 = new System.Windows.Forms.Label();
label14 = new System.Windows.Forms.Label();
label15 = new System.Windows.Forms.Label();
label9 = new System.Windows.Forms.Label();
label18 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
@@ -295,18 +294,6 @@
label15.TabIndex = 14;
label15.Text = "실 구매 수량";
//
// label9
//
label9.AutoSize = true;
label9.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
label9.ForeColor = System.Drawing.Color.Blue;
label9.Location = new System.Drawing.Point(371, 200);
label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label9.Name = "label9";
label9.Size = new System.Drawing.Size(99, 30);
label9.TabIndex = 20;
label9.Text = "해외물품은\r\n좌측 단가를 입력";
//
// label18
//
label18.AutoSize = true;
@@ -556,6 +543,7 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lbcurrentwon);
this.groupBox1.Controls.Add(this.cmbDept);
this.groupBox1.Controls.Add(label2);
this.groupBox1.Controls.Add(this.cmbSite);
@@ -567,7 +555,6 @@
this.groupBox1.Controls.Add(this.tbBigoChk);
this.groupBox1.Controls.Add(label14);
this.groupBox1.Controls.Add(label10);
this.groupBox1.Controls.Add(label9);
this.groupBox1.Controls.Add(this.tbPumPriceD);
this.groupBox1.Controls.Add(label8);
this.groupBox1.Controls.Add(this.button2);
@@ -649,11 +636,12 @@
this.cmbCurrency.FormattingEnabled = true;
this.cmbCurrency.Items.AddRange(new object[] {
"USD"});
this.cmbCurrency.Location = new System.Drawing.Point(274, 202);
this.cmbCurrency.Location = new System.Drawing.Point(219, 202);
this.cmbCurrency.Margin = new System.Windows.Forms.Padding(4);
this.cmbCurrency.Name = "cmbCurrency";
this.cmbCurrency.Size = new System.Drawing.Size(89, 28);
this.cmbCurrency.TabIndex = 50;
this.cmbCurrency.SelectedIndexChanged += new System.EventHandler(this.cmbCurrency_SelectedIndexChanged);
//
// tbQtyReal
//
@@ -684,7 +672,7 @@
this.tbPumPriceD.Location = new System.Drawing.Point(94, 203);
this.tbPumPriceD.Margin = new System.Windows.Forms.Padding(4);
this.tbPumPriceD.Name = "tbPumPriceD";
this.tbPumPriceD.Size = new System.Drawing.Size(178, 27);
this.tbPumPriceD.Size = new System.Drawing.Size(122, 27);
this.tbPumPriceD.TabIndex = 19;
this.tbPumPriceD.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.tbPumPriceD.TextChanged += new System.EventHandler(this.tbDolloerPrice_TextChanged);
@@ -838,6 +826,18 @@
//
this.purchaseTableAdapter.ClearBeforeFill = true;
//
// lbcurrentwon
//
this.lbcurrentwon.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbcurrentwon.ForeColor = System.Drawing.Color.Blue;
this.lbcurrentwon.Location = new System.Drawing.Point(312, 202);
this.lbcurrentwon.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbcurrentwon.Name = "lbcurrentwon";
this.lbcurrentwon.Size = new System.Drawing.Size(161, 28);
this.lbcurrentwon.TabIndex = 55;
this.lbcurrentwon.Text = "통화기호를 선택하세요";
this.lbcurrentwon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// fPurchaseEB_Add
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -915,5 +915,6 @@
private System.Windows.Forms.DateTimePicker dtExpDate;
private System.Windows.Forms.CheckBox chkExp;
private System.Windows.Forms.ComboBox cmbDept;
private System.Windows.Forms.Label lbcurrentwon;
}
}

View File

@@ -577,6 +577,13 @@ namespace FEQ0000
}
}
if (dr.RowState == DataRowState.Detached && vqtyreq < 1)
{
Util.MsgE($"요청수량을 입력하세요");
tbQtyReq.Focus();
return false;
}
dr.pumqty = vqtyreal;// int.Parse(tbPumQty.Text);
dr.pumqtyReq = vqtyreq;// int.Parse(tbpumqtyReq.Text);
dr.pumprice = vpumprice;// decimal.Parse(tbPumPrice.Text);
@@ -592,6 +599,12 @@ namespace FEQ0000
if (vqtyreal > 0) dr.pumamt = dr.pumqty * dr.pumprice;
else dr.pumamt = dr.pumqtyReq * dr.pumprice;
if (dr.pumamt < 1)
{
FCOMMON.Util.MsgE($"금액이 없습니다. 단가 및 수량을 확인하세요\n해외 통화를 사용할 경우 환율을 고려한 국내단가를 입력해주세요\n환율을 자동으로 입력하려면 공용코드(69)의 FValue 에 값을 입력하세요");
return false;
}
if (tbPumIDX.Text == "" || tbPumIDX.Text == "-1") dr.SetpumidxNull();
else dr.pumidx = int.Parse(tbPumIDX.Text);
dr.sid = tbSID.Text.Trim();
@@ -832,7 +845,8 @@ namespace FEQ0000
{
if (decimal.TryParse(tbPumPriceD.Text.Replace(",", ""), out decimal priced))
{
var price = FCOMMON.info.dollertowon * (double)priced;
var curr = lbcurrentwon.Tag != null ? (float)lbcurrentwon.Tag : 0;
var price = curr * (double)priced;
tbPumPrice.Text = (Math.Ceiling(price)).ToString("N0");
}
else tbPumPrice.Text = "0";
@@ -847,5 +861,43 @@ namespace FEQ0000
{
this.dtExpDate.Enabled = chkExp.Checked;
}
private void cmbCurrency_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbCurrency.SelectedIndex >= 0)
{
var val = cmbCurrency.SelectedValue.ToString();
var dt = cmbCurrency.DataSource as DataTable;
var v = dt.AsEnumerable().Where(t => t.Field<String>("Value") == val).FirstOrDefault();
if (v != null)
{
var price = v.Field<float>("FValue");
lbcurrentwon.Text = $"환율:{price}원";
lbcurrentwon.Tag = price;
//if (binit)
//{
// if (decimal.TryParse(tbPumPriceD.Text,out decimal priced))
// {
// if (priced > 0)
// dr.pumamt = priced * (decimal)price;
// }
//}
}
else
{
lbcurrentwon.Text = $"환율이 입력되지 않았습니다";
lbcurrentwon.Tag = 0;
}
}
else
{
lbcurrentwon.Text = "통화기호를 선택하세요";
lbcurrentwon.Tag = 0;
}
}
}
}

View File

@@ -185,9 +185,6 @@
<metadata name="label15.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label9.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label18.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>