コード例 #1
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            PopupDescuentosXtraForm popup = new PopupDescuentosXtraForm(AGlobalActividad);

            if (popup.ShowDialog() == DialogResult.OK)
            {
                ActualizaDescuentos();
            }
        }
コード例 #2
0
        private void Descuentos_simpleButton_Click(object sender, EventArgs e)
        {
            PopupDescuentosXtraForm descuentosXtraform = new PopupDescuentosXtraForm(AAct);

            if (descuentosXtraform.ShowDialog() == DialogResult.OK)
            {
                Descuentos_buttonEdit.EditValue             = AAct.Descuentos;
                ImporteDistribuirConDesc_textEdit.EditValue = AAct.ImporteConDescuento;
            }
        }
コード例 #3
0
        private void Descuentos_buttonEdit_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            if (AAct.Agrupacion.GetDeuda(AAct.TipoMonedaId) <= 0)
            {
                XtraMessageBox.AllowHtmlText = true;
                if (
                    XtraMessageBox.Show(
                        String.Format(
                            "La Agrupacion {0} no tiene deuda en {1}, no se le puede aplicar ningún descuento. <br> Debe antes insertar una deuda en el botón Ingresar Deuda o desde la ventana Deudas.</br> ¿Desea asignar ahora alguna deuda a la Unidad Artística?",
                            AAct.Agrupacion.Nombre, AAct.TipoMoneda.Abreviatura), "Atención", MessageBoxButtons.YesNo,
                        MessageBoxIcon.Hand) == DialogResult.Yes)
                {
                    PopupGestionDeudaXtraForm popup = new PopupGestionDeudaXtraForm(AAct.AgrupacionId,
                                                                                    AGlobalDataContext, AAct.TipoMonedaId);
                    if (popup.ShowDialog() == DialogResult.OK)
                    {
                        AGlobalDataContext = new NegocioDataContext();
                        AAct =
                            AGlobalDataContext.OrdenDeTrabajo.FirstOrDefault(
                                c => c.OrdenDeTrabajoID == AAct.OrdenDeTrabajoID);
                        CalculaDeuda();
                    }
                }
                else
                {
                    return;
                }
            }
            PopupDescuentosXtraForm descuentosXtraform = new PopupDescuentosXtraForm(AAct);

            if (descuentosXtraform.ShowDialog() == DialogResult.OK)
            {
                Descuentos_buttonEdit.EditValue             = AAct.Descuentos;
                ImporteDistribuirConDesc_textEdit.EditValue = Decimal.Round((decimal)ParaUAImporteSinDescuento_textEdit.EditValue -
                                                                            (decimal)Descuentos_buttonEdit.EditValue, 2);
            }
        }