2,743
edits
(Created page with "==Technical Specification== #Quantity of the Item Opening must not be zero #*When adding a new entry to Item Opening, zero qty entry will be removed before saving to database...") |
No edit summary |
||
Line 133:
===Adding two entries of same ItemCode to Item Opening===
<syntaxhighlight lang="csharp">
public void NewTwoEntriesOfSameItem(AutoCount.Authentication.UserSession userSession)
Line 185:
==Delete Item Opening entry==
Highlighted shows the function to get the list of keys and deletion of existing keys.
<syntaxhighlight lang="csharp">▼
<syntaxhighlight lang="csharp" highlight="22,23">
public void CheckNewEntryBeforeAdding(AutoCount.Authentication.UserSession userSession)
{
Line 242 ⟶ 243:
</syntaxhighlight>
Function to find a list of keys that is/are matching.
▲<syntaxhighlight lang="csharp">
public List<long> GetExistItemOpeningKey(DataTable table, string itemCode, string uom, string location, string batchNo)
{
return table.AsEnumerable().Where(r =>
r.RowState != DataRowState.Deleted &&
r.Field<string>("ItemCode") == itemCode &&
r.Field<string>("UOM") == uom &&
r.Field<string>("Location") == location &&
r.Field<string>("BatchNo") == batchNo
).Select(r => r.Field<long>("ItemOpeningKey"))
.ToList();
}
</syntaxhighlight>
{{SeeAlsoStockV2}}
|