This commit is contained in:
chikyun.kim
2018-12-08 15:12:15 +09:00
parent 3f68c3c5e8
commit 43841e6c52
43 changed files with 6312 additions and 1015 deletions

View File

@@ -109,7 +109,6 @@
<Compile Include="Equipment\fImpEquipment.Designer.cs">
<DependentUpon>fImpEquipment.cs</DependentUpon>
</Compile>
<Compile Include="FPUtil.cs" />
<Compile Include="MethodExtentions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@@ -28,7 +28,6 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fPurchase));
FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType();
@@ -53,10 +52,10 @@
FarPoint.Win.Spread.CellType.TextCellType textCellType16 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType17 = new FarPoint.Win.Spread.CellType.TextCellType();
this.dsPurchase = new FEQ0000.dsPurchase();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.bs = new System.Windows.Forms.BindingSource();
this.ta = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter();
this.tam = new FEQ0000.dsPurchaseTableAdapters.TableAdapterManager();
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
this.bn = new System.Windows.Forms.BindingNavigator();
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
@@ -78,7 +77,7 @@
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.tbFind = new System.Windows.Forms.ToolStripTextBox();
this.btFind = new System.Windows.Forms.ToolStripButton();
this.cm1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cm1 = new System.Windows.Forms.ContextMenuStrip();
this.columnSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -87,6 +86,7 @@
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.copyDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.viewThisUserDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -146,6 +146,7 @@
this.bn.CountItem = this.bindingNavigatorCountItem;
this.bn.DeleteItem = null;
this.bn.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bn.ImageScalingSize = new System.Drawing.Size(24, 24);
this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.bindingNavigatorMoveFirstItem,
this.bindingNavigatorMovePreviousItem,
@@ -168,21 +169,21 @@
this.toolStripLabel2,
this.tbFind,
this.btFind});
this.bn.Location = new System.Drawing.Point(0, 493);
this.bn.Location = new System.Drawing.Point(0, 573);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn.Name = "bn";
this.bn.PositionItem = this.bindingNavigatorPositionItem;
this.bn.Size = new System.Drawing.Size(878, 26);
this.bn.Size = new System.Drawing.Size(971, 31);
this.bn.TabIndex = 0;
this.bn.Text = "bindingNavigator1";
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 23);
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 28);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
@@ -192,7 +193,7 @@
this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 23);
this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(28, 28);
this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
//
// bindingNavigatorMovePreviousItem
@@ -201,13 +202,13 @@
this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 23);
this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(28, 28);
this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
//
// bindingNavigatorSeparator
//
this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 26);
this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 31);
//
// bindingNavigatorPositionItem
//
@@ -221,7 +222,7 @@
// bindingNavigatorSeparator1
//
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 26);
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 31);
//
// bindingNavigatorMoveNextItem
//
@@ -229,7 +230,7 @@
this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 23);
this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(28, 28);
this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
//
// bindingNavigatorMoveLastItem
@@ -238,20 +239,20 @@
this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 23);
this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(28, 28);
this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
//
// bindingNavigatorSeparator2
//
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 26);
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 31);
//
// bindingNavigatorAddNewItem
//
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(65, 23);
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(73, 28);
this.bindingNavigatorAddNewItem.Text = "Add(&A)";
this.bindingNavigatorAddNewItem.Click += new System.EventHandler(this.bindingNavigatorAddNewItem_Click);
//
@@ -260,7 +261,7 @@
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(78, 23);
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(86, 28);
this.bindingNavigatorDeleteItem.Text = "Delete(&D)";
this.bindingNavigatorDeleteItem.Click += new System.EventHandler(this.bindingNavigatorDeleteItem_Click);
//
@@ -270,7 +271,7 @@
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(122, 23);
this.toolStripButton1.Size = new System.Drawing.Size(130, 28);
this.toolStripButton1.Text = "Report(Summary)";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1);
//
@@ -279,7 +280,7 @@
this.btEdit.Image = ((System.Drawing.Image)(resources.GetObject("btEdit.Image")));
this.btEdit.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btEdit.Name = "btEdit";
this.btEdit.Size = new System.Drawing.Size(61, 23);
this.btEdit.Size = new System.Drawing.Size(69, 28);
this.btEdit.Text = "Edit(&E)";
this.btEdit.Click += new System.EventHandler(this.toolStripButton2_Click);
//
@@ -288,47 +289,47 @@
this.btSave.Image = global::FEQ0000.Properties.Resources.action_save;
this.btSave.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(67, 23);
this.btSave.Size = new System.Drawing.Size(75, 28);
this.btSave.Text = "Save(&S)";
this.btSave.Click += new System.EventHandler(this.btSave_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 26);
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(6, 26);
this.toolStripSeparator4.Size = new System.Drawing.Size(6, 31);
//
// lbSum
//
this.lbSum.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.lbSum.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbSum.Name = "lbSum";
this.lbSum.Size = new System.Drawing.Size(22, 23);
this.lbSum.Size = new System.Drawing.Size(22, 28);
this.lbSum.Text = "0";
//
// toolStripLabel5
//
this.toolStripLabel5.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripLabel5.Name = "toolStripLabel5";
this.toolStripLabel5.Size = new System.Drawing.Size(58, 23);
this.toolStripLabel5.Size = new System.Drawing.Size(58, 28);
this.toolStripLabel5.Text = "Sub Total";
//
// toolStripLabel2
//
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(43, 23);
this.toolStripLabel2.Size = new System.Drawing.Size(43, 28);
this.toolStripLabel2.Text = "Search";
//
// tbFind
//
this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbFind.Name = "tbFind";
this.tbFind.Size = new System.Drawing.Size(100, 26);
this.tbFind.Size = new System.Drawing.Size(100, 31);
this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbFind_KeyDown);
//
// btFind
@@ -337,7 +338,7 @@
this.btFind.Image = ((System.Drawing.Image)(resources.GetObject("btFind.Image")));
this.btFind.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btFind.Name = "btFind";
this.btFind.Size = new System.Drawing.Size(23, 23);
this.btFind.Size = new System.Drawing.Size(28, 28);
this.btFind.Text = "toolStripButton2";
this.btFind.Click += new System.EventHandler(this.btFind_Click);
//
@@ -349,11 +350,12 @@
this.toolStripMenuItem1,
this.copyDataToolStripMenuItem,
this.editDataToolStripMenuItem,
this.deleteDataToolStripMenuItem,
this.toolStripMenuItem2,
this.viewThisUserDataToolStripMenuItem,
this.exportDataToolStripMenuItem});
this.cm1.Name = "contextMenuStrip1";
this.cm1.Size = new System.Drawing.Size(337, 226);
this.cm1.Size = new System.Drawing.Size(337, 268);
//
// columnSizeToolStripMenuItem
//
@@ -417,6 +419,13 @@
this.editDataToolStripMenuItem.Text = "Edit Data";
this.editDataToolStripMenuItem.Click += new System.EventHandler(this.editDataToolStripMenuItem_Click);
//
// deleteDataToolStripMenuItem
//
this.deleteDataToolStripMenuItem.Name = "deleteDataToolStripMenuItem";
this.deleteDataToolStripMenuItem.Size = new System.Drawing.Size(336, 42);
this.deleteDataToolStripMenuItem.Text = "Delete Data";
this.deleteDataToolStripMenuItem.Click += new System.EventHandler(this.deleteDataToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
@@ -438,6 +447,7 @@
//
// toolStrip1
//
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmDate,
this.dtSD,
@@ -454,7 +464,7 @@
this.toolStripDropDownButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(878, 25);
this.toolStrip1.Size = new System.Drawing.Size(971, 31);
this.toolStrip1.TabIndex = 3;
this.toolStrip1.Text = "toolStrip1";
//
@@ -466,20 +476,20 @@
"InDate",
"ExpDate"});
this.cmDate.Name = "cmDate";
this.cmDate.Size = new System.Drawing.Size(75, 25);
this.cmDate.Size = new System.Drawing.Size(75, 31);
//
// dtSD
//
this.dtSD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dtSD.Name = "dtSD";
this.dtSD.Size = new System.Drawing.Size(90, 25);
this.dtSD.Size = new System.Drawing.Size(90, 31);
this.dtSD.Text = "1982-11-23";
this.dtSD.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// lbEnd
//
this.lbEnd.Name = "lbEnd";
this.lbEnd.Size = new System.Drawing.Size(15, 22);
this.lbEnd.Size = new System.Drawing.Size(15, 28);
this.lbEnd.Text = "~";
this.lbEnd.Click += new System.EventHandler(this.lbEnd_Click);
//
@@ -487,36 +497,36 @@
//
this.dtED.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dtED.Name = "dtED";
this.dtED.Size = new System.Drawing.Size(90, 25);
this.dtED.Size = new System.Drawing.Size(90, 31);
this.dtED.Text = "1982-11-23";
this.dtED.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 31);
//
// toolStripLabel1
//
this.toolStripLabel1.Name = "toolStripLabel1";
this.toolStripLabel1.Size = new System.Drawing.Size(34, 22);
this.toolStripLabel1.Size = new System.Drawing.Size(34, 28);
this.toolStripLabel1.Text = "State";
//
// cmbState
//
this.cmbState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbState.Name = "cmbState";
this.cmbState.Size = new System.Drawing.Size(100, 25);
this.cmbState.Size = new System.Drawing.Size(100, 31);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 31);
//
// toolStripLabel3
//
this.toolStripLabel3.Name = "toolStripLabel3";
this.toolStripLabel3.Size = new System.Drawing.Size(66, 22);
this.toolStripLabel3.Size = new System.Drawing.Size(66, 28);
this.toolStripLabel3.Text = "User Name";
this.toolStripLabel3.Click += new System.EventHandler(this.toolStripLabel3_Click);
//
@@ -524,7 +534,7 @@
//
this.tbRequest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbRequest.Name = "tbRequest";
this.tbRequest.Size = new System.Drawing.Size(70, 25);
this.tbRequest.Size = new System.Drawing.Size(70, 31);
this.tbRequest.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tbRequest.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbRequest_KeyDown);
//
@@ -533,14 +543,14 @@
this.btSearch.Image = ((System.Drawing.Image)(resources.GetObject("btSearch.Image")));
this.btSearch.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btSearch.Name = "btSearch";
this.btSearch.Size = new System.Drawing.Size(81, 22);
this.btSearch.Size = new System.Drawing.Size(89, 28);
this.btSearch.Text = "Refresh(&R)";
this.btSearch.Click += new System.EventHandler(this.btSearch_Click);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 31);
//
// toolStripDropDownButton1
//
@@ -551,7 +561,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
this.toolStripDropDownButton1.Size = new System.Drawing.Size(102, 22);
this.toolStripDropDownButton1.Size = new System.Drawing.Size(110, 28);
this.toolStripDropDownButton1.Text = "Quick Menu";
//
// 금일입고품목ToolStripMenuItem
@@ -582,11 +592,11 @@
this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill;
this.fpSpread1.EditModeReplace = true;
this.fpSpread1.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.fpSpread1.Location = new System.Drawing.Point(0, 25);
this.fpSpread1.Location = new System.Drawing.Point(0, 31);
this.fpSpread1.Name = "fpSpread1";
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
this.fpSpread1_Sheet1});
this.fpSpread1.Size = new System.Drawing.Size(878, 468);
this.fpSpread1.Size = new System.Drawing.Size(971, 542);
this.fpSpread1.TabIndex = 4;
//
// fpSpread1_Sheet1
@@ -762,13 +772,13 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(878, 519);
this.ClientSize = new System.Drawing.Size(971, 604);
this.Controls.Add(this.fpSpread1);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.bn);
this.DoubleBuffered = true;
this.Name = "fPurchase";
this.Text = "Purchase List";
this.Text = "NR 구매 신청";
this.Load += new System.EventHandler(this.@__Load);
((System.ComponentModel.ISupportInitialize)(this.dsPurchase)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
@@ -844,5 +854,6 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
private System.Windows.Forms.ToolStripMenuItem deleteDataToolStripMenuItem;
}
}

