Exemplo n.º 1
0
        protected virtual void onshown()
        {
            if (!DesignMode)
            {
                productInternals pdi = new productInternals(this);
                pdi.ShowDialog();

                if (this.idproduct == -1)
                {
                    this.Close();
                }
                else
                {
                    this.getdata();
                    this.txt1.Focus();
                }
            }
        }
        protected override void onshown()
        {
            if (!DesignMode)
            {
                productInternals pdi = new productInternals(this);
                pdi.ShowDialog();

                if (this.db.productisondetalles(this.idproduct))
                {
                    genericDefinitions.dangerInfo("No se puede eliminar este producto, contacte al administrador!.", "Advertencia");
                    this.onCancel();
                }

                if (this.idproduct == -1)
                {
                    this.Close();
                }
                else
                {
                    this.getdata();
                    this.txt1.Focus();
                }
            }
        }