本文整理汇总了C#中BLL.ReceiveDoc.SetStatusAsReceived方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.SetStatusAsReceived方法的具体用法?C# ReceiveDoc.SetStatusAsReceived怎么用?C# ReceiveDoc.SetStatusAsReceived使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.SetStatusAsReceived方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReturnToStoreForQuantityEdit
private void ReturnToStoreForQuantityEdit()
{
//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.Confirmed = false;
pl.Save();
}
}
else
{
pl.LoadByPrimaryKey(PalletLocationID);
pl.Confirmed = false;
pl.Save();
}
}
BLL.ReceiveDoc recDoc = new ReceiveDoc();
recDoc.LoadByReferenceNo(reference);
recDoc.SetStatusAsReceived(null);
transaction.CommitTransaction();
XtraMessageBox.Show("Receipt Returned!", "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: btnReturn_Click
private void btnReturn_Click(object sender, EventArgs e)
{
//TODO: finish updating the changed locations
MyGeneration.dOOdads.TransactionMgr transaction = MyGeneration.dOOdads.TransactionMgr.ThreadTransactionMgr();
if (gridGRVs.DataSource == null)
return;
transaction.BeginTransaction();
try
{
PalletLocation pl = new PalletLocation();
BLL.ReceiveDoc recDoc = new ReceiveDoc();
recDoc.LoadByReceiptID(ReceiptID);
recDoc.SetStatusAsReceived(null);
BLL.Receipt receiptStatus = new BLL.Receipt();
receiptStatus.LoadByPrimaryKey(ReceiptID);
receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.RECEIVE_ENTERED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Return For Quantity Editing");
transaction.CommitTransaction();
this.LogActivity("Return-Receipt-To-Quantity-Confirmation", ReceiptID);
XtraMessageBox.Show("Receipt Returned!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
}
catch (Exception exp)
{
transaction.RollbackTransaction();
throw exp;
}
PutAwayListsLoad(null, null);
}
示例3: ReceiveFromAccountTransfer
/// <summary>
/// Receives from account transfer.
/// </summary>
/// <param name="PicklistID">The picklist ID.</param>
/// <param name="StoreID">The store ID.</param>
/// <param name="User">The user.</param>
/// <param name="UserID">The user ID.</param>
/// <returns></returns>
public static String ReceiveFromAccountTransfer(int PicklistID, int StoreID, string User, int UserID)
{
PickListDetail pickListDetail = new PickListDetail();
pickListDetail.LoadByPickListID(PicklistID);
DataView dv = pickListDetail.DefaultView;
ReceiveDoc NewReceiveDoc = new ReceiveDoc();
String ReferenceID = ReceiveDoc.GetNextRefForTransfer();
foreach (DataRowView dvr in dv)
{
//Get ReceiveDoc information.
int receiveDocID = Convert.ToInt32(dvr["ReceiveDocID"]);
ReceiveDoc receiveDocFromPicklist = new ReceiveDoc();
receiveDocFromPicklist.LoadByPrimaryKey(receiveDocID);
//We have all the Receivedoc information that we want
NewReceiveDoc.AddNew();
if (receiveDocFromPicklist.s_BatchNo == null)
NewReceiveDoc.BatchNo = receiveDocFromPicklist.BatchNo;
NewReceiveDoc.ItemID = receiveDocFromPicklist.ItemID;
NewReceiveDoc.SupplierID = receiveDocFromPicklist.SupplierID;
if (receiveDocFromPicklist.s_ExpDate == null)
NewReceiveDoc.ExpDate = receiveDocFromPicklist.ExpDate;
NewReceiveDoc.StoreID = StoreID;
NewReceiveDoc.ReceivedBy = User;
NewReceiveDoc.Remark = receiveDocFromPicklist.Remark;
NewReceiveDoc.RefNo = "TA" + receiveDocFromPicklist.RefNo;
if (!receiveDocFromPicklist.IsColumnNull("Cost"))
NewReceiveDoc.Cost = receiveDocFromPicklist.Cost;
NewReceiveDoc.ManufacturerId = receiveDocFromPicklist.ManufacturerId;
NewReceiveDoc.Quantity = Convert.ToInt32(dvr["Packs"]) * Convert.ToInt32(dvr["QtyPerPack"]);
NewReceiveDoc.NoOfPack = Convert.ToInt32(dvr["Packs"]);
NewReceiveDoc.QtyPerPack = Convert.ToInt32(dvr["QtyPerPack"]);
if (!receiveDocFromPicklist.IsColumnNull("PricePerPack"))
NewReceiveDoc.PricePerPack = receiveDocFromPicklist.PricePerPack;
if (!receiveDocFromPicklist.IsColumnNull("SellingPrice"))
NewReceiveDoc.SellingPrice = receiveDocFromPicklist.SellingPrice;
NewReceiveDoc.UnitID = receiveDocFromPicklist.UnitID;
NewReceiveDoc.DeliveryNote = receiveDocFromPicklist.DeliveryNote;
//NewReceiveDoc.PricePerPack = receiveDocFromPicklist.PricePerPack;
NewReceiveDoc.QuantityLeft = Convert.ToInt32(dvr["Packs"]) * Convert.ToInt32(dvr["QtyPerPack"]);
NewReceiveDoc.EurDate = DateTimeHelper.ServerDateTime;
NewReceiveDoc.Date = EthiopianDate.EthiopianDate.Now.ToGregorianDate();
NewReceiveDoc.IsDamaged = receiveDocFromPicklist.IsDamaged;
NewReceiveDoc.Save();
NewReceiveDoc.SetStatusAsReceived(UserID);
PalletizeTransfer(NewReceiveDoc);
}
return ReferenceID;
}
示例4: SaveReceive
//.........这里部分代码省略.........
mergedDataTable = mergedDataTable == null ? shortageOrDamage.Select(string.Format("[Pack Qty] >= 0 "), "[ShortageReasonID] ASC ").CopyToDataTable() : shortageOrDamage;
}
}
foreach (DataRowView dr in mergedDataTable.DefaultView)
{
var shortageReasonID = dr["ShortageReasonID"];
var onlyOneEntryFound = _dtRecGrid.Select(String.Format("GUID = '{0}'", dr["GUID"]));
bool zeroQtyDueTomultipleBatchFound = (Convert.ToDecimal(dr["Pack Qty"]) == 0) && (shortageReasonID == DBNull.Value) && (onlyOneEntryFound.Count() == 1);
bool fullNotReceivedEntry = (Convert.ToDecimal(dr["BU Qty"]) == 0) && (shortageReasonID != DBNull.Value) && (Convert.ToInt32(shortageReasonID) == ShortageReasons.Constants.NOT_RECEIVED) && (onlyOneEntryFound.Count() == 1);
if (fullNotReceivedEntry)
{
dr["Pack Qty"] = 0;
}
var item = new Item();
item.LoadByPrimaryKey(Convert.ToInt32(dr["ID"]));
if (item.NeedExpiryBatch || (shortageReasonID == DBNull.Value && ((dr["Expiry Date"] != DBNull.Value) && (Convert.ToDateTime(dr["Expiry Date"]) <= DateTimeHelper.ServerDateTime))))
{
var expDate = Convert.ToDateTime(dr["Expiry Date"]);
if ((shortageReasonID == DBNull.Value && expDate > DateTimeHelper.ServerDateTime) || zeroQtyDueTomultipleBatchFound)
{
AddNewReceiveDoc(rec, receiptID, dr);
}
else
{
//for physically Damaged receives and expired receives
if ((shortageReasonID != DBNull.Value && Convert.ToInt32(shortageReasonID) == ShortageReasons.Constants.DAMAGED) || (shortageReasonID == DBNull.Value && expDate <= DateTimeHelper.ServerDateTime) || fullNotReceivedEntry)
{
AddNewReceiveDoc(rec, receiptID, dr, true);
if (shortageReasonID == DBNull.Value)
{
dr["ShortageReasonID"] = ShortageReasons.Constants.DAMAGED;
}
}
else
{
HandleReceiveDocShortage(dr, rec);
}
}
}
else
{
if ((shortageReasonID == DBNull.Value) || zeroQtyDueTomultipleBatchFound)
{
AddNewReceiveDoc(rec, receiptID, dr);
}
else
{
//for physically Damaged receives
if (shortageReasonID != DBNull.Value && Convert.ToInt32(shortageReasonID) == ShortageReasons.Constants.DAMAGED || fullNotReceivedEntry)
{
AddNewReceiveDoc(rec, receiptID, dr, true);
}
else
{
HandleReceiveDocShortage(dr, rec);
}
}
}
}
rec.SetStatusAsReceived(CurrentContext.UserId);
BLL.Receipt receiptStatus = new BLL.Receipt();
receiptStatus.LoadByPrimaryKey(receiptID);
receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.RECEIVE_ENTERED, null,
this.GetFormIdentifier(), CurrentContext.UserId, "Received");
if (!BLL.Settings.HandleGRV) //If HandleGRV is true, the price isn't entered in the receive stage meaning
{
rec.Rewind();
while (!rec.EOF)
{
if (!ReceiveDoc.DoesPriceNeedToBeChanged(rec.StoreID, rec.ItemID, rec.UnitID, rec.ManufacturerId) &&
(deliveryNoteType == DeliveryNoteType.NotSet))
{
rec.SellingPrice = rec.Cost;
rec.UnitCost = Convert.ToDecimal(rec.Cost);
// Added by Heny In order to display Unit Cost on Vaccine
rec.Margin = 0;
}
rec.MoveNext();
}
}
rec.Save(); //TODO: To be removed after the ShortageReasonID in receviedoc is discontinued.
//SavePalletization(rdDamaged);
_revDocRelatePalletGuid.Clear();
}
示例5: PassReceiveForQtyConfirmation
private void PassReceiveForQtyConfirmation()
{
if (gridReceiveView.GetFocusedDataRow() != null)
{
String reference = gridReceiveView.GetFocusedDataRow()["RefNo"].ToString();
if (gridDetailView.DataSource == null)
return;
BLL.ReceiveDoc recDoc = new ReceiveDoc();
recDoc.LoadByReferenceNo(reference);
recDoc.SetStatusAsReceived(CurrentContext.UserId);
BLL.Receipt receiptStatus = new BLL.Receipt();
receiptStatus.LoadByPrimaryKey(ReceiptID);
receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.RECEIVE_ENTERED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Quantity edited");
XtraMessageBox.Show("Receipt forwarded for quantity confirmation!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
BindFormContents();
}
}