示例#1
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacede2(base.DataProvider);
     }
     this._facade.UpdateWarehouseStock((WarehouseStock)domainObject);
 }
示例#2
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacede2(base.DataProvider);
     }
     return(this._facade.QueryWarehouseStockInCheckCount(string.Empty, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)), /*this.drpSegmentCodeQuery.SelectedValue,*/ this.drpFactoryCodeQuery.SelectedValue));
 }
示例#3
0
        protected void cmdClose_ServerClick(object sender, EventArgs e)
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacede2(base.DataProvider);
            }
            this._facade.WarehouseClose(this.txtWarehouseCode.Value, /* this.txtSegmentCode.Value,*/ this.txtFactoryCode.Value, this.GetUserCode());

            this.drpFactoryCodeQuery.SelectedValue = this.txtFactoryCode.Value;
            //this.drpSegmentCodeQuery.SelectedValue = this.txtSegmentCode.Value;
            this.drpWarehouseCodeQuery.Text = this.txtWarehouseCode.Value;
            this.cmdQuery_Click(null, null);
        }
示例#4
0
        protected override object[] LoadDataSource(int inclusive, int exclusive)
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacede2(base.DataProvider);
            }
            //库房是否盘点状态 ,默认正常类型
            // 此处判断查询库房是否盘点状态。
            isWHCycle = this._facade.isWareHourseCycle(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)), /*this.drpSegmentCodeQuery.SelectedValue,*/ this.drpFactoryCodeQuery.SelectedValue);

            this.InitWebGrid();                         //根据是否盘点重新初始化Grid
            object[] objs = new object[] {};
            if (isWHCycle)
            {
                //如果库房是盘点状态 , 盘点在制品
                objs = this._facade.QueryWarehouseStockInCheck3(
                    string.Empty, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)), /*this.drpSegmentCodeQuery.SelectedValue,*/ this.drpFactoryCodeQuery.SelectedValue,
                    inclusive, exclusive);
            }
            else
            {
                objs = this._facade.QueryWarehouseStockInCheck(
                    string.Empty, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)), /*this.drpSegmentCodeQuery.SelectedValue,*/ this.drpFactoryCodeQuery.SelectedValue,
                    inclusive, exclusive);
            }
            if (objs != null && objs.Length > 0)
            {
                //读取所有物料
                object[] objitem = this._facade.GetAllWarehouseItem();
                if (objitem != null)
                {
                    for (int i = 0; i < objitem.Length; i++)
                    {
                        WarehouseItem item = (WarehouseItem)objitem[i];
                        htItems.Add(item.ItemCode, item.ItemName);
                        item = null;
                    }
                }
                objitem = null;
            }

            if (isExportCycleNow && isWHCycle)
            {
                RecordCycleResult(objs);
            }

            return(objs);
        }
示例#5
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacede2(base.DataProvider);
            }
            if (row.Cells[8].Text.ToString() != Warehouse.WarehouseStatus_Cycle)
            {
                return(null);
            }
            object obj = _facade.GetWarehouseCycleCountDetail(row.Cells[4].ToString(), row.Cells[9].ToString());

            if (obj != null)
            {
                return((WarehouseCycleCountDetail)obj);
            }

            return(null);
        }
示例#6
0
        protected void cmdUpdate_ServerClick(object sender, EventArgs e)
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacede2(base.DataProvider);
            }
            object obj = this._facade.GetWarehouseCycleCountDetail(this.txtItemCode.Value, this.txtCycleCountCode.Value);

            if (obj == null)
            {
                return;
            }
            WarehouseCycleCountDetail item = (WarehouseCycleCountDetail)obj;

            item.PhysicalQty = decimal.Parse(this.txtActualQtyEdit.Text);
            this._facade.UpdateWarehouseCycleCountDetail(item);
            item = null;
            this.cmdQuery_Click(null, null);
        }
示例#7
0
        //选择来源工厂、工段,查询所有仓库

        /*
         * private void FillWarehouseFrom(object sender, System.EventArgs e)
         * {
         *      this.drpWarehouseCodeQuery.Items.Clear();
         *      if (this.drpFactoryCodeQuery.SelectedValue == string.Empty)
         *      {
         *              this.drpSegmentCodeQuery.SelectedValue = string.Empty;
         *      }
         *      else
         *              this.FillWarehouse(this.drpFactoryCodeQuery, this.drpSegmentCodeQuery, this.drpWarehouseCodeQuery);
         * }
         * private void FillWarehouse(DropDownList drpFactory, DropDownList drpSeg, DropDownList drp)
         * {
         *      if(_facade==null){_facade = new WarehouseFacede2(base.DataProvider);}
         *      string factoryCode = drpFactory.SelectedValue;
         *      string segCode = drpSeg.SelectedValue;
         *      object[] objs = this._facade.GetWarehouseByFactorySeg(segCode, factoryCode, true);
         *      drp.Items.Clear();
         *      drp.Items.Add("");
         *      if (objs != null)
         *      {
         *              for (int i = 0; i < objs.Length; i++)
         *              {
         *                      Warehouse wh = (Warehouse)objs[i];
         *                      drp.Items.Add(new ListItem(wh.WarehouseCode, wh.WarehouseCode));
         *                      wh = null;
         *              }
         *      }
         *      objs = null;
         * }
         */
        #endregion

        #region 数据初始化

        private void InitDropDownList()
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacede2(base.DataProvider);
            }
            BenQGuru.eMES.Common.MutiLanguage.LanguageWord lword = languageComponent1.GetLanguage("listItemAll");
            DropDownListBuilder builder = new DropDownListBuilder(this.drpFactoryCodeQuery);

            builder.HandleGetObjectList = new GetObjectListDelegate(this._facade.GetAllFactory);
            builder.Build("FactoryCode", "FactoryCode");
            this.drpFactoryCodeQuery.Items.Insert(0, new ListItem("", ""));

            BenQGuru.eMES.BaseSetting.BaseModelFacade bmFacade = new BenQGuru.eMES.BaseSetting.BaseModelFacade(base.DataProvider);
//			builder = new DropDownListBuilder(this.drpSegmentCodeQuery);
//			builder.HandleGetObjectList = new GetObjectListDelegate(bmFacade.GetAllSegment);
//			builder.Build("SegmentCode","SegmentCode");
//			this.drpSegmentCodeQuery.Items.Insert(0, new ListItem("", ""));

            bmFacade = null;
            lword    = null;
            builder  = null;
        }