Ejemplo n.º 1
0
        private void listView1_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            // Событие вывода в виртуальную таблицу Заказов
            int c = ((ListView)sender).VirtualListSize;

            if (((c > 0) && (e.ItemIndex < c)) && (e.ItemIndex > -1))
            {
                cTypeOrderPole cO = new cTypeOrderPole(TypeOrderPoleView[e.ItemIndex].Row);
                e.Item = new ListViewItem(new string[] {
                    cO.Id.ToString(),
                    //cO.IdTypeOrder.ToString(),
                    cO.Number.ToString(),
                    cO.NamePole
                });
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            cTypeOrderPole   ctop = new cTypeOrderPole();
            FormEditPoleName F    = new FormEditPoleName(ctop, "Добавить");

            if (F.ShowDialog(this) == DialogResult.OK)
            {
                DataRowView drvchild = TypeOrderPoleView.AddNew();
                ctop.ThisToRow(drvchild.Row);
                drvchild.EndEdit();

                ReNumberChild();

                listView1.VirtualListSize = TypeOrderPoleView.Count;
                listView1.Refresh();
            }
        }
Ejemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedIndices.Count > 0)
            {
                int            n        = listView1.SelectedIndices[0];
                DataRowView    drvchild = TypeOrderPoleView[n];;
                cTypeOrderPole ctop     = new cTypeOrderPole(drvchild.Row);

                FormEditPoleName F = new FormEditPoleName(ctop, "Изменить");
                if (F.ShowDialog(this) == DialogResult.OK)
                {
                    drvchild.BeginEdit();
                    ctop.ThisToRow(drvchild.Row);
                    drvchild.EndEdit();

                    listView1.VirtualListSize = TypeOrderPoleView.Count;
                    listView1.Refresh();
                }
            }
        }
Ejemplo n.º 4
0
 public FormEditPoleName(cTypeOrderPole ctop, string text)
 {
     cTOP    = ctop;
     strtext = text;
     InitializeComponent();
 }