当前位置: 首页>>代码示例>>C#>>正文


C# ReceiveDoc.LoadAllByReceiptID方法代码示例

本文整理汇总了C#中BLL.ReceiveDoc.LoadAllByReceiptID方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.LoadAllByReceiptID方法的具体用法?C# ReceiveDoc.LoadAllByReceiptID怎么用?C# ReceiveDoc.LoadAllByReceiptID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BLL.ReceiveDoc的用法示例。


在下文中一共展示了ReceiveDoc.LoadAllByReceiptID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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;
            }
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:33,代码来源:ReceiveStatusReport.cs

示例2: SaveCostCoefficientAndTotalValue

        public void SaveCostCoefficientAndTotalValue(int userID)
        {
            ReceiveDoc grvFullDetail = new ReceiveDoc();
               grvFullDetail.FlushData();
               grvFullDetail.LoadAllByReceiptID(GRV.ID);

               while (!grvFullDetail.EOF)
               {
                  //Insurance here is costCoefficient
                ReceiveDoc receivedoc = new ReceiveDoc();
                receivedoc.LoadByPrimaryKey(grvFullDetail.ID);
                //Use Custom StoreProcedure for Costing
                receivedoc.Insurance = CostCoefficient;
                receivedoc.Save();
                ReceiveDoc.SetUnitCostByReceiveDoc(grvFullDetail.ID,Math.Round(receivedoc.PricePerPack * CostCoefficient,2),userID);
                ReceiveDoc.SetAverageCostByReceiveDoc(grvFullDetail.ID,Math.Round(receivedoc.PricePerPack * CostCoefficient,2),userID);
                grvFullDetail.MoveNext();
               }
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:19,代码来源:CostCalculator.cs

示例3: PrepareDataForPrintout

        /// <summary>
        /// 
        /// </summary>
        /// <param name="refNo"></param>
        /// <param name="userID"></param>
        /// <param name="shortageAndDamage"></param>
        /// <param name="preGRVOrGRVOrSRM">1-PreGRV, 2-GRV, 3-SRM, 4-iGRV, 5-DeliveryNote</param>
        /// <param name="IDToBePrintedOut">Only applicable for the shortage where we need to show the same ID</param>
        /// <returns></returns>
        public int PrepareDataForPrintout(int ReceiptID, int? userID, bool shortageAndDamage, int preGRVOrGRVOrSRM, int? IDToBePrintedOut, int? isReprintOfRCPrintoutID,FiscalYear fiscalYear)
        {
            string query = "";

            if (!shortageAndDamage && preGRVOrGRVOrSRM != 3)
            {
                query =
                    HCMIS.Repository.Queries.ReceiptConfirmationPrintout.SelectPrepareDataForPrintout(ReceiptID, StorageType.Quaranteen);
            }
            else if (preGRVOrGRVOrSRM == 3)//SRM
            {
                BLL.ReceiveDoc rd = new ReceiveDoc();
                rd.LoadAllByReceiptID(ReceiptID);
                if (rd.IsColumnNull("ReturnedFromIssueDocID")) //This is an SRM done for an issue from the old system. (The issue was done using the old system)
                {
                    query = HCMIS.Repository.Queries.ReceiptConfirmationPrintout.SelectPrepareDataForPrintoutIssueDone(ReceiptID);
                }
                else //This is a normal SRM (Both the issue and the receive were done using this system)
                {
                    query = HCMIS.Repository.Queries.ReceiptConfirmationPrintout.SelectPrepareDataForPrintoutIssueAndReceiveDone(ReceiptID);

                }
            }
            else
            {
                //Cost Calculations should be removed from the query below
                query = HCMIS.Repository.Queries.ReceiptConfirmationPrintout.SelectPrepareDataForPrintout(ReceiptID);
            }
            this.LoadFromRawSql(query);

            if (this.RowCount == 0)
            {
                if (ReceiveDoc.IsThereShortageOrDamage(ReceiptID))
                {
                    query = HCMIS.Repository.Queries.ReceiptConfirmationPrintout.SelectPrepareDataForPrintout(ReceiptID);
                    this.LoadFromRawSql(query);
                }
                if (this.RowCount == 0)
                    throw new Exception("No Data To Print, please receive Document before Trying again");

            }

            this.Rewind();

            this.AddColumn("LineNum", typeof(int));
            this.AddColumn("PrintedGRVNumber", typeof(string));

            BLL.Receipt receipt = new Receipt();
            int receiptID = int.Parse(this.GetColumn("ReceiptID").ToString());
            receipt.LoadByPrimaryKey(receiptID);

            int receiptTypeID = receipt.ReceiptTypeID;
            int printedGRVNumber;
            int lineNum = 1;
            int totalItems = 0;

            BLL.ReceiptConfirmationPrintout rcp = new ReceiptConfirmationPrintout();
            int? supplierID = null;
            if (preGRVOrGRVOrSRM != 3)
                supplierID = this.SupplierID;
            if (IDToBePrintedOut.HasValue)
            {
                printedGRVNumber = IDToBePrintedOut.Value;
            }
            else
            {
               printedGRVNumber = rcp.AddNew(this.StoreID, supplierID, receiptTypeID == 2 ? null : userID, receipt.ID,
                           preGRVOrGRVOrSRM, isReprintOfRCPrintoutID);
            }

            if (!IDToBePrintedOut.HasValue) //We want to save a new receipt confirmation printout only when a new ID is generated (Not when an ID to be printed has been passed as a parameter)
            {
                 //For delivery note only, we don't save the saved by user id so that we don't say GRV has been printed.
            }

            while (!this.EOF)
            {
                this.SetColumn("LineNum", lineNum);
                lineNum++;
                this.SetColumn("PrintedGRVNumber", fiscalYear.GetCode(printedGRVNumber));

                totalItems++;
                this.MoveNext();
            }

            return  printedGRVNumber;
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:96,代码来源:ReceiptConfirmationPrintout.cs

示例4: PrintReceiptConfirmationForShortage

        private HCMIS.Desktop.Reports.ReceiptConfirmationShortagePrintout PrintReceiptConfirmationForShortage(int ReceiptID, int printedID)
        {
            HCMIS.Desktop.Reports.ReceiptConfirmationShortagePrintout printout = new HCMIS.Desktop.Reports.ReceiptConfirmationShortagePrintout();
               ReceiptConfirmationPrintout rc = new ReceiptConfirmationPrintout();

            BLL.ReceiveDoc receiveDoc = new ReceiveDoc();
            receiveDoc.LoadAllByReceiptID(ReceiptID);

            if (currentMode == Modes.GRVPrinting )
            {
                BLL.Supplier supplier = new Supplier();
                supplier.LoadByPrimaryKey(receiveDoc.SupplierID);
            }
            rc.PrepareDataForPrintout(ReceiptID, CurrentContext.UserId, true, 2, printedID,null,FiscalYear.Current);
            printout.DataSource = rc.DefaultView.ToTable();
            return printout;
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:17,代码来源:PrintoutGRV.cs


注:本文中的BLL.ReceiveDoc.LoadAllByReceiptID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。