Esempio n. 1
0
        private void gridViewProduct_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            FullDataSet.ProductRow _row = this.gridViewProduct.GetDataRow(e.RowHandle) as FullDataSet.ProductRow;
            if (_row != null)
            {
                string pack    = "";
                string place   = "";
                string farmgr  = "";
                string subst   = "";
                string country = "";

                /*  if (_row.PackingRef > 0)
                 *    pack = _row.PackingRow.Name.ToString();
                 *
                 * if (_row.StorageConditionRef > 0)
                 *    place = _row.StorageConditionRow.Name.ToString();
                 *
                 * if (_row.FarmGrouplevel2Ref > 0)
                 *
                 *    farmgr = _row.FarmGroupLevel2Row.Name.ToString();
                 *
                 * if (_row.SubstanceRef > 0)
                 *    place = _row.SubstanceRow.Name.ToString();
                 *
                 *
                 * e.PreviewText = pack.ToString() + "   " + place + "  " + farmgr + "   " + subst + "  " + country;
                 *
                 */
            }
        }
Esempio n. 2
0
 private void gvConditions_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
 {
     if (e.Row is IJarsRule er)
     {
         e.PreviewText = $"{er.SourceTypeName} ({er.SourceCriteriaString}){Environment.NewLine}Were({er.TargetTypeName}{er.TargetCriteriaString})";
     }
 }
Esempio n. 3
0
        private void gridView1_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            GridView view = sender as GridView;

            if (view == null)
            {
                return;
            }
            e.PreviewText = "Item: " + e.PreviewText + "; Units: " + view.GetRowCellDisplayText(e.RowHandle, view.Columns["Column1"]) + ".";
        }
Esempio n. 4
0
        private void GridView1_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            GridView view = sender as GridView;

            if (view == null)
            {
                return;
            }

            e.PreviewText = "Stage Path Dir: "
                            + view.GetRowCellDisplayText(e.RowHandle, view.Columns[DataStore.StagePathDir_FldName]);
        }
Esempio n. 5
0
        private void gridView1_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            GridView View = sender as GridView;
            string   tags = View.GetRowCellDisplayText(e.RowHandle, colEFUTAGS);
            string   info = View.GetRowCellDisplayText(e.RowHandle, colEFUINFO);

            //if (View.GetRowCellDisplayText(e.RowHandle, colTAGS) != "")
            e.PreviewText = tags;
            if (e.PreviewText != "" && info != "")
            {
                e.PreviewText += "\r\n";
            }
            e.PreviewText += info;
        }
