public List <TRegularOrder> SyncRegularOrder()
        {
            try
            {
                IEnumerable <OrderHistory> changedOrderIds;

                using (ThanhVanTranSysEntities context = new ThanhVanTranSysEntities())
                    using (RegularOrderBusiness business = new RegularOrderBusiness())
                    {
                        //insert/update records
                        changedOrderIds = context.OrderHistories
                                          .Where(i => i.date_time.Year == DateTime.Now.Year && i.date_time.Month == DateTime.Now.Month && i.date_time.Day == DateTime.Now.Day)
                                          .OrderBy(i => i.order_id).ThenBy(i => i.date_time);

                        var orders = (from io in business.GetAll()
                                      join co in changedOrderIds on io.id equals co.order_id
                                      select ThriftUtil.ConvertToTRegularOrder(io, co.action == Constants.DELETE_ACTION)).ToList();

                        //deleted records
                        orders.AddRange((from o in changedOrderIds
                                         where o.action == Constants.DELETE_ACTION
                                         select new TRegularOrder()
                        {
                            OrderId = o.order_id,
                            IsDeleted = true,
                            CloseDate = DateTime.Now.ToString(),
                            CreateBy = string.Empty,
                            CreateDate = DateTime.Now.ToString(),
                            Destination = string.Empty,
                            OrderStaus = string.Empty,
                            PaymentStatus = string.Empty,
                            RecipientId = string.Empty,
                            SenderId = string.Empty,
                            TotalCost = 0,
                            TotalQuantity = 0,
                            TotalValue = 0,
                        }));

                        return(orders);
                    }
            }
            catch (Exception exc)
            {
                ServerLogger.logError("[LoadRegularOrder]", exc);
                return(new List <TRegularOrder>());
            }
        }