protected override object GetEditObject(UltraGridRow row)
        {
            if (row != null)
            {
                ItemFacade   itemFacade = new ItemFacade(base.DataProvider);
                ItemRoute2OP ip         = (ItemRoute2OP)itemFacade.GetItemRoute2Op(_opid, GlobalVariables.CurrentOrganizations.First().OrganizationID);

                ItemRouteOp2ErrorCauseGroup relation = _facade.CreateNewItemRouteOp2ErrorCauseGroup();
                relation.OpID = _opid;
                relation.ErrorCauseGroupCode = row.Cells.FromKey("ErrorCauseGroupCode").Value.ToString();
                relation.ItemCode            = ip.ItemCode;
                relation.RouteCode           = ip.RouteCode;
                relation.OpCode       = ip.OPCode;
                relation.MaintainUser = this.GetUserCode();

                return(relation);
            }

            return(null);
        }
        protected override object GetEditObject()
        {
            if (this.ValidateInput())
            {
                ItemFacade   itemFacade = new ItemFacade(base.DataProvider);
                ItemRoute2OP ip         = (ItemRoute2OP)itemFacade.GetItemRoute2Op(_opid, GlobalVariables.CurrentOrganizations.First().OrganizationID);

                ItemRouteOp2ErrorCauseGroup relation = _facade.CreateNewItemRouteOp2ErrorCauseGroup();
                relation.OpID = _opid;
                relation.ErrorCauseGroupCode = this.drpErrorCauseGroupEdit.SelectedValue;
                relation.ItemCode            = ip.ItemCode;
                relation.RouteCode           = ip.RouteCode;
                relation.OpCode       = ip.OPCode;
                relation.MaintainUser = this.GetUserCode();

                return(relation);
            }
            else
            {
                return(null);
            }
        }