コード例 #1
0
        private void dtgFactura_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                e.RowIndex >= 0)
            {
                var billTemp = ((List<BillModel>)senderGrid.DataSource)[e.RowIndex];
                ConverseNumberToText numberToTextInstance = new ConverseNumberToText();
                billTemp.TotalInLetters = numberToTextInstance.enletras(billTemp.Total.ToString());
                
                if (System.Configuration.ConfigurationSettings.AppSettings["PrintFormat"].ToString().ToUpper().Equals("CARTA"))
                {
                    VisorFactura visorFactura = new VisorFactura(_billData.GetBillData(billTemp), true);
                    visorFactura.Show();
                }
                else
                {
                    VisorFacturaMediaCarta visorFactura = new VisorFacturaMediaCarta(_billData.GetBillData(billTemp), true);
                    visorFactura.Show();
                }
            }            
        }
コード例 #2
0
        private void PrintRemission()
        {
            ConverseNumberToText numberToTextInstance = new ConverseNumberToText();
            _remission.TotalInLetters = numberToTextInstance.enletras(_remission.Total.ToString());
            _remissionSaveModel.Client = _client;
            _remissionSaveModel.Remission = _remission;
            _remissionSaveModel.RemissionDetail = _remissionDetail;

            if (System.Configuration.ConfigurationSettings.AppSettings["PrintFormat"].ToString().ToUpper().Equals("CARTA"))
            {
                VisorRemision visorRemision = new VisorRemision(_remissionSaveModel);
                visorRemision.Show(this);
            }
            else
            {
                VisorRemisionMediaCarta visorRemision = new VisorRemisionMediaCarta(_remissionSaveModel);
                visorRemision.Show(this);
            }
        }
コード例 #3
0
        private void PrintBill() {
            ConverseNumberToText numberToTextInstance = new ConverseNumberToText();
            _bill.TotalInLetters = numberToTextInstance.enletras(_bill.Total.ToString());
            _billSaveModel.Client = _client;
            _billSaveModel.Bill = _bill;
            _billSaveModel.BillDetail = _billDetail;
            _billSaveModel.BillTaxes = _billTaxes;

            if (System.Configuration.ConfigurationSettings.AppSettings["PrintFormat"].ToString().ToUpper().Equals("CARTA"))
            {
                VisorFactura visorFactura = new VisorFactura(_billSaveModel);
                visorFactura.Show(this);
            }
            else
            {
                VisorFacturaMediaCarta visorFactura = new VisorFacturaMediaCarta(_billSaveModel);
                visorFactura.Show(this);
            }
        }