本文整理汇总了C#中BLL.ReceiveDoc.LoadByReferenceNo方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.LoadByReferenceNo方法的具体用法?C# ReceiveDoc.LoadByReferenceNo怎么用?C# ReceiveDoc.LoadByReferenceNo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.LoadByReferenceNo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: PrintReceiptConfirmation
private void PrintReceiptConfirmation(string referenceNumber, int? reprintOfReceiptConfirmationPrintoutID)
{
var rc = new ReceiptConfirmationPrintout();
var srmPrintout = new HCMIS.Desktop.Reports.SRMPrintout(CurrentContext.LoggedInUserName);
int ReceiptID = Convert.ToInt32(gridReceiveView.GetFocusedDataRow()["ReceiptID"]);
var receiveDoc = new ReceiveDoc();
receiveDoc.LoadByReceiptID(ReceiptID);
ReceiptConfirmationPrintout.GetGRNFNo(ReceiptID);
srmPrintout.BranchName.Text = GeneralInfo.Current.HospitalName;
rc.PrepareDataForPrintout(ReceiptID, CurrentContext.UserId, false, 3, null,
reprintOfReceiptConfirmationPrintoutID,FiscalYear.Current);
srmPrintout.DataSource = rc.DefaultView.ToTable();
var rUnit = new Institution();
var idoc = new IssueDoc();
if (!receiveDoc.IsColumnNull("ReturnedFromIssueDocID"))
{
idoc.LoadByPrimaryKey(receiveDoc.ReturnedFromIssueDocID);
rUnit.LoadByPrimaryKey(idoc.ReceivingUnitID);
}
else
{
var po = new PO();
po.LoadByReceiptID(receiveDoc.ReceiptID);
rUnit.LoadByPrimaryKey(int.Parse(po.RefNo));
}
srmPrintout.xrFromValue.Text = rUnit.Name;
srmPrintout.xrWoredaValue.Text = rUnit.WoredaText;
srmPrintout.xrRegionValue.Text = rUnit.Region;
srmPrintout.xrZoneValue.Text = rUnit.ZoneText;
if (!receiveDoc.IsColumnNull("ReturnedFromIssueDocID"))
{
var stvLog = new BLL.Issue();
stvLog.LoadByPrimaryKey(idoc.STVID);
srmPrintout.xrIssueDateValue.Text = idoc.Date.ToString("M/d/yyyy");
var activity = new Activity();
activity.LoadByPrimaryKey(idoc.StoreId);
srmPrintout.xrAccountName.Text = activity.FullActivityName;
var rct = new BLL.Receipt();
rct.LoadByPrimaryKey(ReceiptID);
var rctInvoice = new ReceiptInvoice();
rctInvoice.LoadByPrimaryKey(rct.ReceiptInvoiceID);
srmPrintout.xrSTVNoValue.Text = rctInvoice.STVOrInvoiceNo;
}
else
{
var activity = new Activity();
activity.LoadByPrimaryKey(receiveDoc.StoreID);
srmPrintout.xrAccountName.Text = activity.FullActivityName;
srmPrintout.xrSTVNoValue.Text = receiveDoc.RefNo;
}
var dtDate = new DateTimePickerEx();
dtDate.Value = receiveDoc.EurDate;
srmPrintout.Date.Text = dtDate.Text;
if (srmPrintout.PrintDialog() != DialogResult.OK)
{
throw new Exception("Print cancelled by user!");
}
//Successfully printed
//Release Product
var GRV = new CostCalculator();
GRV.LoadGRV(ReceiptID);
GRV.ReleaseForIssue();
String reference = gridReceiveView.GetFocusedDataRow()["RefNo"].ToString();
var recDoc = new ReceiveDoc();
recDoc.LoadByReferenceNo(reference);
recDoc.ConfirmGRVPrinted(CurrentContext.UserId);
BLL.Receipt receiptStatus = new BLL.Receipt();
receiptStatus.LoadByPrimaryKey(ReceiptID);
receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.GRV_PRINTED, null, this.GetFormIdentifier(), CurrentContext.UserId, "GRV Printed");
BindFormContents();
}
示例3: PrintReceiptConfirmation
private void PrintReceiptConfirmation(string referenceNumber, int? reprintOfReceiptConfirmationPrintoutID)
{
ReceiptConfirmationPrintout rc = new ReceiptConfirmationPrintout();
HCMIS.Desktop.Reports.ReceiptConfirmationPrintout printout = new HCMIS.Desktop.Reports.ReceiptConfirmationPrintout(CurrentContext.LoggedInUserName);
HCMIS.Desktop.Reports.SRMPrintout srmPrintout = new HCMIS.Desktop.Reports.SRMPrintout(CurrentContext.LoggedInUserName);
int ReceiptID = Convert.ToInt32(gridReceiveView.GetFocusedDataRow()["ReceiptID"]);
BLL.ReceiveDoc receiveDoc = new ReceiveDoc();
// receiveDoc.LoadByReferenceNo(reference);
receiveDoc.LoadByReceiptID(ReceiptID);
BLL.Supplier supplier = new Supplier();
supplier.LoadByPrimaryKey(receiveDoc.SupplierID);
int printedID = 0;
int GRNFNo = BLL.ReceiptConfirmationPrintout.GetGRNFNo(ReceiptID);
if (currentMode == Modes.DeliveryNotePrinting)
{
printout.BranchName.Text = GeneralInfo.Current.HospitalName;
printout.xrGRVLabel.Text = "Delivery Note.";
printout.xrAir.Visible = false;
printout.xrAirValue.Visible = false;
printout.xrTransit.Visible = false;
printout.xrTransitValue.Visible = false;
printout.xrInsurance.Visible = false;
printout.xrInsuranceValue.Visible = false;
printout.xrNumberOfCases.Visible = false;
printout.xrNumberOfCasesValue.Visible = false;
printout.xrInvoiceNo.Visible = false;
printout.xrInvoiceNoValue.Visible = false;
printout.xrPurchaseOrderNo.Visible = false;
printout.xrPurchaseOrderNoValue.Visible = false;
printout.xrSTV.Visible = false;
printout.xrSTVNoValue.Visible = false;
printout.DataSource = rc.PrepareDataForPrintout(ReceiptID, CurrentContext.UserId, false, 5, null, reprintOfReceiptConfirmationPrintoutID,FiscalYear.Current);
CalendarLib.DateTimePickerEx dtDate = new CalendarLib.DateTimePickerEx();
//dtDate.CustomFormat = "dd/MM/yyyy";
dtDate.Value = receiveDoc.EurDate;
printout.Date.Text = dtDate.Text;
}
var activity = new Activity();
activity.LoadByPrimaryKey(receiveDoc.StoreID);
printout.xrLabelStoreName.Text = activity.FullActivityName;
if (ReceiveDoc.IsThereShortageOrDamage(ReceiptID))
{
HCMIS.Desktop.Reports.ReceiptConfirmationShortagePrintout printoutShortage =
PrintReceiptConfirmationForShortage(referenceNumber, printedID);
printout.xrShortageReport.ReportSource = printoutShortage;
printout.PrintingSystem.ContinuousPageNumbering = true;
}
else
{
printout.ReportFooter.Visible = false;
}
//Successfully printed
//Release Product
CostCalculator GRV = new CostCalculator();
GRV.LoadGRV(ReceiptID);
GRV.ReleaseForIssue();
String reference = gridReceiveView.GetFocusedDataRow()["RefNo"].ToString();
BLL.ReceiveDoc recDoc = new ReceiveDoc();
recDoc.LoadByReferenceNo(reference);
recDoc.ConfirmGRVPrinted(CurrentContext.UserId);
BindFormContents();
}
示例4: 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();
}
}