private void DtgFiles_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is FileRepositoryDTO)
     {
         var fileRepository = (e.DataElement as FileRepositoryDTO);
         if (!string.IsNullOrEmpty(fileRepository.tmpUploadMessage))
         {
             ToolTipService.SetToolTip(e.Row, fileRepository.tmpUploadMessage);
         }
         else
         {
             ToolTipService.SetToolTip(e.Row, null);
         }
         if (fileRepository.tmpState == FileRepositoryState.Normal)
         {
             e.Row.Foreground = new SolidColorBrush(Colors.Black);
         }
         else if (fileRepository.tmpState == FileRepositoryState.Succeed)
         {
             e.Row.Foreground = new SolidColorBrush(Colors.Green);
         }
         else if (fileRepository.tmpState == FileRepositoryState.Failed)
         {
             e.Row.Foreground = new SolidColorBrush(Colors.Red);
         }
     }
 }
 private void DtgColumns_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is DataMenuSearchableReportRelationshipDTO)
     {
         var data = (e.DataElement as DataMenuSearchableReportRelationshipDTO);
         if (data.vwReports == null || data.vwReports.Count == 0)
         {
             SetRelationshipReports(MyProjectManager.GetMyProjectManager.GetRequester(), data);
         }
     }
     else if (e.DataElement is DataMenuDataViewRelationshipDTO)
     {
         var data = (e.DataElement as DataMenuDataViewRelationshipDTO);
         if (data.vwDataMenuSettings == null || data.vwDataMenuSettings.Count == 0)
         {
             SetRelationshipDataMenus(MyProjectManager.GetMyProjectManager.GetRequester(), data);
         }
     }
     else if (e.DataElement is DataMenuGridViewRelationshipDTO)
     {
         var data = (e.DataElement as DataMenuGridViewRelationshipDTO);
         if (data.vwDataMenuSettings == null || data.vwDataMenuSettings.Count == 0)
         {
             SetRelationshipDataMenus(MyProjectManager.GetMyProjectManager.GetRequester(), data);
         }
     }
 }
示例#3
0
 private void DtgRelationships_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is DataLinkRelationshipTailDTO)
     {
         SetRelationshipTailDataMenuList(e.DataElement as DataLinkRelationshipTailDTO);
     }
 }
        private void loopinfo_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            try
            {
                if (e.Row.DataContext is LoopInfox)
                {
                    var sp = e.Row.DataContext as LoopInfox;
                    if (sp == null)
                    {
                        return;
                    }
                    var cc = (Color)ColorConverter.ConvertFromString(sp.Backgroundx);
                    if (cc == null)
                    {
                        return;
                    }

                    e.Row.Background = new SolidColorBrush(cc);
                    //  ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Colors.Gray);
                }
            }
            catch (Exception ex)
            {
            }
        }
示例#5
0
 void AssociatedObject_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.Row is GridViewHeaderRow || e.Row is GridViewNewRow || e.Row is GridViewFooterRow)
         return;
     GridViewRow row = e.Row as GridViewRow;
     this.InitializeRowDragAndDrop(row);
 }
 private void grdUserList_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (grdUserList.Items.Count > 0)
     {
         grdUserList.ScrollIntoViewAsync(grdUserList.Items[grdUserList.Items.Count - 1],     //the row
                                         grdUserList.Columns[grdUserList.Columns.Count - 1], //the column
                                         null);
     }
 }
 private void DtgConditions_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is RelationshipFilterDTO)
     {
         var condition = (e.DataElement as RelationshipFilterDTO);
         SetValueColumns(condition);
         SetSearchColumns(condition);
     }
 }
 private void Dtg_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is TableImportItem)
     {
         var item = e.DataElement as TableImportItem;
         if (!string.IsNullOrEmpty(item.Tooltip))
         {
             ToolTipService.SetToolTip(e.Row, ControlHelper.GetTooltip(item.Tooltip, true));
         }
     }
 }
 private void DtgColumns_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is EntitySearchColumnsDTO)
     {
         var data = (e.DataElement as EntitySearchColumnsDTO);
         if (data.vwValueColumns == null || data.vwValueColumns.Count == 0)
         {
             SetColumns(data);
         }
     }
 }
示例#10
0
        private void grdUserList_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            var scrolled = string.IsNullOrEmpty(chkScrolled.Text) || chkScrolled.Text.Equals("NOTSCROLLED");

            if (grdUserList.Items.Count > 0 && scrolled)
            {
                grdUserList.ScrollIntoViewAsync(grdUserList.Items[grdUserList.Items.Count - 1],     //the row
                                                grdUserList.Columns[grdUserList.Columns.Count - 1], //the column
                                                null);
                chkScrolled.Text = "SCROLLED";
            }
        }
