Exemplo n.º 1
0
        /// <summary>
        /// Loads the header info.
        /// </summary>
        private void LoadHeaderInfo()
        {
            InvtBatchRPL_Header oHeader = InvtBatchRPL_Header.Load(this.HeaderId);

            if (oHeader != null)
            {
                ShowFromLocation(oHeader.FromLocation);
                txtTxNumber.Text = oHeader.TxNumber;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the header info.
        /// </summary>
        private void LoadHeaderInfo()
        {
            InvtBatchRPL_Header oHeader = InvtBatchRPL_Header.Load(this.HeaderId);

            if (oHeader != null)
            {
                this.txtTxNumber.Text = oHeader.TxNumber;

                string    query = "WorkplaceCode = '" + oHeader.FromLocation + "'";
                Workplace oWp   = Workplace.LoadWhere(query);
                if (oWp != null)
                {
                    this.FromLocation = oWp.WorkplaceId;
                }

                ShowFromLocation();
                CalcTotalRplQty();
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Saves the header info.
        /// </summary>
        private void SaveHeaderInfo()
        {
            InvtBatchRPL_Header oRPL = InvtBatchRPL_Header.Load(this.HeaderId);

            if (oRPL == null)
            {
                oRPL = new InvtBatchRPL_Header();

                txNumber            = Common.Utility.QueuingTxNumber(RT2020.DAL.Common.Enums.TxType.RPL);
                oRPL.TxNumber       = txNumber;
                oRPL.TxDate         = DateTime.Now;
                oRPL.FromLocation   = GetLocationCode(this.FromLocation);
                oRPL.ToLocation     = GetLocationCode(Common.Utility.CurrentWorkplaceId);
                oRPL.TXFOn          = DateTime.Now;
                oRPL.Status         = 1;
                oRPL.StaffId        = Common.Utility.CurrentUserId;
                oRPL.Confirmed      = false;
                oRPL.ConfirmedBy    = Common.Utility.CurrentUserId;
                oRPL.ConfirmedOn    = DateTime.Now;
                oRPL.SpecialRequest = true;
                oRPL.Posted         = false;


                oRPL.CreatedBy = Common.Utility.CurrentUserId;
                oRPL.CreatedOn = DateTime.Now;
            }

            oRPL.ModifiedBy = Common.Utility.CurrentUserId;
            oRPL.ModifiedOn = DateTime.Now;
            oRPL.Retired    = false;
            oRPL.RetiredBy  = System.Guid.Empty;
            oRPL.RetiredOn  = new DateTime(1900, 1, 1);

            oRPL.Save();

            this.HeaderId = oRPL.HeaderId;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Saves this instance.
        /// </summary>
        private void Save(bool bConfirmed)
        {
            string sheaderid = string.Empty;

            for (int i = 0; i < dgvConfirmationList.Rows.Count; i++)
            {
                DataGridViewRow oRow = dgvConfirmationList.Rows[i];
                if (RT2020.DAL.Common.Utility.IsGUID(oRow.Cells[0].Value.ToString()))
                {
                    System.Guid detailId = new Guid(oRow.Cells[0].Value.ToString());

                    InvtBatchRPL_Details oDetail = InvtBatchRPL_Details.Load(detailId);
                    if (oDetail != null)
                    {
                        oDetail.QtyIssued = Convert.ToDecimal(oRow.Cells[9].Value);
                        oDetail.Save();
                    }
                }
            }

            InvtBatchRPL_Header oHeader = InvtBatchRPL_Header.Load(this.HeaderId);

            if (oHeader != null)
            {
                if (bConfirmed)
                {
                    oHeader.Confirmed   = true;
                    oHeader.ConfirmedBy = Common.Utility.CurrentUserId;
                    oHeader.ConfirmedOn = DateTime.Now;
                }

                oHeader.ModifiedBy = Common.Utility.CurrentUserId;
                oHeader.ModifiedOn = DateTime.Now;
                oHeader.Save();
            }
        }