protected void btnPickup_Click(object sender, EventArgs e) { try { // ExecuteSubmit(); DetachedCriteria criter = DetachedCriteria.For(typeof(LocationLotDetail)); criter.Add(Expression.Eq("Location", TheLocationMgr.LoadLocation(tbMiscOrderLocation.Text))); criter.Add(Expression.In("StorageBin", TheStorageBinMgr.GetStorageBin(tbStorageBin.Text).ToList())); criter.Add(Expression.IsNotNull("StorageBin")); IList <LocationLotDetail> result = TheCriteriaMgr.FindAll <LocationLotDetail>(criter); foreach (LocationLotDetail lot in result) { lot.StorageBin = null; lot.Hu.StorageBin = null; TheLocationLotDetailMgr.UpdateLocationLotDetail(lot); } ShowSuccessMessage("Warehouse.PickUp.Successfully"); GridView1.DataSource = null; GridView1.DataBind(); this.InitialAll(); } catch (BusinessErrorException ex) { this.ShowErrorMessage(ex); } }