示例#11
0
 private void DtgColumnValueRange_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.Row != null && e.Row.DataContext is UIColumnValueRangeDTO)
     {
         var item = e.Row.DataContext as UIColumnValueRangeDTO;
         if (item.ColumnValueRangeID != 0)
         {
             BizColumnValueRange bizColumnValueRange = new BizColumnValueRange();
             var list = bizColumnValueRange.GetColumnValueRangeValues(item.ColumnValueRangeID, item.EnumTag);
             item.vwCandidateValues = list;
         }
     }
 }
示例#12
0
        private void DtgNewRelationships_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            if (e.DataElement is RelationshipImportItem)
            {
                var item    = e.DataElement as RelationshipImportItem;
                var tooltip = item.Tooltip;
                if (!string.IsNullOrEmpty(item.ValidationTooltip))
                {
                    tooltip         += Environment.NewLine + item.ValidationTooltip;
                    e.Row.Background = new SolidColorBrush(Colors.Pink);
                }
                else
                {
                    e.Row.Background = new SolidColorBrush(Colors.White);
                }
                if (!string.IsNullOrEmpty(tooltip))
                {
                    ToolTipService.SetToolTip(e.Row, tooltip);
                }

                if (Database.Name.ToLower().StartsWith("DBProductService".ToLower()))
                {
                    if (item.Relationship.Entity1 == "GenericPerson" && item.Relationship.Entity2 == "Customer")
                    {
                        item.Relationship.OrginalRelationshipGroup = "GenericPerson_Customer";
                    }

                    if (item.Relationship.Entity1 == "ServiceItem" && item.Relationship.Entity2 == "ServiceConclusionItem")
                    {
                        item.Relationship.OrginalTypeEnum          = Enum_OrginalRelationshipType.SubUnionToUnion;
                        item.Relationship.OrginalRelationshipGroup = "Union_ServiceConclusionItem";
                    }
                    if (item.Relationship.Entity1 == "ServiceAdditionalItem" && item.Relationship.Entity2 == "ServiceConclusionItem")
                    {
                        item.Relationship.OrginalTypeEnum          = Enum_OrginalRelationshipType.SubUnionToUnion;
                        item.Relationship.OrginalRelationshipGroup = "Union_ServiceConclusionItem";
                    }

                    if (item.Relationship.Entity1 == "ServiceRequest" && item.Relationship.Entity2 == "ServiceRequestReview")
                    {
                        item.Relationship.OrginalTypeEnum = Enum_OrginalRelationshipType.OneToOne;
                    }
                    if (item.Relationship.Entity1 == "ServiceRequest" && item.Relationship.Entity2 == "ServiceConclusion")
                    {
                        item.Relationship.OrginalTypeEnum = Enum_OrginalRelationshipType.OneToOne;
                    }
                }
            }
        }
