Example #1
0
        protected override object GetEditObject(GridRecord row)
        {
            if (_facade == null)
            {
                _facade = new BenQGuru.eMES.Material.EquipmentFacade(base.DataProvider);
            }
            object obj = _facade.GetEQPTSLog(int.Parse(row.Items.FindItemByKey("Serial").Text.ToString()));

            if (obj != null)
            {
                return((Domain.Equipment.EQPTSLog)obj);
            }

            return(null);
        }
Example #2
0
        protected override void DeleteDomainObjects(ArrayList domainObjects)
        {
            if (_facade == null)
            {
                _facade = new BenQGuru.eMES.Material.EquipmentFacade(this.DataProvider);
            }

            foreach (Domain.Equipment.EquipmentTsType epqTsType in domainObjects)
            {
                int count = _facade.GetEQPTSLog(epqTsType.Eqptstype, EquipmentTSLogStatus.EquipmentTSLogStatus_New);
                if (count > 0)
                {
                    WebInfoPublish.PublishInfo(this, "$EQPTSTYPE_CONNOT_DELETE $EQPTSTYPE:" + epqTsType.Eqptstype, this.languageComponent1);
                    return;
                }
            }


            this._facade.DeleteEquipmentTsType((Domain.Equipment.EquipmentTsType[])domainObjects.ToArray(typeof(Domain.Equipment.EquipmentTsType)));
        }