Ejemplo n.º 1
0
        /// <summary>
        /// this method Set ReturnTable Information.
        /// </summary>
        /// <param name="lsNewRMA">
        /// List of Return info.
        /// </param>
        /// <param name="ReturnReason">
        /// string of ReturnReason.
        /// </param>
        /// <param name="RMAStatus">
        /// Byte of RMA Status.
        /// </param>
        /// <param name="Decision">
        /// Byte Of Decision.
        /// </param>
        /// <param name="CreatedBy">
        /// Guid CreatedBy pass user Guid.
        /// </param>
        /// <returns>
        /// Return Guid ReturnID.
        /// </returns>
        public Guid SetReturnTbl(List <Return> lsNewRMA, String ReturnReason, Byte RMAStatus, Byte Decision, Guid CreatedBy)
        {
            Guid _returnID = Guid.Empty;

            try
            {
                //Return table new object.
                Return TblRerutn = new Return();

                TblRerutn.ReturnID       = Guid.NewGuid();
                TblRerutn.RMANumber      = null;//lsNewRMA[0].RMANumber;
                TblRerutn.ShipmentNumber = lsNewRMA[0].ShipmentNumber;
                TblRerutn.OrderNumber    = "N/A";
                TblRerutn.PONumber       = lsNewRMA[0].PONumber;
                TblRerutn.OrderDate      = DateTime.UtcNow;
                TblRerutn.DeliveryDate   = DateTime.UtcNow;
                TblRerutn.ReturnDate     = lsNewRMA[0].ReturnDate;
                TblRerutn.VendorNumber   = lsNewRMA[0].VendorNumber;
                TblRerutn.VendoeName     = lsNewRMA[0].VendoeName;
                TblRerutn.CustomerName1  = lsNewRMA[0].CustomerName1;
                TblRerutn.ScannedDate    = lsNewRMA[0].ScannedDate;
                TblRerutn.ExpirationDate = lsNewRMA[0].ExpirationDate;
                TblRerutn.CustomerName2  = "N/A";
                TblRerutn.Address1       = lsNewRMA[0].Address1;
                TblRerutn.Address2       = "N/A";
                TblRerutn.Address3       = "N/A";
                TblRerutn.ZipCode        = lsNewRMA[0].ZipCode;
                TblRerutn.City           = lsNewRMA[0].City;
                TblRerutn.State          = lsNewRMA[0].State;
                TblRerutn.Country        = lsNewRMA[0].Country;
                TblRerutn.ReturnReason   = ReturnReason;
                TblRerutn.RMAStatus      = RMAStatus;
                TblRerutn.Decision       = Decision;
                TblRerutn.CreatedBy      = CreatedBy;
                TblRerutn.CreatedDate    = DateTime.UtcNow;
                TblRerutn.UpdatedBy      = null;
                TblRerutn.UpdatedDate    = DateTime.Now;

                //On success of transaction it returns id.
                if (cReturnTbl.UpdateReturn(TblRerutn))
                {
                    _returnID = TblRerutn.ReturnID;
                }
            }
            catch (Exception)
            {
            }
            return(_returnID);
        }
Ejemplo n.º 2
0
 public Boolean UpsetReturnTbl(Return Rtn)
 {
     return(_cReturn.UpdateReturn(Rtn));
 }