本文整理汇总了C#中BLL.ReceiveDoc类的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc类的具体用法?C# ReceiveDoc怎么用?C# ReceiveDoc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReceiveDoc类属于BLL命名空间,在下文中一共展示了ReceiveDoc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateCurrentVolume
/// <summary>
/// Calculates the current volume of a pallet,
/// this assumes that the box levels have all the dimentions set.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public double CalculateCurrentVolume( int id)
{
Pallet p = new Pallet();
p.GetAllItemsInPallet(id);
ReceiveDoc rd = new ReceiveDoc();
ItemManufacturer im = new ItemManufacturer();
double volume = 0;
foreach (DataRowView drv in p.DefaultView)
{
//Get the recieving box size and manufacturer
rd.LoadByPrimaryKey(Convert.ToInt32(drv["ReceiveID"]));
//Handle if the box size was not specified for some reason.
// this shouldn't happen on a non error condition
if (drv["BoxSize"].ToString() == "")
{
drv["BoxSize"] = 0;
}
im.LoadIMbyLevel(rd.ItemID, rd.ManufacturerId, Convert.ToInt32(drv["BoxSize"]));
if (im.RowCount == 0)
{
im.LoadIMbyLevel(rd.ItemID, rd.ManufacturerId, 0);
}
double quantity = Convert.ToInt32(drv["Balance"])/im.QuantityInBasicUnit;
volume += quantity * im.Volume;
// find the volume of the items in the current pallet.
}
return volume;
}
示例2: SetStatusConfirmQuantityAndLocation
internal void SetStatusConfirmQuantityAndLocation(int receiveID, int? userID)
{
LoadByReceiveDocID(receiveID);
BLL.ReceiveDoc rcDoc=new ReceiveDoc();
BLL.Receipt rct = new Receipt();
rcDoc.LoadByPrimaryKey(receiveID);
rct.LoadByPrimaryKey(rcDoc.ReceiptID);
if (RowCount == 0)
{
AddNew();
ReceiveDocID = receiveID;
}
if(userID.HasValue)
{
ReceiptQuantityConfirmedByUserID = userID.Value;
}
ReceiptConfirmationStatusID = rct.ReceiptTypeID == BLL.ReceiptType.CONSTANTS.BEGINNING_BALANCE?
ReceiptConfirmationStatus.Constants.GRV_PRINTED:
ReceiptConfirmationStatus.Constants.RECEIVE_QUANTITY_CONFIRMED;
Save();
}
示例3: checkOutstandingReceives
public static bool checkOutstandingReceives(int warehouseID)
{
var query = HCMIS.Repository.Queries.ReceiveDoc.SelectCheckOutstandingReceives(warehouseID, ReceiptConfirmationStatus.Constants.GRV_PRINTED, ReceiptType.CONSTANTS.STOCK_RETURN, ReceiptType.CONSTANTS.STANDARD_RECEIPT);
ReceiveDoc receipt = new ReceiveDoc();
receipt.LoadFromRawSql(query);
return receipt.Getint("count") == 0;
}
示例4: DeleteAReceiveDocEntry
/// <summary>
/// Deletes the A receive doc entry.
/// </summary>
/// <param name="receiveDocID">The receive doc ID.</param>
/// <param name="userID">The user ID.</param>
/// <exception cref="System.Exception"></exception>
public static void DeleteAReceiveDocEntry(int receiveDocID, int userID)
{
var rd = new ReceiveDoc();
rd.LoadByPrimaryKey(receiveDocID);
if (rd.RowCount > 0)
{
if (rd.HasTransactions())
{
string printedIDs = "";
var issueDoc = new IssueDoc();
issueDoc.LoadByReceiveDocID(rd.ID);
issueDoc.Rewind();
while (!issueDoc.EOF)
{
var stvs = new BLL.Issue();
stvs.LoadByPrimaryKey(issueDoc.STVID);
printedIDs += stvs.IDPrinted.ToString(CultureInfo.InvariantCulture) + " ,";
issueDoc.MoveNext();
}
printedIDs = printedIDs.Remove(printedIDs.Length - 1, 1);
throw new Exception(
string.Format("Please cancel/void the following Stvs: With PrintedIDs : {0}", printedIDs));
}
HandleReceiveDocDeleting(receiveDocID, userID, rd);
}
}
示例5: 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.ConfirmGRNFPrinted(null);
BLL.Receipt receiptStatus = new BLL.Receipt();
receiptStatus.LoadByPrimaryKey(ReceiptID);
receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.GRNF_PRINTED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Return For Price Change");
transaction.CommitTransaction();
this.LogActivity("Return-For-Costing", 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);
}
示例6: gridOrderListView_FocusedRowChanged
private void gridOrderListView_FocusedRowChanged(object sender,
DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
DataRow dr = gridOrderListView.GetFocusedDataRow();
if (dr != null)
{
int receiptID = Convert.ToInt32(dr["ID"]);
ReceiveDoc receiveDoc = new ReceiveDoc();
receiveDoc.LoadAllByReceiptID(receiptID);
DataTable tbl = receiveDoc.DefaultView.ToTable();
ReceiveDocDeleted receiveDocDeleted = new ReceiveDocDeleted();
receiveDocDeleted.LoadAllByReceiptID(receiptID);
LogReceiptStatus logReceiptStatus = new LogReceiptStatus();
gridHistory.DataSource = logReceiptStatus.GetLogHistory(receiptID);
if (receiveDocDeleted.RowCount > 0)
{
tbl.Merge(receiveDocDeleted.DefaultView.ToTable());
BLL.User user = new User();
user.LoadByPrimaryKey(receiveDocDeleted.DeletedBy);
if (user.RowCount > 0)
{
lblDeletedBy.Text = string.Format("Deleted By {0}",
string.IsNullOrEmpty(user.FullName)
? user.UserName
: user.FullName);
}
}
gridOrderDetail.DataSource = tbl;
}
}
示例7: GetLastReceivedDate
/// <summary>
/// Gets the last issued date for the facility
/// </summary>
/// <param name="storeId"></param>
/// <param name="itemId"></param>
/// <returns></returns>
public static DateTime GetLastReceivedDate()
{
var rd = new ReceiveDoc();
rd.LoadFromRawSql(String.Format("SELECT TOP (1) EurDate FROM ReceiveDoc ORDER BY EurDate DESC"));
DateTime dt = (rd.DataTable.Rows.Count > 0) ? Convert.ToDateTime(rd.DataTable.Rows[0]["EurDate"]) : new DateTime();
return dt;
}
示例8: cboSuppliers_SelectedValueChanged
private void cboSuppliers_SelectedValueChanged(object sender, EventArgs e)
{
if (cboSuppliers.EditValue != null)
{
ReceiveDoc rec = new ReceiveDoc();
DataTable dtRec = new DataTable();
dtRec = rec.GetTransactionBySupplierId(Convert.ToInt32(cboStores.EditValue),
Convert.ToInt32(cboSuppliers.EditValue));
PopulateTransactions(dtRec);
}
}
示例9: BalanceAllItems
public DataTable BalanceAllItems(int storeId, int year, int month, string selectedType)
{
IssueDoc iss = new IssueDoc();
ReceiveDoc rec = new ReceiveDoc();
Disposal dis = new Disposal();
YearEnd yEnd = new YearEnd();
Items itm = new Items();
DataTable dtResult = new DataTable();
string[] col = { "FullItemName", "BBalance", "BBAmount", "ReceivedQty", "ReceivedAmount", "IssuedQty", "IssuedAmount", "LossesQty", "LossesAmount", "AdjustedQty", "AdjustedAmount", "SOH", "SOHAmount", "Received", "ID", "CategoryId", "SubCategoryID" };
int i = 0;
foreach (string s in col)
{
if (i > 0)
{
dtResult.Columns.Add(s, typeof(double));
}
else
{
dtResult.Columns.Add(s);
}
i++;
}
DataTable dtItem = ((selectedType == "Drug") ? itm.GetAllItems(1) : itm.GetAllSupply());
foreach (DataRow dr in dtItem.Rows)
{
string itemName = dr["FullItemName"].ToString();// +" - " + dr["DosageForm"].ToString() + " - " + dr["Strength"].ToString();
int itemId = Convert.ToInt32(dr["ID"]);
Int64 bb = yEnd.GetBBalance(year, storeId, itemId, month);
double bbAmount = yEnd.GetBBalanceAmount(year, storeId, itemId, month);
Int64 recQuant = rec.GetReceivedQuantityTillMonth(itemId, storeId, month, year);
double recPrice = rec.GetReceivedAmountTillMonth(itemId, storeId, month, year);
Int64 issuedQuant = iss.GetIssuedQuantityTillMonth(itemId, storeId, month, year);
double issPrice = iss.GetIssuedAmountTillMonth(itemId, storeId, month, year);
Int64 lossQuant = dis.GetLossesQuantityTillMonth(itemId, storeId, month, year);
double lossAmount = dis.GetLossesAmountTillMonth(itemId, storeId, month, year);
Int64 adjQuant = dis.GetAdjustedQuantityTillMonth(itemId, storeId, month, year);
double adjAmount = dis.GetAdjustedAmountTillMonth(itemId, storeId, month, year);
Int64 SOH = bb + recQuant + adjQuant - issuedQuant - lossQuant;
double SOHAmount = (bbAmount + recPrice + adjAmount - issPrice) - lossAmount;
if (SOHAmount < 0)
{
;
}
int Isrec = ((bb == 0 && recQuant == 0) ? 0 : 1);
object[] obj = { itemName, bb, bbAmount, recQuant, recPrice, issuedQuant, issPrice, lossQuant, lossAmount, adjQuant, adjAmount, SOH, SOHAmount, Isrec, itemId, Convert.ToInt32(dr["CategoryId"]), Convert.ToInt32(dr["SubCategoryID"]) };
dtResult.Rows.Add(obj);
}
return dtResult;
}
示例10: EditRecieveRefrenceNo_Load
private void EditRecieveRefrenceNo_Load(object sender, EventArgs e)
{
dtRecDate.Value = DateTime.Now;
dtRecDate.CustomFormat = "MM/dd/yyyy";
var rec = new ReceiveDoc();
if(_refno!=null)
{
dtRecDate.ResetValue();
rec.GetTransactionByRefNo(_refno);
refnotextEdit.Text = rec.RefNo;
DateTime dtDate = Convert.ToDateTime(rec.Date.ToString("MM/dd/yyyy"));
txtDate.Text = dtDate.ToShortDateString();
}
}
示例11: RelatedReceipts_Load
private void RelatedReceipts_Load(object sender, EventArgs e)
{
BLL.ReceiveDoc rdoc = new ReceiveDoc();
rdoc.LoadByPrimaryKey(_reciptID);
if (mode==RelatedReceiptMode.WAREHOUSE_MODE)
{
gridMain.DataSource = BLL.Receipt.GetRawInventoryCountbyAccountandWarehouseItem(_accountID, _warehouseID,
rdoc.ItemID, rdoc.UnitID);
}
else if(mode==RelatedReceiptMode.PHYSICAL_STORE_MODE)
{
gridMain.DataSource = BLL.Receipt.GetRawInventoryCountbyAccountandPhysicalStoreItem(_accountID, _warehouseID,
rdoc.ItemID, rdoc.UnitID);
}
}
示例12: btnChangeReceiptConfirmationStatus_Click
private void btnChangeReceiptConfirmationStatus_Click(object sender, EventArgs e)
{
int newReceiptConfirmationStatus = int.Parse(lkReceiptConfirmationStatus.EditValue.ToString());
BLL.ReceiveDoc rd = new ReceiveDoc();
rd.LoadByReceiptID(int.Parse(txtReceiptID.Text));
while (!rd.EOF)
{
ReceiveDocConfirmation rdc = new ReceiveDocConfirmation();
rdc.LoadByReceiveDocID(rd.ID);
rdc.ReceiptConfirmationStatusID = newReceiptConfirmationStatus;
rdc.Save();
rd.MoveNext();
}
XtraMessageBox.Show("Successful!");
}
示例13: btnSave_Click
private void btnSave_Click(object sender, EventArgs e)
{
string valid = ValidateFields();
if (valid == "true")
{
if (XtraMessageBox.Show("Are You Sure, You want to save this Transaction?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
IssueDoc iss = new IssueDoc();
ReceiveDoc rec = new ReceiveDoc();
iss.LoadByPrimaryKey(_tranId);
string batchNo = iss.BatchNo;
Int64 qty = iss.Quantity;
rec.GetTransactionByBatch(iss.ItemID, iss.BatchNo, iss.StoreId);
iss.RefNo = txtRefNo.Text;
iss.BatchNo = txtBatchNo.Text;
iss.NoOfPack = Convert.ToInt32(txtPack.Text);
iss.QtyPerPack = Convert.ToInt32(txtQtyPack.Text);
iss.Quantity = Convert.ToInt32(txtPack.Text) * Convert.ToInt32(txtQtyPack.Text);
iss.StoreId = Convert.ToInt32(cboStores.SelectedValue);
iss.ReceivingUnitID = Convert.ToInt32(cboReceivingUnit.SelectedValue);
iss.Remark = txtRemark.Text;
iss.IssuedBy = txtReceivedBy.Text;
iss.Save();
Int64 newQty = 0;
if(qty > iss.Quantity)
newQty = rec.QuantityLeft + (qty - iss.Quantity);
else
newQty = rec.QuantityLeft - (iss.Quantity - qty);
rec.QuantityLeft = newQty;
if(rec.QuantityLeft >0)
rec.Out = false;
rec.Save();
XtraMessageBox.Show("Transaction Succsfully Saved!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
}
}
else
{
XtraMessageBox.Show(valid, "Validation", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}
示例14: AddNewLog
/// <summary>
/// Adds a new delete log
/// </summary>
/// <param name="deletedReceiveDoc">The ReceiveDoc object to be deleted</param>
/// <param name="deletedByUser">The user performing the deletion</param>
public static ReceiveDocDeleted AddNewLog(ReceiveDoc deletedReceiveDoc, int deletedByUser)
{
var recLog = new ReceiveDocDeleted();
recLog.AddNew();
foreach (DataColumn col in deletedReceiveDoc.DefaultView.Table.Columns)
{
try
{
recLog.SetColumn(col.ColumnName, deletedReceiveDoc.GetColumn(col.ColumnName));
}
catch { /*Till VVMID Column generated for ReceiveDocDeleted! */}
}
recLog.DeletedBy = deletedByUser;
recLog.DateDeleted = DateTimeHelper.ServerDateTime;
return recLog;
}
示例15: MarkReceivedBatchAsEmpty
public static bool MarkReceivedBatchAsEmpty(int receiveID)
{
try
{
BLL.ReceiveDoc rec = new ReceiveDoc();
rec.LoadByPrimaryKey(receiveID);
if (rec.RowCount > 0)
{
rec.QuantityLeft = 0;
rec.Out = true;
rec.Save();
return true;
}
return false;
}
catch
{
return false;
}
}