database query : add with(nolock)
This commit is contained in:
103
SubProject/FCM0000/DSReport.Designer.cs
generated
103
SubProject/FCM0000/DSReport.Designer.cs
generated
@@ -367,10 +367,10 @@ namespace FCM0000 {
|
||||
|
||||
private global::System.Data.DataColumn columnpdate;
|
||||
|
||||
private global::System.Data.DataColumn columnItemName;
|
||||
|
||||
private global::System.Data.DataColumn columnstock;
|
||||
|
||||
private global::System.Data.DataColumn columnitem;
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public PersonInvStockDataTable() {
|
||||
@@ -430,17 +430,17 @@ namespace FCM0000 {
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public global::System.Data.DataColumn ItemNameColumn {
|
||||
public global::System.Data.DataColumn stockColumn {
|
||||
get {
|
||||
return this.columnItemName;
|
||||
return this.columnstock;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public global::System.Data.DataColumn stockColumn {
|
||||
public global::System.Data.DataColumn itemColumn {
|
||||
get {
|
||||
return this.columnstock;
|
||||
return this.columnitem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,14 +481,14 @@ namespace FCM0000 {
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public PersonInvStockRow AddPersonInvStockRow(string username, string project, string pdate, string ItemName, int stock) {
|
||||
public PersonInvStockRow AddPersonInvStockRow(string username, string project, string pdate, int stock, int item) {
|
||||
PersonInvStockRow rowPersonInvStockRow = ((PersonInvStockRow)(this.NewRow()));
|
||||
object[] columnValuesArray = new object[] {
|
||||
username,
|
||||
project,
|
||||
pdate,
|
||||
ItemName,
|
||||
stock};
|
||||
stock,
|
||||
item};
|
||||
rowPersonInvStockRow.ItemArray = columnValuesArray;
|
||||
this.Rows.Add(rowPersonInvStockRow);
|
||||
return rowPersonInvStockRow;
|
||||
@@ -514,8 +514,8 @@ namespace FCM0000 {
|
||||
this.columnusername = base.Columns["username"];
|
||||
this.columnproject = base.Columns["project"];
|
||||
this.columnpdate = base.Columns["pdate"];
|
||||
this.columnItemName = base.Columns["ItemName"];
|
||||
this.columnstock = base.Columns["stock"];
|
||||
this.columnitem = base.Columns["item"];
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -527,17 +527,16 @@ namespace FCM0000 {
|
||||
base.Columns.Add(this.columnproject);
|
||||
this.columnpdate = new global::System.Data.DataColumn("pdate", typeof(string), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnpdate);
|
||||
this.columnItemName = new global::System.Data.DataColumn("ItemName", typeof(string), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnItemName);
|
||||
this.columnstock = new global::System.Data.DataColumn("stock", typeof(int), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnstock);
|
||||
this.columnitem = new global::System.Data.DataColumn("item", typeof(int), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnitem);
|
||||
this.columnusername.ReadOnly = true;
|
||||
this.columnusername.MaxLength = 200;
|
||||
this.columnproject.ReadOnly = true;
|
||||
this.columnproject.MaxLength = 200;
|
||||
this.columnpdate.ReadOnly = true;
|
||||
this.columnpdate.MaxLength = 10;
|
||||
this.columnItemName.MaxLength = 200;
|
||||
this.columnstock.ReadOnly = true;
|
||||
}
|
||||
|
||||
@@ -1521,22 +1520,6 @@ namespace FCM0000 {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public string ItemName {
|
||||
get {
|
||||
if (this.IsItemNameNull()) {
|
||||
return string.Empty;
|
||||
}
|
||||
else {
|
||||
return ((string)(this[this.tablePersonInvStock.ItemNameColumn]));
|
||||
}
|
||||
}
|
||||
set {
|
||||
this[this.tablePersonInvStock.ItemNameColumn] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public int stock {
|
||||
@@ -1553,6 +1536,22 @@ namespace FCM0000 {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public int item {
|
||||
get {
|
||||
try {
|
||||
return ((int)(this[this.tablePersonInvStock.itemColumn]));
|
||||
}
|
||||
catch (global::System.InvalidCastException e) {
|
||||
throw new global::System.Data.StrongTypingException("\'PersonInvStock\' 테이블의 \'item\' 열의 값이 DBNull입니다.", e);
|
||||
}
|
||||
}
|
||||
set {
|
||||
this[this.tablePersonInvStock.itemColumn] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public bool IsusernameNull() {
|
||||
@@ -1589,18 +1588,6 @@ namespace FCM0000 {
|
||||
this[this.tablePersonInvStock.pdateColumn] = global::System.Convert.DBNull;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public bool IsItemNameNull() {
|
||||
return this.IsNull(this.tablePersonInvStock.ItemNameColumn);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public void SetItemNameNull() {
|
||||
this[this.tablePersonInvStock.ItemNameColumn] = global::System.Convert.DBNull;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public bool IsstockNull() {
|
||||
@@ -1612,6 +1599,18 @@ namespace FCM0000 {
|
||||
public void SetstockNull() {
|
||||
this[this.tablePersonInvStock.stockColumn] = global::System.Convert.DBNull;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public bool IsitemNull() {
|
||||
return this.IsNull(this.tablePersonInvStock.itemColumn);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
|
||||
public void SetitemNull() {
|
||||
this[this.tablePersonInvStock.itemColumn] = global::System.Convert.DBNull;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2406,8 +2405,8 @@ namespace FCM0000.DSReportTableAdapters {
|
||||
tableMapping.ColumnMappings.Add("username", "username");
|
||||
tableMapping.ColumnMappings.Add("project", "project");
|
||||
tableMapping.ColumnMappings.Add("pdate", "pdate");
|
||||
tableMapping.ColumnMappings.Add("ItemName", "ItemName");
|
||||
tableMapping.ColumnMappings.Add("stock", "stock");
|
||||
tableMapping.ColumnMappings.Add("item", "item");
|
||||
this._adapter.TableMappings.Add(tableMapping);
|
||||
}
|
||||
|
||||
@@ -2424,12 +2423,12 @@ namespace FCM0000.DSReportTableAdapters {
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
|
||||
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = @"SELECT dbo.getUserName(uid) AS username, ISNULL(dbo.getProjectName(project), '--') AS project, MAX(pdate) AS pdate, ItemName, SUM(dr_qty) AS stock
|
||||
FROM Inventory
|
||||
this._commandCollection[0].CommandText = @"SELECT dbo.getUserName(uid) AS username, ISNULL(dbo.getProjectName(project), '--') AS project, MAX(pdate) AS pdate, item, SUM(dr_qty) AS stock
|
||||
FROM Inventory WITH (nolock)
|
||||
WHERE (dbo.getUserName(uid) LIKE @uid)
|
||||
GROUP BY dbo.getUserName(uid), dbo.getProjectName(project), ItemName
|
||||
GROUP BY dbo.getUserName(uid), dbo.getProjectName(project), item
|
||||
HAVING (SUM(dr_qty) <> 0)
|
||||
ORDER BY username, project, ItemName";
|
||||
ORDER BY username, project, item";
|
||||
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
||||
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
@@ -2617,8 +2616,8 @@ ORDER BY username, project, ItemName";
|
||||
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = @"SELECT Items.idx, MAX(Inventory.pdate) AS lastDate, Items.name, Items.sid, Items.model, SUM(Inventory.dr_qty) AS Qty, SUM(Inventory.dr_amt) AS Amt, Items.supply
|
||||
FROM Inventory LEFT OUTER JOIN
|
||||
Items ON Inventory.gcode = Items.gcode AND Inventory.item = Items.idx
|
||||
FROM Inventory WITH (nolock) LEFT OUTER JOIN
|
||||
Items WITH (nolock) ON Inventory.gcode = Items.gcode AND Inventory.item = Items.idx
|
||||
WHERE (Inventory.gcode = @gcode) AND (Inventory.pdate <= @baseDate)
|
||||
GROUP BY Items.idx, Items.name, Items.sid, Items.model, Items.supply";
|
||||
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
||||
@@ -2824,8 +2823,8 @@ GROUP BY Items.idx, Items.name, Items.sid, Items.model, Items.supply";
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = @"SELECT Inventory.place, MAX(Inventory.pdate) AS lastDate, Items.name, Items.sid, Items.model, SUM(Inventory.dr_qty) AS Qty, SUM(Inventory.dr_amt) AS Amt, Items.supply, Inventory.item,
|
||||
Inventory.box
|
||||
FROM Inventory LEFT OUTER JOIN
|
||||
Items ON Inventory.gcode = Items.gcode AND Inventory.item = Items.idx
|
||||
FROM Inventory WITH (nolock) LEFT OUTER JOIN
|
||||
Items WITH (nolock) ON Inventory.gcode = Items.gcode AND Inventory.item = Items.idx
|
||||
WHERE (Inventory.gcode = @gcode) AND (Inventory.pdate <= @baseDate) AND (ISNULL(Inventory.place, N'') LIKE @place)
|
||||
GROUP BY Items.name, Items.sid, Items.model, Items.supply, Inventory.place, Inventory.item, Inventory.box";
|
||||
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
||||
@@ -2836,8 +2835,8 @@ GROUP BY Items.name, Items.sid, Items.model, Items.supply, Inventory.place, Inve
|
||||
this._commandCollection[1].Connection = this.Connection;
|
||||
this._commandCollection[1].CommandText = @"SELECT Inventory.place, MAX(Inventory.pdate) AS lastDate, Items.name, Items.sid, Items.model, SUM(Inventory.dr_qty) AS Qty, SUM(Inventory.dr_amt) AS Amt, Items.supply, Inventory.item,
|
||||
Inventory.box
|
||||
FROM Inventory LEFT OUTER JOIN
|
||||
Items ON Inventory.gcode = Items.gcode AND Inventory.item = Items.idx
|
||||
FROM Inventory WITH (nolock) LEFT OUTER JOIN
|
||||
Items WITH (nolock) ON Inventory.gcode = Items.gcode AND Inventory.item = Items.idx
|
||||
WHERE (Inventory.gcode = @gcode) AND (Inventory.pdate <= @baseDate) AND (Items.idx = @item)
|
||||
GROUP BY Items.name, Items.sid, Items.model, Items.supply, Inventory.place, Inventory.item, Inventory.box";
|
||||
this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
|
||||
|
||||
Reference in New Issue
Block a user