示例#1
0
        public InvoiceEntity Get_Object_Invoice_By_StoreID_And_CustomerID_And_OrderDate(string stoid, string cusid, string orderDate)
        {
            if (dbContext == null)
            {
                dbContext = new FoodDeliveryEntities();
            }
            var obj = dbContext.GET_OBJECT_INVOICE_BY_STOREID_AND_CUSTOMERID_AND_ORDERDATE(stoid, cusid, orderDate).FirstOrDefault();

            InvoiceEntity entity = new InvoiceEntity
            {
                InvoiceID       = "" + obj.InvoiceID,
                OrderDate       = "" + obj.OrderDate,
                DeliveryDate    = "" + obj.DeliveryDate,
                Sale            = (decimal)obj.Sale,
                ServiceChange   = (decimal)obj.ServiceChange,
                ShippingFee     = (decimal)obj.ShippingFee,
                TotalPrice      = (decimal)obj.TotalPrice,
                StoreID         = "" + obj.StoreID,
                CustomerID      = "" + obj.CustomerID,
                AddressDelivery = obj.AddressDelivery,
                CustomerName    = obj.CustomerName,
                CustomerPhone   = obj.CustomerPhone,
                Status          = (int)obj.Status
            };

            return(entity);
        }