Exemplo 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;
                 *
                 */
            }
        }
Exemplo n.º 2
0
 private void btProductReport_Click(object sender, EventArgs e)
 {
     FullDataSet.ProductRow _row = this.gridViewMainProduct.GetDataRow((this.grid.FocusedView as ColumnView).FocusedRowHandle) as FullDataSet.ProductRow;
     if (_row != null)
     {
         (this.ParentForm as MainForm).ProductReport(_row.ID);
     }
 }
Exemplo n.º 3
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;
            }
        }