View File

@@ -69,7 +69,7 @@ namespace FEQ0000
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
e.Row["pumunit"] = "EA";
e.Row["state"] = "00";
e.Row["state"] = "---";
e.Row["pumqty"] = 1;
e.Row["pumprice"] = 0;
e.Row["pumamt"] = 0;
@@ -87,14 +87,13 @@ namespace FEQ0000
//state list
var stList = FCOMMON.DBM.getCodeList("04");
this.cmbState.Items.Clear();
cmbState.Items.Add("-- All --");
cmbState.Items.Add("-- incomplete --");
cmbState.Items.Add("-- 전체 --");
foreach (var item in stList)
cmbState.Items.Add(item);
cmbState.Items.Add(item.Value);
this.cmbState.SelectedIndex = 0; //all기본 - 양진원
//일반사용자의경우에는 상태를 변경하지 못한다.
int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth_Purchase());
int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAutoType.purchase));
if (curLevel >= 5)
{
btSave.Visible = true;
@@ -109,7 +108,7 @@ namespace FEQ0000
}
refreshData();
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
FCOMMON.Util.FPColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
}
@@ -118,7 +117,7 @@ namespace FEQ0000
try
{
string state = "%";
if (cmbState.SelectedIndex > 1) state = cmbState.Text.Split(',')[0].Substring(1);
if (cmbState.SelectedIndex > 0) state = cmbState.Text.Split(',')[0];
string request = "%";
if (tbRequest.Text.Trim() != "") request = "%" + this.tbRequest.Text.Trim() + "%";
string dateField = "pdate";
@@ -127,12 +126,12 @@ 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.getCodeName('04', state) AS stateName" +
cmd.CommandText = " select *" +
" from purchase " +
" where isnull(" + dateField + ",'') between @sd and @ed " +
" and (isnull(request,'') like @req or isnull(receive,'') like @req)";
if (cmbState.SelectedIndex != 1) cmd.CommandText += " and state like @st";
if (cmbState.SelectedIndex != 0) cmd.CommandText += " and isnull([state],'') like @st";
else cmd.CommandText += " and (state < '04' or state > '07')";
cmd.CommandText += " ORDER BY pdate DESC, idx DESC";
@@ -271,21 +270,50 @@ namespace FEQ0000
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
func_delete();
}
void func_delete()
{
var drv = bs.Current as DataRowView;
if (drv == null) return;
int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth( FCOMMON.DBM.eAutoType.purchase));
var dr = drv.Row as dsPurchase.PurchaseRow;
if (dr.sc != "")
{
if (curLevel < 5)
{
FCOMMON.Util.MsgE("일반 사용자는 SC값이 있는 자료를 삭제할 수 없습니다.");
return;
}
}
if(dr.request != FCOMMON.info.Login.nameK)
{
if (curLevel < 5)
{
FCOMMON.Util.MsgE("일반 사용자는 타인의 자료를 삭제할 수 없습니다.");
return;
}
}
var dlg = FCOMMON.Util.MsgQ("현재 선택된 자료를 삭제하시겠습니까?");
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
bs.RemoveCurrent();
//일반사용자는 데이터를 바로 삭제한다.
if (FCOMMON.info.Login.level > 9) return;
try
if (curLevel < 5)
{
int cnt = ta.Update(this.dsPurchase);
if (cnt != 1)
FCOMMON.Util.MsgE(cnt.ToString() + "건의 자료가 삭제되었습니다.");
}
catch (Exception ex)
{
FCOMMON.Util.MsgE("delete error\n" + ex.Message);
try
{
int cnt = ta.Update(this.dsPurchase);
if (cnt != 1)
FCOMMON.Util.MsgE(cnt.ToString() + "건의 자료가 삭제되었습니다.");
}
catch (Exception ex)
{
FCOMMON.Util.MsgE("delete error\n" + ex.Message);
}
}
}
@@ -325,9 +353,14 @@ namespace FEQ0000
FCOMMON.Util.CopyData((System.Data.DataRow)dr, (System.Data.DataRow)newdr);
newdr.wdate = DateTime.Now;
newdr.wuid = FCOMMON.info.Login.no;
newdr.state = "00";
newdr.state = "---";
newdr.request = FCOMMON.info.Login.nameK;
newdr.receive = FCOMMON.info.Login.nameK;
newdr.sc = string.Empty;
newdr.po = string.Empty;
newdr.indate = string.Empty;
newdr.edate = string.Empty;
newdr.dept = string.Empty;
newdr.idx = -1;
newdr.EndEdit();
@@ -442,10 +475,11 @@ namespace FEQ0000
private void autoToolStripMenuItem_Click(object sender, EventArgs e)
{
this.fpSpread1.ActiveSheet.DataAutoSizeColumns = true;
FCOMMON.Util.FPColSizeAuto(this.fpSpread1);
//this.fpSpread1.ActiveSheet.DataAutoSizeColumns = true;
for (int i = 0; i < this.fpSpread1.ActiveSheet.Rows.Count; i++)
this.fpSpread1.ActiveSheet.SetRowHeight(i, 25);
//for (int i = 0; i < this.fpSpread1.ActiveSheet.Rows.Count; i++)
// this.fpSpread1.ActiveSheet.SetRowHeight(i, 25);
//dv1.AutoResizeColumns();
}
@@ -459,12 +493,12 @@ namespace FEQ0000
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
FPUtil.ColsizeSave(this.fpSpread1, fn_fpcolsize);
FCOMMON.Util.FPColsizeSave(this.fpSpread1, fn_fpcolsize);
}
private void loadToolStripMenuItem_Click(object sender, EventArgs e)
{
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
FCOMMON.Util.FPColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
}
private void toolStripButton2_Click(object sender, EventArgs e)
@@ -565,5 +599,10 @@ namespace FEQ0000
refreshData();
}
private void deleteDataToolStripMenuItem_Click(object sender, EventArgs e)
{
func_delete();
}
}
}