本文整理汇总了C#中AceSoft.RetailPlus.Data.Products.UpdateInvDetails方法的典型用法代码示例。如果您正苦于以下问题:C# Products.UpdateInvDetails方法的具体用法?C# Products.UpdateInvDetails怎么用?C# Products.UpdateInvDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AceSoft.RetailPlus.Data.Products
的用法示例。
在下文中一共展示了Products.UpdateInvDetails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveRecord
private void SaveRecord()
{
Security.AccessUserDetails clsDetails = (Security.AccessUserDetails)Session["AccessUserDetails"];
DateTime dteChangeDate = DateTime.Now;
Products clsProduct = new Products();
clsProduct.GetConnection();
InvAdjustment clsInvAdjustment = new InvAdjustment(clsProduct.Connection, clsProduct.Transaction);
InvAdjustmentDetails clsInvAdjustmentDetails;
long lngProductID = long.Parse(cboProductCode.SelectedValue);
if (lstVariationMatrix.Items.Count > 0)
{
ProductVariationsMatrix clsProductVariationsMatrix = new ProductVariationsMatrix(clsProduct.Connection, clsProduct.Transaction);
foreach (DataListItem e in lstVariationMatrix.Items)
{
HtmlInputCheckBox chkMatrixID = (HtmlInputCheckBox)e.FindControl("chkMatrixID");
Label lblVariationDesc = (Label)e.FindControl("lblVariationDesc");
Label lblUnitNameMatrix = (Label)e.FindControl("lblUnitCode");
TextBox txtQuantityBeforeMatrix = (TextBox)e.FindControl("txtQuantityBefore");
//TextBox txtDifferenceMatrix = (TextBox)e.FindControl("txtDifference");
TextBox txtQuantityNowMatrix = (TextBox)e.FindControl("txtQuantityNow");
TextBox txtMinThresholdMatrix = (TextBox)e.FindControl("txtMinThreshold");
TextBox txtMaxThresholdMatrix = (TextBox)e.FindControl("txtMaxThreshold");
decimal decQuantityBeforeMatrix = decimal.Parse(txtQuantityBeforeMatrix.Text);
//decimal decDifferenceMatrix = decimal.Parse(txtDifference.Text);
decimal decQuantityNowMatrix = decimal.Parse(txtQuantityNowMatrix.Text);
decimal decMinThresholdMatrixBefore = decimal.Parse(txtMinThresholdMatrix.ToolTip);
decimal decMinThresholdMatrixNow = decimal.Parse(txtMinThresholdMatrix.Text);
decimal decMaxThresholdMatrixBefore = decimal.Parse(txtMaxThresholdMatrix.ToolTip);
decimal decMaxThresholdMatrixNow = decimal.Parse(txtMaxThresholdMatrix.Text);
if (decQuantityBeforeMatrix != decQuantityNowMatrix || decMinThresholdMatrixBefore != decMinThresholdMatrixNow || decMaxThresholdMatrixBefore != decMaxThresholdMatrixNow)
{
clsInvAdjustmentDetails = new InvAdjustmentDetails();
clsInvAdjustmentDetails.UID = clsDetails.UID;
clsInvAdjustmentDetails.InvAdjustmentDate = dteChangeDate;
clsInvAdjustmentDetails.ProductID = long.Parse(cboProductCode.SelectedValue);
clsInvAdjustmentDetails.ProductCode = cboProductCode.SelectedItem.Text;
clsInvAdjustmentDetails.Description = cboProductCode.SelectedItem.Text;
clsInvAdjustmentDetails.VariationMatrixID = long.Parse(chkMatrixID.Value);
clsInvAdjustmentDetails.MatrixDescription = lblVariationDesc.Text;
clsInvAdjustmentDetails.UnitID = int.Parse(lblUnitNameMatrix.ToolTip);
clsInvAdjustmentDetails.UnitCode = lblUnitNameMatrix.Text;
clsInvAdjustmentDetails.QuantityBefore = decQuantityBeforeMatrix;
clsInvAdjustmentDetails.QuantityNow = decQuantityNowMatrix;
clsInvAdjustmentDetails.MinThresholdBefore = decMinThresholdMatrixBefore;
clsInvAdjustmentDetails.MinThresholdNow = decMinThresholdMatrixNow;
clsInvAdjustmentDetails.MaxThresholdBefore = decMaxThresholdMatrixBefore;
clsInvAdjustmentDetails.MaxThresholdNow = decMaxThresholdMatrixNow;
clsInvAdjustmentDetails.Remarks = txtRemarks.Text;
clsInvAdjustment.Insert(clsInvAdjustmentDetails);
if (decQuantityBeforeMatrix > decQuantityNowMatrix)
{ clsProduct.UpdateInvDetails(int.Parse(cboBranch.SelectedItem.Value), lngProductID, long.Parse(chkMatrixID.Value), decQuantityNowMatrix, decMinThresholdMatrixNow, decMaxThresholdMatrixNow, Products.getPRODUCT_INVENTORY_MOVEMENT_VALUE(PRODUCT_INVENTORY_MOVEMENT.DEDUCT_INVENTORY_ADJUSTMENT), dteChangeDate, "SYS-ADJ" + dteChangeDate.ToString("yyyyMMddHHmmss"), clsDetails.Name); }
else if (decQuantityBeforeMatrix < decQuantityNowMatrix)
{ clsProduct.UpdateInvDetails(int.Parse(cboBranch.SelectedItem.Value), lngProductID, long.Parse(chkMatrixID.Value), decQuantityNowMatrix, decMinThresholdMatrixNow, decMaxThresholdMatrixNow, Products.getPRODUCT_INVENTORY_MOVEMENT_VALUE(PRODUCT_INVENTORY_MOVEMENT.ADD_INVENTORY_ADJUSTMENT), dteChangeDate, "SYS-ADJ" + dteChangeDate.ToString("yyyyMMddHHmmss"), clsDetails.Name); }
}
}
}
clsProduct.CommitAndDispose();
}