public JsonResult SaveAWBAllocation(List <SupplierInvoiceConsignmentVM> list)
      {
          List <SupplierInvoiceConsignmentVM> AWBAllocationall = new List <SupplierInvoiceConsignmentVM>();
          List <SupplierInvoiceConsignmentVM> AWBAllocation    = new List <SupplierInvoiceConsignmentVM>();

          AWBAllocationall = (List <SupplierInvoiceConsignmentVM>)Session["SIAWBAllocation"];

          if (AWBAllocationall == null)
          {
              AWBAllocationall = new List <SupplierInvoiceConsignmentVM>();
              foreach (var item2 in list)
              {
                  AWBAllocationall.Add(item2);
              }
          }
          else
          {
              int acheadid = list[0].AcHeadId;
              AWBAllocationall.RemoveAll(cc => cc.AcHeadId == acheadid);
              foreach (var item2 in list)
              {
                  AWBAllocationall.Add(item2);
              }
          }

          Session["SIAWBAllocation"] = AWBAllocationall;

          return(Json(AWBAllocationall, JsonRequestBehavior.AllowGet));
      }
        public JsonResult SaveAWBAllocation(List <CostUpdateConsignmentVM> list)
        {
            List <CostUpdateConsignmentVM> AWBAllocationall = new List <CostUpdateConsignmentVM>();
            List <CostUpdateConsignmentVM> AWBAllocation    = new List <CostUpdateConsignmentVM>();

            AWBAllocationall = (List <CostUpdateConsignmentVM>)Session["CostAWBAllocation"];

            if (AWBAllocationall == null)
            {
                AWBAllocationall = new List <CostUpdateConsignmentVM>();
                foreach (var item2 in list)
                {
                    AWBAllocationall.Add(item2);
                }
            }
            else
            {
                int acheadid = Convert.ToInt32(list[0].RevenueCostMasterID);
                AWBAllocationall.RemoveAll(cc => cc.RevenueCostMasterID == acheadid);
                foreach (var item2 in list)
                {
                    AWBAllocationall.Add(item2);
                }
            }

            Session["CostAWBAllocation"] = AWBAllocationall;

            return(Json(AWBAllocationall, JsonRequestBehavior.AllowGet));
        }