Ejemplo n.º 1
0
        private void DataGV_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (DataGV.SelectedRows[0].Cells[e.ColumnIndex].OwningColumn.Name == "PricesC")
            {
                Wares.Price.PricesList form = new Wares.Price.PricesList(Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value));
                form.ShowDialog();
            }
            if (DataGV.SelectedRows[0].Cells[e.ColumnIndex].OwningColumn.Name == "ComponentsC")
            {
                Wares.Ware.WareComponentDataSimple form = new Wares.Ware.WareComponentDataSimple("edit", Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value));
                form.ShowDialog();
            }



            if (DataGV.SelectedRows.Count > 0)
            {
                ComponentsTV.Nodes.Clear();
                int wareId = Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value);
                WareComponentsLogic  componentsLogic = new WareComponentsLogic(manager);
                List <WareComponent> components      = componentsLogic.GetAllRecursively(wareId, null);
                foreach (WareComponent component in components)
                {
                    ComponentsTV.Nodes.Add(component.WareID.ToString(), component.Ware1.Name + " " + component.UnitQuantity.ToString() + component.Ware1.WareUnit.Name);
                }
            }
        }
Ejemplo n.º 2
0
 private void ComponentsSB_Click(object sender, EventArgs e)
 {
     Wares.Ware.WareComponentDataSimple form = new Wares.Ware.WareComponentDataSimple("edit", Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value));
     form.MdiParent = this.MdiParent;
     form.Show();
     //wareFilterUC1.Fill();
 }
Ejemplo n.º 3
0
        private void DataGV_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (DataGV.SelectedRows[0].Cells[e.ColumnIndex].OwningColumn.Name == "PricesC")
            {
                Wares.Price.PricesList form = new Wares.Price.PricesList(Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value));
                form.ShowDialog();
            }
            if (DataGV.SelectedRows[0].Cells[e.ColumnIndex].OwningColumn.Name == "ComponentsC")
            {
                Wares.Ware.WareComponentDataSimple form = new Wares.Ware.WareComponentDataSimple("edit", Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value));
                form.ShowDialog();
            }

            if (DataGV.SelectedRows.Count > 0)
            {
                ComponentsTV.Nodes.Clear();
                int wareId = Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value);
                WareComponentsLogic componentsLogic = new WareComponentsLogic(manager);
                List<WareComponent> components = componentsLogic.GetAllRecursively(wareId, null);
                foreach (WareComponent component in components)
                {
                    ComponentsTV.Nodes.Add(component.WareID.ToString(), component.Ware1.Name + " " + component.UnitQuantity.ToString() + component.Ware1.WareUnit.Name);
                }
            }
        }
Ejemplo n.º 4
0
 private void ComponentsSB_Click(object sender, EventArgs e)
 {
     Wares.Ware.WareComponentDataSimple form = new Wares.Ware.WareComponentDataSimple("edit", Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value));
     form.MdiParent = this.MdiParent;
     form.Show();
     //wareFilterUC1.Fill();
 }