Esempio n. 6
0
        private void kkmGridView_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            string n1 = kkmGridView.GetRowCellDisplayText(e.RowHandle, "N1");
            string n2 = kkmGridView.GetRowCellDisplayText(e.RowHandle, "N2");
            string n3 = kkmGridView.GetRowCellDisplayText(e.RowHandle, "N3");
            string n4 = kkmGridView.GetRowCellDisplayText(e.RowHandle, "N4");
            string n5 = kkmGridView.GetRowCellDisplayText(e.RowHandle, "N5");

            n1 = string.IsNullOrWhiteSpace(n1) ? "" : "N1: " + n1 + "\r\n";
            n2 = string.IsNullOrWhiteSpace(n2) ? "" : "N2: " + n2 + "\r\n";
            n3 = string.IsNullOrWhiteSpace(n3) ? "" : "N3: " + n3 + "\r\n";
            n4 = string.IsNullOrWhiteSpace(n4) ? "" : "N4: " + n4 + "\r\n";
            n5 = string.IsNullOrWhiteSpace(n5) ? "" : "N5: " + n5 + "\r\n";

            e.PreviewText = n1 + n2 + n3 + n4 + n5;
        }
 private void gvBOSExternalEntity_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
 {
     try
     {
         if (e.DataSourceRowIndex > -1)
         {
             if (e.Row is BOSEntity bosEnt)
             {
                 e.PreviewText = $"L: {bosEnt.Location}{Environment.NewLine}D: {bosEnt.Description}";
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception("gvBOSExternalEntity_CalcPreviewText:", ex);
     }
 }
Esempio n. 8
0
        private void afbGridView_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            GridView View   = sender as GridView;
            string   tags   = View.GetRowCellDisplayText(e.RowHandle, colTAGS);
            string   ozlDrm = View.GetRowCellDisplayText(e.RowHandle, colOZLDRM);

            //if (View.GetRowCellDisplayText(e.RowHandle, colTAGS) != "")
            e.PreviewText = View.GetRowCellDisplayText(e.RowHandle, colTAGS);
            if (e.PreviewText != "" && ozlDrm != "")
            {
                e.PreviewText += "\r\n";
            }
            e.PreviewText += View.GetRowCellDisplayText(e.RowHandle, colOZLDRM);

            /*
             * GridView View = sender as GridView;
             * var aaa = e.RowHeight;
             * var bbb = View.GetRowPreviewDisplayText(e.RowHandle);
             * //if (View.GetRowCellDisplayText(e.RowHandle, colTAGS) == "")
             *  if (View.GetRowPreviewDisplayText(e.RowHandle) == "")
             *      e.RowHeight = 0;*/
        }
Esempio n. 9
0
        private void gridViewMainProduct_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            //e.PreviewText = "Item: " + e.PreviewText + "; Units: " + gridView1.GetRowCellDisplayText(e.RowHandle, gridView1.Columns["UnitsOnOrder"]) + ".";
            FullDataSet.ProductRow _row = this.gridViewMainProduct.GetDataRow(e.RowHandle) as FullDataSet.ProductRow;
            if (_row != null)
            {
                string pack   = "";
                string place  = "";
                string farmgr = "";
                string subst  = "";


                if (_row.PackingRef > 0)
                {
                    pack = _row.PackingRow.Name.ToString();
                }

                if (_row.StorageConditionRef > 0)
                {
                    place = _row.StorageConditionRow.Name.ToString();
                }

                if (_row.FarmGrouplevel2Ref > 0)
                {
                    farmgr = _row.FarmGroupLevel2Row.Name.ToString();
                }

                if (_row.SubstanceRef > 0)
                {
                    place = _row.SubstanceRow.Name.ToString();
                }



                e.PreviewText = pack.ToString() + "   " + place + "  " + farmgr + "   " + subst;
            }
        }
		private void gridViewPublications_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
		{
			var previewText = new SortedDictionary<int, string>();
			int maxNumber = 12;
			var insert = gridViewPublications.GetRow(e.RowHandle) as Insert;
			if (insert == null) return;
			if (ShowCommentsInPreview && !string.IsNullOrEmpty(e.PreviewText))
				previewText.Add(PositionCommentsInPreview > 0 && !previewText.Keys.Contains(PositionCommentsInPreview) ? PositionCommentsInPreview : ++maxNumber, e.PreviewText);
			if (ShowSectionInPreview && !string.IsNullOrEmpty(insert.FullSection))
				previewText.Add(PositionSectionInPreview > 0 && !previewText.Keys.Contains(PositionSectionInPreview) ? PositionSectionInPreview : ++maxNumber, "Section: " + insert.FullSection);
			if (ShowMechanicalsInPreview && !string.IsNullOrEmpty(insert.Mechanicals))
				previewText.Add(PositionMechanicalsInPreview > 0 && !previewText.Keys.Contains(PositionMechanicalsInPreview) ? PositionMechanicalsInPreview : ++maxNumber, "Mech: " + insert.Mechanicals);
			if (ShowDeliveryInPreview && !string.IsNullOrEmpty(insert.Delivery))
				previewText.Add(PositionDeliveryInPreview > 0 && !previewText.Keys.Contains(PositionDeliveryInPreview) ? PositionDeliveryInPreview : ++maxNumber, "Delivery: " + insert.Delivery);
			if (ShowPublicationInPreview && !string.IsNullOrEmpty(insert.Publication))
				previewText.Add(PositionPublicationInPreview > 0 && !previewText.Keys.Contains(PositionPublicationInPreview) ? PositionPublicationInPreview : ++maxNumber, "Publication: " + insert.Publication);
			if (ShowPageSizeInPreview && !string.IsNullOrEmpty(insert.PageSize))
				previewText.Add(PositionPageSizeInPreview > 0 && !previewText.Keys.Contains(PositionPageSizeInPreview) ? PositionPageSizeInPreview : ++maxNumber, "Page Size: " + insert.PageSize);
			if (ShowPercentOfPageInPreview && !string.IsNullOrEmpty(insert.PercentOfPage))
				previewText.Add(PositionPercentOfPageInPreview > 0 && !previewText.Keys.Contains(PositionPercentOfPageInPreview) ? PositionPercentOfPageInPreview : ++maxNumber, insert.PercentOfPage + " Share of Page");
			if (ShowDimensionsInPreview && !string.IsNullOrEmpty(insert.Dimensions))
				previewText.Add(PositionDimensionsInPreview > 0 && !previewText.Keys.Contains(PositionDimensionsInPreview) ? PositionDimensionsInPreview : ++maxNumber, "Col. x Inches: " + insert.Dimensions);
			if (ShowColumnInchesInPreview && !string.IsNullOrEmpty(insert.SquareStringFormatted))
				previewText.Add(PositionColumnInchesInPreview > 0 && !previewText.Keys.Contains(PositionColumnInchesInPreview) ? PositionColumnInchesInPreview : ++maxNumber, "Total Col In: " + insert.SquareStringFormatted + " col. in.");
			if (ShowReadershipInPreview && !string.IsNullOrEmpty(insert.Readership))
				previewText.Add(PositionReadershipInPreview > 0 && !previewText.Keys.Contains(PositionReadershipInPreview) ? PositionReadershipInPreview : ++maxNumber, "Readership: " + insert.Readership);
			if (ShowDeadlineInPreview && !string.IsNullOrEmpty(insert.Deadline))
				previewText.Add(PositionDeadlineInPreview > 0 && !previewText.Keys.Contains(PositionDeadlineInPreview) ? PositionDeadlineInPreview : ++maxNumber, "Deadline: " + insert.Deadline);
			e.PreviewText = string.Join(",   ", previewText.Values.ToArray());
			if (string.IsNullOrEmpty(e.PreviewText))
				e.PreviewText = "            ";
		}
