Exemplo n.º 1
0
        private void btnActualizar_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            int    idPod = 0;
            string id    = string.Empty;

            {
                if (rdioPLM.Checked && dtDatosPLM.Rows.Count > 0)
                {
                    if (!string.IsNullOrEmpty(dtDatosPLM.CurrentRow.Cells[0].Value.ToString()))
                    {
                        string estilo;
                        estilo = dtDatosPLM.CurrentRow.Cells[0].Value.ToString();
                        if (Estilos.Existe(estilo) == false)
                        {
                            id             = dtDatosPLM.CurrentRow.Cells[0].Value.ToString();
                            idPod          = 1;
                            Cursor.Current = Cursors.Default;
                            EstilosdeProduccionVista frm = new EstilosdeProduccionVista(id, idPod);
                            frm.ShowDialog();
                        }
                        else
                        {
                            Dialogs.Show("El Estilo ya se encuentra registrado en el sistema", DialogsType.Error);
                        }
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(dtDatosDyn.CurrentRow.Cells[0].Value.ToString()))
                    {
                        string estilo;
                        estilo = dtDatosDyn.CurrentRow.Cells[0].Value.ToString();
                        if (Estilos.Existe(estilo) == false)
                        {
                            id             = dtDatosDyn.CurrentRow.Cells[0].Value.ToString();
                            idPod          = 2;
                            Cursor.Current = Cursors.Default;
                            EstilosdeProduccionVista frm = new EstilosdeProduccionVista(id, idPod);
                            frm.ShowDialog();
                        }
                        else
                        {
                            Dialogs.Show("El Estilo ya se encuentra registrado en el sistema", DialogsType.Error);
                        }
                    }
                }
                Cursor.Current = Cursors.WaitCursor;
                Estilos.EstilosdeProduccion(dtDatosPLM);
                Estilos.EstilosDynamicsBom(dtDatosDyn);
                // rdioDynamics.Checked = false;
                // rdioPLM.Checked = true;
            }
            Cursor.Current = Cursors.Default;
        }
Exemplo n.º 2
0
        private void btnAlta_Click(object sender, EventArgs e)
        {
            DialogsResults respuesta = Dialogs.Show("Desea crear un nuevo estilo? ", DialogsType.Question);

            if (respuesta == DialogsResults.Yes)
            {
                EstilosdeProduccionVista frm = new EstilosdeProduccionVista(string.Empty, 0);
                frm.ShowDialog();
                Estilos.EstilosdeProduccion(dtDatosPLM);
                Estilos.EstilosDynamicsBom(dtDatosDyn);
            }
        }