|
1 | 1 | using System; |
2 | | -using System.Collections.Generic; |
3 | 2 | using System.Linq; |
4 | 3 | using System.Windows.Forms; |
5 | 4 | using OpenAC.Net.Core; |
@@ -175,49 +174,49 @@ private void Salvar() |
175 | 174 | } |
176 | 175 | } |
177 | 176 |
|
178 | | - private void btnAtualizar_Click(object sender, EventArgs e) |
| 177 | + private void btnAtualizarProd_Click(object sender, EventArgs e) |
179 | 178 | { |
180 | | - string novoLink = ""; |
| 179 | + var novoLink = ""; |
181 | 180 | if (InputBox.Show("Atualização de todos os endereços de produção", "Digite o link, se quiser alterar em tela, todos os campos com dados", ref novoLink).Equals(DialogResult.Cancel)) return; |
182 | 181 |
|
183 | | - if (!string.IsNullOrWhiteSpace(txtPEnviar.Text)) txtPEnviar.Text = novoLink; |
184 | | - if (!string.IsNullOrWhiteSpace(txtPCancelaNFSe.Text)) txtPCancelaNFSe.Text = novoLink; |
185 | | - if (!string.IsNullOrWhiteSpace(txtPCancelaNFSeLote.Text)) txtPCancelaNFSeLote.Text = novoLink; |
186 | | - if (!string.IsNullOrWhiteSpace(txtPConsultaNFSeRps.Text)) txtPConsultaNFSeRps.Text = novoLink; |
187 | | - if (!string.IsNullOrWhiteSpace(txtPConsultarSituacao.Text)) txtPConsultarSituacao.Text = novoLink; |
188 | | - if (!string.IsNullOrWhiteSpace(txtPEnviarSincrono.Text)) txtPEnviarSincrono.Text = novoLink; |
189 | | - if (!string.IsNullOrWhiteSpace(txtPConsultaNFSe.Text)) txtPConsultaNFSe.Text = novoLink; |
190 | | - if (!string.IsNullOrWhiteSpace(txtPConsultrLoteRps.Text)) txtPConsultrLoteRps.Text = novoLink; |
191 | | - if (!string.IsNullOrWhiteSpace(txtPConsultarSequencialRps.Text)) txtPConsultarSequencialRps.Text = novoLink; |
192 | | - if (!string.IsNullOrWhiteSpace(txtPSubstituirNFSe.Text)) txtPSubstituirNFSe.Text = novoLink; |
193 | | - if (!string.IsNullOrWhiteSpace(txtPAutenticacao.Text)) txtPAutenticacao.Text = novoLink; |
| 182 | + txtPEnviar.Text = novoLink; |
| 183 | + txtPCancelaNFSe.Text = novoLink; |
| 184 | + txtPCancelaNFSeLote.Text = novoLink; |
| 185 | + txtPConsultaNFSeRps.Text = novoLink; |
| 186 | + txtPConsultarSituacao.Text = novoLink; |
| 187 | + txtPEnviarSincrono.Text = novoLink; |
| 188 | + txtPConsultaNFSe.Text = novoLink; |
| 189 | + txtPConsultrLoteRps.Text = novoLink; |
| 190 | + txtPConsultarSequencialRps.Text = novoLink; |
| 191 | + txtPSubstituirNFSe.Text = novoLink; |
| 192 | + txtPAutenticacao.Text = novoLink; |
194 | 193 | } |
195 | 194 |
|
196 | 195 | private void btnAtualizarHom_Click(object sender, EventArgs e) |
197 | 196 | { |
198 | | - string novoLink = ""; |
| 197 | + var novoLink = ""; |
199 | 198 | if (InputBox.Show("Atualização de todos os endereços de homologação", "Digite o link, se quiser alterar em tela, todos os campos com dados", ref novoLink).Equals(DialogResult.Cancel)) return; |
200 | 199 |
|
201 | | - if (!string.IsNullOrWhiteSpace(txtHEnviar.Text)) txtPEnviar.Text = novoLink; |
202 | | - if (!string.IsNullOrWhiteSpace(txtHCancelaNFSe.Text)) txtPCancelaNFSe.Text = novoLink; |
203 | | - if (!string.IsNullOrWhiteSpace(txtHCancelaNFSeLote.Text)) txtPCancelaNFSeLote.Text = novoLink; |
204 | | - if (!string.IsNullOrWhiteSpace(txtHConsultaNFSeRps.Text)) txtPConsultaNFSeRps.Text = novoLink; |
205 | | - if (!string.IsNullOrWhiteSpace(txtHConsultarSituacao.Text)) txtPConsultarSituacao.Text = novoLink; |
206 | | - if (!string.IsNullOrWhiteSpace(txtHEnviarSincrono.Text)) txtPEnviarSincrono.Text = novoLink; |
207 | | - if (!string.IsNullOrWhiteSpace(txtHConsultaNFSe.Text)) txtPConsultaNFSe.Text = novoLink; |
208 | | - if (!string.IsNullOrWhiteSpace(txtHConsultrLoteRps.Text)) txtPConsultrLoteRps.Text = novoLink; |
209 | | - if (!string.IsNullOrWhiteSpace(txtHConsultarSequencialRps.Text)) txtPConsultarSequencialRps.Text = novoLink; |
210 | | - if (!string.IsNullOrWhiteSpace(txtHSubstituirNFSe.Text)) txtPSubstituirNFSe.Text = novoLink; |
211 | | - if (!string.IsNullOrWhiteSpace(txtHAutenticacao.Text)) txtPAutenticacao.Text = novoLink; |
| 200 | + txtHEnviar.Text = novoLink; |
| 201 | + txtHCancelaNFSe.Text = novoLink; |
| 202 | + txtHCancelaNFSeLote.Text = novoLink; |
| 203 | + txtHConsultaNFSeRps.Text = novoLink; |
| 204 | + txtHConsultarSituacao.Text = novoLink; |
| 205 | + txtHEnviarSincrono.Text = novoLink; |
| 206 | + txtHConsultaNFSe.Text = novoLink; |
| 207 | + txtHConsultrLoteRps.Text = novoLink; |
| 208 | + txtHConsultarSequencialRps.Text = novoLink; |
| 209 | + txtHSubstituirNFSe.Text = novoLink; |
| 210 | + txtHAutenticacao.Text = novoLink; |
212 | 211 | } |
213 | 212 |
|
214 | 213 | private Control[] CreateControl(ParametroProvider parametro) |
215 | 214 | { |
216 | 215 | return parametro.Tipo switch |
217 | 216 | { |
218 | | - TipoParametro.Text => [new TextBox() { Tag = parametro, Dock = DockStyle.Top}, |
219 | | - new Label() { Text = parametro.Nome.ToFriendlyCase(), Dock = DockStyle.Top, }], |
220 | | - TipoParametro.Boolean => [new CheckBox() { Text= parametro.Nome.ToFriendlyCase(), Dock = DockStyle.Top, Tag = parametro }], |
| 217 | + TipoParametro.Text => [new TextBox { Tag = parametro, Dock = DockStyle.Top}, |
| 218 | + new Label { Text = parametro.Nome.ToFriendlyCase(), Dock = DockStyle.Top, }], |
| 219 | + TipoParametro.Boolean => [new CheckBox { Text= parametro.Nome.ToFriendlyCase(), Dock = DockStyle.Top, Tag = parametro }], |
221 | 220 | _ => throw new NotImplementedException(), |
222 | 221 | }; |
223 | 222 | } |
|
0 commit comments