Esempio n. 11
0
 private void gridView3_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
 {
     MessageBox.Show("previewtext");
 }
Esempio n. 12
0
 private void gridView_CalcPreviewText(object sender, CalcPreviewTextEventArgs e) {
     if (gridView.Columns[gridView.PreviewFieldName] != null) {
         e.PreviewText = gridView.GetRowCellDisplayText(e.RowHandle, gridView.Columns[gridView.PreviewFieldName]);
     }
 }
Esempio n. 13
0
        private void gridViewProduct_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            FullDataSet.ProductRow _row = this.gridViewProduct.GetDataRow(e.RowHandle) as FullDataSet.ProductRow;
            if (_row != null)
            {
                string pack = "";
                string place = "";
                string farmgr = "";
                string subst = "";
                string country = "";

              /*  if (_row.PackingRef > 0)
                    pack = _row.PackingRow.Name.ToString();

                if (_row.StorageConditionRef > 0)
                    place = _row.StorageConditionRow.Name.ToString();

                if (_row.FarmGrouplevel2Ref > 0)

                    farmgr = _row.FarmGroupLevel2Row.Name.ToString();

                if (_row.SubstanceRef > 0)
                    place = _row.SubstanceRow.Name.ToString();


                e.PreviewText = pack.ToString() + "   " + place + "  " + farmgr + "   " + subst + "  " + country;
            
               */ 
               }
        }
Esempio n. 14
0
        private void gridViewMainProduct_CalcPreviewText(object sender, CalcPreviewTextEventArgs e)
        {
            //e.PreviewText = "Item: " + e.PreviewText + "; Units: " + gridView1.GetRowCellDisplayText(e.RowHandle, gridView1.Columns["UnitsOnOrder"]) + ".";
            FullDataSet.ProductRow _row = this.gridViewMainProduct.GetDataRow(e.RowHandle) as FullDataSet.ProductRow;
            if (_row != null)
            {
                string pack = "";
                string place = "";
                string farmgr = "";
                string subst = "";
              

                if (_row.PackingRef > 0)
                    pack = _row.PackingRow.Name.ToString();

                if (_row.StorageConditionRef > 0)
                    place = _row.StorageConditionRow.Name.ToString();

                if (_row.FarmGrouplevel2Ref > 0)

                    farmgr = _row.FarmGroupLevel2Row.Name.ToString();

                if (_row.SubstanceRef > 0)
                    place = _row.SubstanceRow.Name.ToString();

              

                e.PreviewText = pack.ToString() + "   " + place + "  " + farmgr + "   " + subst ;

            }
        }