public bool Insert(List <ReceiptPurchaseOrderModels> models, ref string msg)
        {
            bool result = true;

            using (NuWebContext cxt = new NuWebContext())
            {
                try
                {
                    List <I_Receipt_Purchase_Order> listInsert = new List <I_Receipt_Purchase_Order>();
                    I_Receipt_Purchase_Order        item       = null;
                    foreach (var model in models)
                    {
                        item    = new I_Receipt_Purchase_Order();
                        item.Id = Guid.NewGuid().ToString();

                        item.ReceiptNoteId   = model.ReceiptNoteId;
                        item.PurchaseOrderId = model.PurchaseOrderId;

                        item.CreatedBy    = model.CreatedBy;
                        item.CreatedDate  = model.CreatedDate;
                        item.ModifierBy   = model.ModifierBy;
                        item.ModifierDate = model.ModifierDate;
                        item.IsActived    = model.IsActived;

                        listInsert.Add(item);
                    }
                    cxt.I_Receipt_Purchase_Order.AddRange(listInsert);
                    cxt.SaveChanges();
                }
                catch (Exception ex)
                {
                    _logger.Error(ex);
                    result = false;
                }
                finally
                {
                    if (cxt != null)
                    {
                        cxt.Dispose();
                    }
                }
            }
            return(result);
        }