Exemple #1
0
        public static List <EPR> GetEPRLog(System.Int32?eprId)
        {
            List <EPRDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.EPRProvider.GetEPRLog(eprId);

            if (lstDetails == null)
            {
                return(null);
            }
            else
            {
                List <EPR> lst = new List <EPR>();
                foreach (EPRDetails objDetails in lstDetails)
                {
                    EPR obj = new EPR();
                    obj.EPRLogId            = objDetails.EPRLogId;
                    obj.EPRId               = objDetails.EPRId;
                    obj.Details             = objDetails.Details;
                    obj.UpdatedByName       = objDetails.UpdatedByName;
                    obj.DLUP                = objDetails.DLUP;
                    obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Exemple #2
0
        // <summary>
        /// Get
        /// Calls [usp_select_ListEPR]
        /// </summary>
        public static List <EPR> ListEPR(System.Int32?PoId)
        {
            List <EPRDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.EPRProvider.ListEPR(PoId);

            if (lstDetails == null)
            {
                return(null);
            }
            else
            {
                List <EPR> lst = new List <EPR>();
                foreach (EPRDetails objDetails in lstDetails)
                {
                    EPR obj = new EPR();
                    obj.EPRId               = objDetails.EPRId;
                    obj.PurchaseOrderId     = objDetails.PurchaseOrderId;
                    obj.CompanyName         = objDetails.CompanyName;
                    obj.IsNew               = objDetails.IsNew;
                    obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
                    obj.OrderValue          = objDetails.OrderValue;
                    obj.DeliveryDate        = objDetails.DeliveryDate;
                    obj.InAdvance           = objDetails.InAdvance;
                    obj.UponReceipt         = objDetails.UponReceipt;
                    obj.NetSpecify          = objDetails.NetSpecify;
                    obj.OtherSpecify        = objDetails.OtherSpecify;
                    obj.TT                    = objDetails.TT;
                    obj.Cheque                = objDetails.Cheque;
                    obj.CreditCard            = objDetails.CreditCard;
                    obj.Comments              = objDetails.Comments;
                    obj.Name                  = objDetails.Name;
                    obj.Address               = objDetails.Address;
                    obj.Tel                   = objDetails.Tel;
                    obj.Fax                   = objDetails.Fax;
                    obj.Email                 = objDetails.Email;
                    obj.Name1                 = objDetails.Name1;
                    obj.Address1              = objDetails.Address1;
                    obj.Tel1                  = objDetails.Tel1;
                    obj.Fax1                  = objDetails.Fax1;
                    obj.Email1                = objDetails.Email1;
                    obj.Name2                 = objDetails.Name2;
                    obj.Address2              = objDetails.Address2;
                    obj.Tel2                  = objDetails.Tel2;
                    obj.Fax2                  = objDetails.Fax2;
                    obj.Email2                = objDetails.Email2;
                    obj.Comment               = objDetails.Comment;
                    obj.ProFormaAttached      = objDetails.ProFormaAttached;
                    obj.RaisedBy              = objDetails.RaisedBy;
                    obj.RaisedByDate          = objDetails.RaisedByDate;
                    obj.SORSigned             = objDetails.SORSigned;
                    obj.ForStock              = objDetails.ForStock;
                    obj.ValuesCorrect         = objDetails.ValuesCorrect;
                    obj.Authorized            = objDetails.Authorized;
                    obj.AuthorizedDate        = objDetails.AuthorizedDate;
                    obj.ERAIMember            = objDetails.ERAIMember;
                    obj.ERAIReported          = objDetails.ERAIReported;
                    obj.DebitNotes            = objDetails.DebitNotes;
                    obj.APOpenOrders          = objDetails.APOpenOrders;
                    obj.ACTotalValue          = objDetails.ACTotalValue;
                    obj.ACTotalValue1         = objDetails.ACTotalValue1;
                    obj.SLComment             = objDetails.SLComment;
                    obj.SLTerms               = objDetails.SLTerms;
                    obj.SLOverdue             = objDetails.SLOverdue;
                    obj.SLTotalValue          = objDetails.SLTotalValue;
                    obj.PaymentAuthorizedBy   = objDetails.PaymentAuthorizedBy;
                    obj.Countersigned         = objDetails.Countersigned;
                    obj.PaymentAuthorizedDate = objDetails.PaymentAuthorizedDate;
                    obj.SupplierCode          = objDetails.SupplierCode;
                    lst.Add(obj);
                }
                lstDetails = null;
                return(lst);
            }
        }
Exemple #3
0
        /// <summary>
        /// Insert
        /// Calls [usp_Update_EPR]
        /// </summary>
        public static bool Update(EPR objEPR)
        {
            EPRDetails obj = new EPRDetails();

            obj.EPRId               = objEPR.EPRId;
            obj.PurchaseOrderId     = objEPR.PurchaseOrderId;
            obj.CompanyName         = objEPR.CompanyName;
            obj.IsNew               = objEPR.IsNew;
            obj.PurchaseOrderNumber = objEPR.PurchaseOrderNumber;
            obj.OrderValue          = objEPR.OrderValue;
            obj.CurrencyCode        = objEPR.CurrencyCode;
            obj.DeliveryDate        = objEPR.DeliveryDate;
            obj.InAdvance           = objEPR.InAdvance;
            obj.UponReceipt         = objEPR.UponReceipt;
            obj.NetSpecify          = objEPR.NetSpecify;
            obj.OtherSpecify        = objEPR.OtherSpecify;
            obj.TT                    = objEPR.TT;
            obj.Cheque                = objEPR.Cheque;
            obj.CreditCard            = objEPR.CreditCard;
            obj.Comments              = objEPR.Comments;
            obj.Name                  = objEPR.Name;
            obj.Address               = objEPR.Address;
            obj.Tel                   = objEPR.Tel;
            obj.Fax                   = objEPR.Fax;
            obj.Email                 = objEPR.Email;
            obj.Name1                 = objEPR.Name1;
            obj.Address1              = objEPR.Address1;
            obj.Tel1                  = objEPR.Tel1;
            obj.Fax1                  = objEPR.Fax1;
            obj.Email1                = objEPR.Email1;
            obj.Name2                 = objEPR.Name2;
            obj.Address2              = objEPR.Address2;
            obj.Tel2                  = objEPR.Tel2;
            obj.Fax2                  = objEPR.Fax2;
            obj.Email2                = objEPR.Email2;
            obj.Comment               = objEPR.Comment;
            obj.ProFormaAttached      = objEPR.ProFormaAttached;
            obj.RaisedByNo            = objEPR.RaisedByNo;
            obj.RaisedByDate          = objEPR.RaisedByDate;
            obj.SORSigned             = objEPR.SORSigned;
            obj.ForStock              = objEPR.ForStock;
            obj.ValuesCorrect         = objEPR.ValuesCorrect;
            obj.Authorized            = objEPR.Authorized;
            obj.AuthorizedDate        = objEPR.AuthorizedDate;
            obj.ERAIMember            = objEPR.ERAIMember;
            obj.ERAIReported          = objEPR.ERAIReported;
            obj.DebitNotes            = objEPR.DebitNotes;
            obj.APOpenOrders          = objEPR.APOpenOrders;
            obj.ACTotalValue          = objEPR.ACTotalValue;
            obj.ACTotalValue1         = objEPR.ACTotalValue1;
            obj.SLComment             = objEPR.SLComment;
            obj.SLTerms               = objEPR.SLTerms;
            obj.SLOverdue             = objEPR.SLOverdue;
            obj.SLTotalValue          = objEPR.SLTotalValue;
            obj.PaymentAuthorizedBy   = objEPR.PaymentAuthorizedBy;
            obj.Countersigned         = objEPR.Countersigned;
            obj.PaymentAuthorizedDate = objEPR.PaymentAuthorizedDate;
            obj.UpdatedBy             = objEPR.UpdatedBy;
            obj.SupplierCode          = objEPR.SupplierCode;
            obj.EPRCompletedByNo      = objEPR.EPRCompletedByNo;
            obj.EPRChange             = objEPR.EPRChange;
            bool isUpdated = Rebound.GlobalTrader.DAL.SiteProvider.EPRProvider.Update(obj);

            return(isUpdated);
        }
Exemple #4
0
 /// <summary>
 /// Get
 /// Calls [usp_select_EPR]
 /// </summary>
 public static EPR Get(System.Int32?eprId)
 {
     Rebound.GlobalTrader.DAL.EPRDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.EPRProvider.Get(eprId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         EPR obj = new EPR();
         obj.EPRId               = objDetails.EPRId;
         obj.PurchaseOrderId     = objDetails.PurchaseOrderId;
         obj.CompanyName         = objDetails.CompanyName;
         obj.IsNew               = objDetails.IsNew;
         obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
         obj.OrderValue          = objDetails.OrderValue;
         obj.CurrencyCode        = objDetails.CurrencyCode;
         obj.DeliveryDate        = objDetails.DeliveryDate;
         obj.InAdvance           = objDetails.InAdvance;
         obj.UponReceipt         = objDetails.UponReceipt;
         obj.NetSpecify          = objDetails.NetSpecify;
         obj.OtherSpecify        = objDetails.OtherSpecify;
         obj.TT                    = objDetails.TT;
         obj.Cheque                = objDetails.Cheque;
         obj.CreditCard            = objDetails.CreditCard;
         obj.Comments              = objDetails.Comments;
         obj.Name                  = objDetails.Name;
         obj.Address               = objDetails.Address;
         obj.Tel                   = objDetails.Tel;
         obj.Fax                   = objDetails.Fax;
         obj.Email                 = objDetails.Email;
         obj.Name1                 = objDetails.Name1;
         obj.Address1              = objDetails.Address1;
         obj.Tel1                  = objDetails.Tel1;
         obj.Fax1                  = objDetails.Fax1;
         obj.Email1                = objDetails.Email1;
         obj.Name2                 = objDetails.Name2;
         obj.Address2              = objDetails.Address2;
         obj.Tel2                  = objDetails.Tel2;
         obj.Fax2                  = objDetails.Fax2;
         obj.Email2                = objDetails.Email2;
         obj.Comment               = objDetails.Comment;
         obj.ProFormaAttached      = objDetails.ProFormaAttached;
         obj.RaisedBy              = objDetails.RaisedBy;
         obj.RaisedByDate          = objDetails.RaisedByDate;
         obj.SORSigned             = objDetails.SORSigned;
         obj.ForStock              = objDetails.ForStock;
         obj.ValuesCorrect         = objDetails.ValuesCorrect;
         obj.Authorized            = objDetails.Authorized;
         obj.AuthorizedDate        = objDetails.AuthorizedDate;
         obj.ERAIMember            = objDetails.ERAIMember;
         obj.ERAIReported          = objDetails.ERAIReported;
         obj.DebitNotes            = objDetails.DebitNotes;
         obj.APOpenOrders          = objDetails.APOpenOrders;
         obj.ACTotalValue          = objDetails.ACTotalValue;
         obj.ACTotalValue1         = objDetails.ACTotalValue1;
         obj.SLComment             = objDetails.SLComment;
         obj.SLTerms               = objDetails.SLTerms;
         obj.SLOverdue             = objDetails.SLOverdue;
         obj.SLTotalValue          = objDetails.SLTotalValue;
         obj.PaymentAuthorizedBy   = objDetails.PaymentAuthorizedBy;
         obj.Countersigned         = objDetails.Countersigned;
         obj.PaymentAuthorizedDate = objDetails.PaymentAuthorizedDate;
         obj.SupplierCode          = objDetails.SupplierCode;
         obj.IsRefAuthorise        = string.IsNullOrEmpty(objDetails.Authorized) ? false : true;
         obj.IsCompleted           = objDetails.EPRCompletedByNo.HasValue ? false : true;
         obj.EPRCompletedByName    = objDetails.EPRCompletedByName;
         obj.EPRCompletedByNo      = objDetails.EPRCompletedByNo;
         obj.RaisedByNo            = objDetails.RaisedByNo;
         //[001] start
         obj.POLineSerialNo = objDetails.POLineSerialNo;
         //[001] end
         objDetails = null;
         return(obj);
     }
 }