示例#13
0
 private void DtgOutgoingTransitoinActions_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is PossibleTransitionActionDTO)
     {
         var item = e.DataElement as PossibleTransitionActionDTO;
         if (item.Color == ItemColor.Red)
         {
             e.Row.Foreground = new SolidColorBrush(Colors.Red);
         }
         else if (item.Color == ItemColor.Green)
         {
             e.Row.Foreground = new SolidColorBrush(Colors.Green);
         }
     }
 }
 private void DtgNewTables_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.DataElement is RelationshipImportItem)
     {
         var item = e.DataElement as RelationshipImportItem;
         if (!string.IsNullOrEmpty(item.Tooltip))
         {
             ToolTipService.SetToolTip(e.Row, item.Tooltip);
         }
         //var cellDataEntryEnabled = e.Row.Cells.FirstOrDefault(x => x.Column.Name == "colDataEntryEnabled");
         //if (cellDataEntryEnabled != null)
         //{
         //    if (item.Relationship.TypeEnum == Enum_RelationshipType.OneToMany
         //    || item.Relationship.TypeEnum == Enum_RelationshipType.ImplicitOneToOne)
         //    {
         //        cellDataEntryEnabled.IsEnabled = true;
         //    }
         //    else
         //        cellDataEntryEnabled.IsEnabled = false;
         //}
         //var cellIsForeignSideMandatory = e.Row.Cells.FirstOrDefault(x => x.Column.Name == "colIsForeignSideMandatory");
         //if (cellIsForeignSideMandatory != null)
         //{
         //    if (item.Relationship.TypeEnum == Enum_RelationshipType.OneToMany
         //    || item.Relationship.TypeEnum == Enum_RelationshipType.ImplicitOneToOne)
         //    {
         //        cellIsForeignSideMandatory.IsEnabled = true;
         //    }
         //    else
         //        cellIsForeignSideMandatory.IsEnabled = false;
         //}
         //var cellIsPrimarySideMandatory = e.Row.Cells.FirstOrDefault(x => x.Column.Name == "colIsPrimarySideMandatory");
         //if (cellIsPrimarySideMandatory != null)
         //{
         //    if (item.Relationship.TypeEnum == Enum_RelationshipType.OneToMany
         //    || item.Relationship.TypeEnum == Enum_RelationshipType.ImplicitOneToOne)
         //    {
         //        cellIsPrimarySideMandatory.IsEnabled = true;
         //    }
         //    else
         //        cellIsPrimarySideMandatory.IsEnabled = false;
         //}
     }
 }
 /// <summary>
 /// Row Loaded Event, changes the color for StockSpecificDiscount
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgDCFAnalysisSummary_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
 {
     if (e.Row != null)
     {
         if (e.Row.DataContext != null)
         {
             var data = e.Row.DataContext as DCFDisplayData;
             if (data == null)
             {
                 return;
             }
             if ((e.Row.DataContext as DCFDisplayData).PropertyName == "Stock Specific Discount")
             {
                 e.Row.Background = new SolidColorBrush(Colors.Yellow);
             }
             else
             {
                 e.Row.Background = new SolidColorBrush(Colors.White);
             }
         }
     }
 }
示例#16
0
        private void MyAssignedWorkGrid_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            //Telerik.Windows.Controls.GridView.GridViewCellBase statusCell = null;

            //Telerik.Windows.Controls.GridView.GridViewCellBase workflowCell = null;

            //Telerik.Windows.Controls.GridView.GridViewCellBase actionCell = null;


            //foreach (Telerik.Windows.Controls.GridView.GridViewCellBase currentCell in e.Row.Cells) {

            //    switch (currentCell.Column.UniqueName) {

            //        case "Workflow": workflowCell = currentCell; break;

            //        case "Action": actionCell = currentCell; break;

            //    }

            //}

            //if (e.Row is Telerik.Windows.Controls.GridView.GridViewRow) {

            //    if (e.DataElement is Client.Core.Work.WorkQueueItem) {

            //        Client.Core.Work.WorkQueueItem workQueueItem = (Client.Core.Work.WorkQueueItem) e.DataElement;

            //        Client.Core.Work.WorkQueue workQueue = workQueueItem.WorkQueue;

            //        if (workQueue == null) {

            //            foreach (Client.Core.Work.WorkQueue currentWorkQueue in workQueuesAvailable) {

            //                if (currentWorkQueue.Id == workQueueItem.WorkQueueId) {

            //                    workQueue = currentWorkQueue;

            //                    break;

            //                }

            //            }

            //        }


            //        #region Action

            //        //Telerik.Windows.Controls.RadComboBox actionSelection = new Telerik.Windows.Controls.RadComboBox ();

            //        //actionSelection.Tag = workQueueItem;

            //        //actionSelection.Items.Add ("<select>");


            //        // RELEASE ASSIGNMENT (SELF ASSIGNED OR THROUGH MANAGE)

            //        //if ((workQueueItem.AssignedToSecurityAuthorityId == MercuryApplication.Session.AuthorityId) && (workQueueItem.AssignedToUserAccountId == MercuryApplication.Session.UserAccountId)) {

            //        //    actionSelection.Items.Add ("Release");

            //        //}

            //        //if ((workQueue.WorkflowId == 0) || (MercuryApplication.SessionWorkQueueHasManagePermission (workQueueItem.WorkQueueId))) {

            //        //    actionSelection.Items.Add ("Suspend");

            //        //    actionSelection.Items.Add ("Close");

            //        //}

            //        //if (MercuryApplication.SessionWorkQueueHasManagePermission (workQueueItem.WorkQueueId)) {

            //        //    // TODO: IMPLEMENT RESET

            //        //    // actionSelection.Items.Add ("Reset");

            //        //}

            //        //actionSelection.SelectedIndex = 0;

            //        //actionSelection.SelectionChanged += new Telerik.Windows.Controls.SelectionChangedEventHandler (ActionSelection_SelectionChanged);

            //        //actionCell.Content = actionSelection;

            //        #endregion

            //    }

            //}


            return;
        }