public List <TIrregularOrder> SyncIrregularOrder()
        {
            try
            {
                IEnumerable <OrderHistory> changedOrderIds;

                using (ThanhVanTranSysEntities context = new ThanhVanTranSysEntities())
                    using (IrregularOrderBusiness business = new IrregularOrderBusiness())
                    {
                        //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.ConvertToTIrregularOrder(io, co.action == Constants.DELETE_ACTION)).ToList();

                        //deleted records
                        orders.AddRange((from o in changedOrderIds
                                         where o.action == Constants.DELETE_ACTION
                                         select new TIrregularOrder()
                        {
                            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,
                            RecipientIdNo = string.Empty,
                            RecipientName = string.Empty,
                            RecipientPhone = string.Empty,
                            SenderIdNo = string.Empty,
                            SenderName = string.Empty,
                            SenderPhone = string.Empty,
                            UserReponsitory = string.Empty,
                            TotalCost = 0,
                            TotalQuantity = 0,
                            TotalValue = 0,
                        }));

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