private void ventasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Facturacion facturacion = new Facturacion();

            facturacion.Show();
            facturacion.MdiParent = this;
        }
Exemple #2
0
        private async void btnfacturar_Click(object sender, RoutedEventArgs e)
        {
            //var metroWindow = this;
            //metroWindow.MetroDialogOptions.ColorScheme = MetroDialogOptions.ColorScheme;
            //ProgressDialogController ProgressAlert = null;

            //string msj_eccomer = "sssssss  \n" + "xxxxx";
            ////await ProgressAlert.CloseAsync();
            //await metroWindow.ShowMessageAsync(Ent_Msg.msginfomacion, msj_eccomer, MessageDialogStyle.Affirmative, metroWindow.MetroDialogOptions);

            //return;

            DataRowView row = (DataRowView)((Button)e.Source).DataContext;

            string _guia_no      = (string)row["tra_gui_no"].ToString();
            string _liq_no       = (string)row["Liq_Id"];
            string _cliente_name = (string)row["nombres"];

            var mySettings = new MetroDialogSettings()
            {
                AffirmativeButtonText = "Si",
                NegativeButtonText    = "No",
                //FirstAuxiliaryButtonText = "Cancelar",
                ColorScheme = MetroDialogOptions.ColorScheme,
            };

            MessageDialogResult result = await this.ShowMessageAsync(Ent_Msg.msginfomacion, "¿Realmente desea iniciar el empacado de la liquidación No. : " + _liq_no + " perteneciente al cliente : " + _cliente_name,
                                                                     MessageDialogStyle.AffirmativeAndNegative, mySettings);

            if (result == MessageDialogResult.Affirmative)
            {
                Facturacion._liq_id         = _liq_no;
                Facturacion._liq_fecha      = (string)row["Liq_FechaIng"].ToString();
                Facturacion._guia_no        = (string)row["tra_gui_no"].ToString();
                Facturacion._transportadora = (string)row["tra_descripcion"].ToString();
                Facturacion._cli_id         = (string)row["Liq_BasId"].ToString();
                Facturacion._cli_doc        = (string)row["Bas_Documento"].ToString();
                Facturacion._cli_nombre     = (string)row["nombres"].ToString();
                Facturacion._cli_direccion  = (string)row["Bas_Direccion"].ToString();
                Facturacion._cli_ciudad     = (string)row["ubicacion"].ToString();
                Int32 cantida_liq = Convert.ToInt32(row["tpares"]);
                Facturacion._liq_cliente  = "(" + _liq_no + " | Cliente: " + (string)row["nombres"].ToString() + ")";
                Facturacion._liq_cantidad = cantida_liq;
                Facturacion frm = new Facturacion();
                frm.Show();
                this.Close();
            }
        }