initial commit
This commit is contained in:
52
Project/_Common/fInventory.cs
Normal file
52
Project/_Common/fInventory.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Project._Common
|
||||
{
|
||||
public partial class fInventory : Form
|
||||
{
|
||||
public fInventory()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void inventoryBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Validate();
|
||||
this.inventoryBindingSource.EndEdit();
|
||||
this.tableAdapterManager.UpdateAll(this.dsMSSQL);
|
||||
|
||||
}
|
||||
|
||||
private void fInventory_Load(object sender, EventArgs e)
|
||||
{
|
||||
// TODO: 이 코드는 데이터를 'dsMSSQL.Inventory' 테이블에 로드합니다. 필요한 경우 이 코드를 이동하거나 제거할 수 있습니다.
|
||||
this.inventoryTableAdapter.Fill(this.dsMSSQL.Inventory);
|
||||
this.dsMSSQL.Inventory.TableNewRow += Inventory_TableNewRow;
|
||||
|
||||
dsMSSQLTableAdapters.QueriesTableAdapter taQuery = new dsMSSQLTableAdapters.QueriesTableAdapter();
|
||||
|
||||
//모든자료를 조회해서 이름을 찾는다.
|
||||
foreach(dsMSSQL.InventoryRow dr in this.dsMSSQL.Inventory.Rows)
|
||||
{
|
||||
dr._itemname = taQuery.GetItemName(dr.item);
|
||||
dr._projectname = taQuery.GetProjectName(dr.project);
|
||||
dr.EndEdit();
|
||||
}
|
||||
this.dsMSSQL.Inventory.AcceptChanges();
|
||||
}
|
||||
|
||||
void Inventory_TableNewRow(object sender, DataTableNewRowEventArgs e)
|
||||
{
|
||||
e.Row["wuid"] = Pub.Login.no;
|
||||
e.Row["wdate"] = DateTime.Now;
|
||||
e.Row["pdate"] = DateTime.Now.ToShortDateString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user