本文整理汇总了C#中BLL.ReceiveDoc.ConfirmQuantityAndLocation方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.ConfirmQuantityAndLocation方法的具体用法?C# ReceiveDoc.ConfirmQuantityAndLocation怎么用?C# ReceiveDoc.ConfirmQuantityAndLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.ConfirmQuantityAndLocation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConfirmQuantityAndLocation
private void ConfirmQuantityAndLocation()
{
//TODO: finish updating the changed locations
MyGeneration.dOOdads.TransactionMgr transaction = MyGeneration.dOOdads.TransactionMgr.ThreadTransactionMgr();
transaction.BeginTransaction();
try
{
PalletLocation pl = new PalletLocation();
String reference = gridReceiveView.GetFocusedDataRow()["RefNo"].ToString();
// pl.ConfirmAllReceived(reference);
if (gridDetailView.DataSource == null)
return;
foreach (DataRowView drv in gridDetailView.DataSource as DataView)
{
int PalletLocationID = Convert.ToInt32(drv["PalletLocationID"]);
int ProposedPalletLocationID = Convert.ToInt32(drv["ProposedPalletLocationID"]);
int PalletID = Convert.ToInt32(drv["PalletID"]);
int receiveID = Convert.ToInt32(drv["ReceiveID"]);
if (PalletLocationID != ProposedPalletLocationID)
{
pl.LoadByPrimaryKey(PalletLocationID);
if (pl.IsColumnNull("PalletID"))
{
pl.PalletID = PalletID;
pl.Confirmed = true;
pl.Save();
pl.LoadByPrimaryKey(ProposedPalletLocationID);
pl.SetColumnNull("PalletID");
pl.Save();
}
else
{
XtraMessageBox.Show("Some Items/Pallets were not confirmed correctly because the newly selected pallet location was already occupied.", "Some Items were not confirmed.");
}
}
else
{
pl.LoadByPrimaryKey(PalletLocationID);
pl.PalletID = PalletID;
pl.Confirmed = true;
pl.Save();
}
}
BLL.ReceiveDoc recDoc = new ReceiveDoc();
recDoc.LoadByReferenceNo(reference);
recDoc.ConfirmQuantityAndLocation(null);
transaction.CommitTransaction();
XtraMessageBox.Show("Receipt Confirmed!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
BindFormContents();
}
catch (Exception exp)
{
transaction.RollbackTransaction();
XtraMessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例2: ConfirmQuantityAndLocation
private void ConfirmQuantityAndLocation()
{
MyGeneration.dOOdads.TransactionMgr transaction = MyGeneration.dOOdads.TransactionMgr.ThreadTransactionMgr();
transaction.BeginTransaction();
try
{
PalletLocation pl = new PalletLocation();
DataRow dr = gridReceiveView.GetFocusedDataRow();
if (dr == null)
{
throw new Exception("Nothing to confirm!");
}
int ReceiptID = Convert.ToInt32(gridReceiveView.GetFocusedDataRow()["ReceiptID"]);
if (gridDetailView.DataSource == null)
return;
BLL.ReceiveDoc receiveDoc = new ReceiveDoc();
receiveDoc.LoadByReceiptIDWithReceivePallet(ReceiptID);
while (!receiveDoc.EOF)
{
int palletLocationID = Convert.ToInt32(receiveDoc.GetColumn("PalletLocationID"));
pl.LoadByPrimaryKey(palletLocationID);
pl.Confirmed = true;
pl.Save();
receiveDoc.MoveNext();
}
BLL.ReceiveDoc recDoc = new ReceiveDoc();
recDoc.LoadByReceiptID(ReceiptID);
recDoc.ConfirmQuantityAndLocation(CurrentContext.UserId);
BLL.Receipt receiptStatus = new BLL.Receipt();
receiptStatus.LoadByPrimaryKey(ReceiptID);
receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.RECEIVE_QUANTITY_CONFIRMED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Receive Confirmed");
transaction.CommitTransaction();
XtraMessageBox.Show("Receipt Confirmed!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
BindFormContents();
}
catch (Exception exp)
{
transaction.RollbackTransaction();
XtraMessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}