本文整理汇总了C#中BLL.Dictionary.Any方法的典型用法代码示例。如果您正苦于以下问题:C# Dictionary.Any方法的具体用法?C# Dictionary.Any怎么用?C# Dictionary.Any使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.Dictionary
的用法示例。
在下文中一共展示了Dictionary.Any方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateQuantityAndPhysicalStores
private void UpdateQuantityAndPhysicalStores()
{
var dataTable = gridPutAwayNonPalletized.DataSource as DataTable;
decimal currentBonusInvQty = 0;
string currentGuiParam = "";
var orginalGuidCurrentInvQty = new Dictionary<string, decimal>();
if (dataTable != null)
foreach (DataRow drow in dataTable.Rows)
{
if (drow["IsDamaged"] != DBNull.Value && Convert.ToBoolean(drow["IsDamaged"])) continue;
var dr = _dtRecGrid.Select(String.Format("GUID = '{0}'", Convert.ToString(drow["GUID"])))[0];
bool currentRowIsOrginal = (dr["Copy"].ToString() == "Orginal" || dr["Copy"] == DBNull.Value);
currentGuiParam = currentRowIsOrginal ? "GUID" : "Copy";
if (drow["PutAwayLocation"] != DBNull.Value)
{
var plocation = new PalletLocation();
plocation.LoadByPrimaryKey(Convert.ToInt32(drow["PutAwayLocation"]));
dr["Store"] = (plocation.PhysicalStoreID);
}
if (drow["Palletized Quantity"] != DBNull.Value)
{
dr["Pack Qty"] = drow["Palletized Quantity"];
bool hasBonus = !srm && dr["InvoicedQty"] != DBNull.Value &&
(Convert.ToDecimal(dr["InvoicedQty"]) < Convert.ToDecimal(drow["Pack Qty"]));
if (hasBonus && !orginalGuidCurrentInvQty.Any())
GetCurrentBonusInvQty(out orginalGuidCurrentInvQty);
if (!hasBonus)
{
dr["InvoicedQty"] = (currentRowIsOrginal)
? Convert.ToDecimal(dr["Pack Qty"]) +
HasShortageQty(dr["GUID"].ToString())
: Convert.ToDecimal(dr["Pack Qty"]);
}
else
{
currentBonusInvQty = orginalGuidCurrentInvQty[dr[currentGuiParam].ToString()];
if (Convert.ToDecimal(dr["Pack Qty"]) >= currentBonusInvQty && currentBonusInvQty >= 0)
{
dr["InvoicedQty"] = currentBonusInvQty;
orginalGuidCurrentInvQty[dr[currentGuiParam].ToString()] -=
Convert.ToDecimal(dr["Pack Qty"]);
}
else
{
if (currentBonusInvQty <= 0)
dr["InvoicedQty"] = 0;
else
{
dr["InvoicedQty"] = (currentBonusInvQty >= Convert.ToDecimal(dr["Pack Qty"]))
? Convert.ToDecimal(dr["Pack Qty"])
: currentBonusInvQty;
orginalGuidCurrentInvQty[dr[currentGuiParam].ToString()] -=
Convert.ToDecimal(dr["Pack Qty"]);
}
}
}
}
}
}