Example #1
0
        protected void PackagesGridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            var previousShippingStatus = CurrentOrder.ShippingStatus;

            var Id = (long)PackagesGridView.DataKeys[e.RowIndex].Value;

            var p = CurrentOrder.Packages.SingleOrDefault(y => y.Id == Id);

            if (p != null)
            {
                HccApp.OrdersUnshipItems(p, CurrentOrder);
                CurrentOrder.Packages.Remove(p);
                HccApp.OrderServices.Orders.Update(CurrentOrder);
            }
            ReloadOrder(previousShippingStatus);
        }