public DeliveryAllocateDetail(MedicineDeliveryDetail medicineDeliverDetail)
 {
     InitializeComponent();
     this._medicineDeliverDetail = medicineDeliverDetail;
     //    this._allocateDetails = allocateDetails;
     this.Initialize();
     this.bdsDelivery.DataSource = this._medicineDeliverDetail;
 }
 // private List<MedicineDeliveryDetailAllocate> allocatedList;
 // private List<WareHouseDetail> _wareHouseDetails;
 public MedicineDeliveryAllocationEntity(int no, MedicineDeliveryDetail deliveryDetail, WareHouse warehouse) {
     this.No = no;
     this._warehouse = warehouse;
     this.MedicineDeliveryDetail = deliveryDetail;
     this.MedicineName = this.MedicineDeliveryDetail.Medicine == null
                             ? String.Empty
                             : this.MedicineDeliveryDetail.Medicine.Name;
     this.Qty= this.MedicineDeliveryDetail == null ? (int?)null : this.MedicineDeliveryDetail.Volumn;
     this.InStockQty = warehouse.Volumn;
     this.AllocatedQty = this.MedicineDeliveryDetail.AllocatedWareHouseDetail == null ? this.MedicineDeliveryDetail.Volumn : this.MedicineDeliveryDetail.AllocatedWareHouseDetail.Sum(x => x.AllocatedQty);
 }