protected override void AddDomainObject(object domainObject) { if (_facade == null) { _facade = new BenQGuru.eMES.Material.EquipmentFacade(base.DataProvider); } this.DataProvider.BeginTransaction(); try { this._facade.AddEQPLOG((Domain.Equipment.EQPLog)domainObject); object objEqp = _facade.GetEquipment(this.EQPID); if (objEqp != null) { (objEqp as Domain.Equipment.Equipment).Eqpstatus = this.drpEQPStatusEdit.SelectedValue.Trim(); _facade.UpdateEquipment((objEqp as Domain.Equipment.Equipment)); } } catch (Exception ex) { this.DataProvider.RollbackTransaction(); } this.DataProvider.CommitTransaction(); }
protected override object GetEditObject(GridRecord row) { if (_facade == null) { _facade = new BenQGuru.eMES.Material.EquipmentFacade(base.DataProvider); } object obj = _facade.GetEquipment(row.Items.FindItemByKey("EQPID").Text.ToString()); if (obj != null) { return((Domain.Equipment.Equipment)obj); } return(null); }