Пример #1
0
    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);
        }
    }
Пример #2
0
    protected void LoadItem(object sender, EventArgs e)
    {
        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);



        GridView1.DataSource = result;
        GridView1.DataBind();
    }
Пример #3
0
    private void DoSearch()
    {
        IList <StorageBin> storageBinList = new List <StorageBin>();

        if (this.AreaCode == null || this.AreaCode == string.Empty)
        {
            storageBinList = TheStorageBinMgr.GetStorageBin(TheLocationMgr.LoadLocation(this.tbLocationCode.Text));
        }
        else
        {
            storageBinList = TheStorageBinMgr.GetStorageBin(this.tbAreaCode.Text);
        }

        this.GV_Bin.DataSource = storageBinList;
        this.GV_Bin.DataBind();
        if (storageBinList.Count == 0)
        {
            this.ltlMessage.Visible = true;
        }
        else
        {
            this.ltlMessage.Visible = false;
        }
    }