public bool DatiValidi() { int esercizio; try { esercizio = (int)HelpForm.GetObjectFromString(typeof(int), txtEsercizio.Text.ToString(), "x.y.year"); if ((esercizio < 0)) { MessageBox.Show("L'esercizio non può essere negativo"); txtEsercizio.Focus(); return(false); } //return true; } catch { MessageBox.Show("E' necessario inserire un esercizio"); txtEsercizio.Focus(); return(false); } string filteresercizio = "(ayear=" + QueryCreator.quotedstrvalue(esercizio, true) + ")"; DataTable EsercizioTable = DataAccessLocale.RUN_SELECT("accountingyear", "*", null, filteresercizio, null, true); if (EsercizioTable.Rows.Count == 0) { MessageBox.Show("L'esercizio " + esercizio + " non è stato creato."); txtEsercizio.Focus(); return(false); } txtEsercizio.Focus(); return(true); }
private void FrmAskInfoStore_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (e.Cancel == true) { return; } if (DialogResult == DialogResult.Cancel) { return; } // Varifica il magazzino if (cmbMagazzino.SelectedValue == null) { MessageBox.Show(this, "Non è stato inserito il magazzino", "Avviso"); cmbMagazzino.Focus(); e.Cancel = true; return; } else { idstore = cmbMagazzino.SelectedValue; } // Verifica la data se ammessa if (has_expiry && (txtExpiry.Text == "")) { MessageBox.Show(this, "Non è stato inserita la data scadenza", "Avviso"); e.Cancel = true; return; } else { expiry = HelpForm.GetObjectFromString(typeof(DateTime), txtExpiry.Text.ToString(), "x.y"); } }
private void CalcolaImportiEUR() { try { double imponibile = CfgFn.GetNoNullDouble( HelpForm.GetObjectFromString(typeof(double), txtNewImportoUnitario.Text, "x.y")); double quantita = CfgFn.GetNoNullDouble( HelpForm.GetObjectFromString(typeof(double), txtNewQuantita.Text, "x.y")); double aliquota = CfgFn.GetNoNullDouble( HelpForm.GetObjectFromString(typeof(double), txtNewAliquota.Text, "x.y.fixed.4..%.100")); double sconto = CfgFn.GetNoNullDouble( HelpForm.GetObjectFromString(typeof(double), txtNewSconto.Text, "x.y.fixed.4..%.100")); double imponibiletot = CfgFn.RoundValuta((imponibile * quantita * (1 - sconto))); double imponibiletotEUR = CfgFn.RoundValuta(imponibiletot * tassoCambio); //double iva = CfgFn.RoundValuta(imponibiletot * aliquota); double iva = CfgFn.GetNoNullDouble( HelpForm.GetObjectFromString(typeof(double), txtNewIvaValuta.Text, "x.y")); double ivaEUR = CfgFn.RoundValuta(iva * tassoCambio); txtNewImponibileEuro.Text = HelpForm.StringValue(imponibiletotEUR, "x.y.fixed.2...1"); txtNewIvaEuro.Text = HelpForm.StringValue(ivaEUR, "x.y.fixed.2...1"); } catch { txtNewImponibileEuro.Text = ""; txtNewIvaEuro.Text = ""; } }
private void txtAnticipo_Leave(object sender, EventArgs e) { decimal valore; HelpForm.ExtLeaveDecTextBox(txtAnticipo, "x.y"); string strvalore = txtAnticipo.Text.Trim(); if (strvalore == "") { importo = 0; return; } try { valore = (decimal)HelpForm.GetObjectFromString( typeof(decimal), txtAnticipo.Text , "x.y"); txtAnticipo.Text = valore.ToString("c"); if ((valore < 0)) { MessageBox.Show("L'importo non può essere negativo"); txtAnticipo.Focus(); return; } importo = valore; } catch { MessageBox.Show("E' necessario inserire un importo valido"); txtAnticipo.Focus(); importo = 0; return; } }
private void btnOk_Click(object sender, System.EventArgs e) { if (!DatiValidi()) { DialogResult = DialogResult.None; return; } DateTime TT = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txtData.Text.ToString(), "x.y"); int CurrentEsercizio = (int)Conn.GetSys("esercizio"); if (TT.Year != CurrentEsercizio) { MessageBox.Show("La data deve essere compresa nell'esercizio corrente"); DialogResult = DialogResult.None; return; } if (rdbSi.Checked) { CopiaPrevPrecente = "S"; } else { CopiaPrevPrecente = "N"; } DialogResult = DialogResult.OK; }
/// <summary> /// Calcola Quantità unitaria come q.confezioni* unità per confezione /// </summary> private void CalcolaQuantitaUnitaria() { if (Meta.IsEmpty) { return; } decimal npackage = CfgFn.GetNoNullDecimal(HelpForm.GetObjectFromString(typeof(decimal), txtQuantitaConfezioni.Text, null)); txtQuantitaConfezioni.Text = HelpForm.StringValue(npackage, "x.y.fixed.2...1"); decimal quantitaConfezioni = CfgFn.GetNoNullDecimal(txtQuantitaConfezioni.Text); if (quantitaConfezioni == 0) { txtQuantita.Text = HelpForm.StringValue(quantitaConfezioni, "x.y.fixed.2...1"); return; } int unitsforpackage = CfgFn.GetNoNullInt32(txtCoeffConversione.Text); if (unitsforpackage == 0) { unitsforpackage = 1; } decimal number = npackage * unitsforpackage; txtQuantita.Text = HelpForm.StringValue(number, "x.y.fixed.2...1"); }
private void txtImporto_Leave(object sender, System.EventArgs e) { if (inChiusura) { return; } if (!txtImporto.Modified) { return; } if (!checkimporto()) { // ripristina l'importo originale txtImporto.Text = importoclassificazione.ToString("c"); } else { importoclassificazione = CfgFn.GetNoNullDecimal(HelpForm.GetObjectFromString(typeof(Decimal), txtImporto.Text, HelpForm.GetStandardTag(txtImporto.Tag))); decimal percentuale = 100; if (importototale != 0) { percentuale = importoclassificazione / importototale * 100; } decimal rounded = Math.Round(percentuale, 4); // calcola la percentuale in base all'importo txtPercentuale.Text = HelpForm.StringValue(rounded, "x.y.fixed.4...1"); } }
private void btntrasferisci_Click(object sender, EventArgs e) { if (!DatiValidi()) { return; } object source = txtdbsource.Text; object startayear = HelpForm.GetObjectFromString(typeof(int), txtstartayear.Text.ToString(), "x.y.year"); object dest = txtdbdest.Text; object stopayear = HelpForm.GetObjectFromString(typeof(int), txtstopayear.Text.ToString(), "x.y.year"); DataSet Out = Meta.Conn.CallSP("compute_flowchartcopy", new object[] { source, dest, startayear, stopayear }, false, 600); if ((Out == null) || (Out.Tables.Count == 0) || Out.Tables[0].Rows.Count == 0) { MessageBox.Show(this, "La sp non ha restituito risultati."); return; } DataTable t = Out.Tables[0]; if (t.Rows.Count > 0) { string result = ""; foreach (DataRow r in t.Rows) { result += "\n " + r["messaggio"]; } MessageBox.Show(this, result); } }
public bool DatiValidi() { try { DateTime TT = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txtDataContabile.Text.ToString(), "x.y"); } catch { MessageBox.Show("E' necessario inserire una data valida"); txtDataContabile.Focus(); return(false); } DateTime T = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txtDataContabile.Text.ToString(), "x.y"); int esercizio = T.Year; string filteresercizio = "(ayear=" + QueryCreator.quotedstrvalue(esercizio, true) + ")"; DataTable EsercizioTable = DataAccessLocale.RUN_SELECT("accountingyear", "*", null, filteresercizio, null, true); if (EsercizioTable.Rows.Count == 0) { MessageBox.Show("L'esercizio " + esercizio + " non è stato creato."); txtDataContabile.Focus(); return(false); } return(true); }
public bool DatiValidi() { int esercizio; try { esercizio = (int)HelpForm.GetObjectFromString(typeof(int), txtstartayear.Text.ToString(), "x.y.year"); if ((esercizio < 0)) { MessageBox.Show("L'esercizio non può essere negativo"); txtstartayear.Focus(); return(false); } } catch { MessageBox.Show("E' necessario inserire l'Esercizio DA cui copiare"); txtstartayear.Focus(); return(false); } if (txtdbsource.Text.ToString() == "") { MessageBox.Show("Indicare il dipartimento DA cui copiare i dati."); txtdbsource.Focus(); return(false); } if (txtdbdest.Text.ToString() == "") { MessageBox.Show("Indicare il dipartimento IN cui copiare i dati."); txtdbdest.Focus(); return(false); } return(true); }
private string GetFiltro() { string Filtro = ""; if (CfgFn.GetNoNullInt32(cmbMagazzino.SelectedValue) > 0) { Filtro = QHS.AppAnd(Filtro, QHS.CmpEq("idstore", cmbMagazzino.SelectedValue)); } if (cmbResponsabile.SelectedIndex > 0) { Filtro = QHS.AppAnd(Filtro, QHS.CmpEq("idman", cmbResponsabile.SelectedValue)); } if (txtEsercizio.Text.Trim() != "") { int N1 = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), txtEsercizio.Text, "x.year")); if (N1 > 0) { Filtro = QHS.AppAnd(Filtro, QHS.CmpEq("ybooking", N1)); } } if (txtNumero.Text.Trim() != "") { int N2 = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), txtNumero.Text, "x.y")); if (N2 > 0) { Filtro = QHS.AppAnd(Filtro, QHS.CmpEq("nbooking", N2)); } } Filtro = QHS.AppAnd(Filtro, QHS.CmpGt("allocated", 0)); return(Filtro); }
private void btnAnnullaMatricole_Click(object sender, EventArgs e) { string matricola_da = txt_matricola_da.Text.Trim(); string matricola_a = txt_matricola_a.Text.Trim(); int imatricola_da = 0; int imatricola_a = 0; if ((matricola_da != "") && (isNumeric(matricola_da, out imatricola_da))) { imatricola_da = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), matricola_da, "x.y")); } if ((matricola_a != "") && (isNumeric(matricola_a, out imatricola_a))) { imatricola_a = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), matricola_a, "x.y")); } string warning = " Saranno cancellati i numeri di matricola compresi tra " + matricola_da + " a " + matricola_a + " (inclusi). L'operazione non sarà reversibile. Si desidera continuare?"; if (MessageBox.Show(warning, "Conferma cancellazione", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) != DialogResult.Yes) { MessageBox.Show("Operazione non eseguita"); return; } string script = " update registry set extmatricula = null where convert(int,extmatricula) >= " + imatricola_da + " and convert(int,extmatricula) <= " + imatricola_a; DataTable T = Meta.Conn.SQLRunner(script, true); MessageBox.Show("Operazione eseguita"); }
private void btnOK_Click(object sender, System.EventArgs e) { if (!DatiValidi()) { return; } DateTime TT = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txtDataContabile.Text.ToString(), "x.y"); if (!CambioDataConsentita(DataAccessLocale, TT)) { MessageBox.Show("Accesso non consentito in tale data in base alla gestione della sicurezza"); return; } int CurrentEsercizio = (int)E.GetSys("esercizio"); E.SetSys("datacontabile", TT); E.SetSys("esercizio", TT.Year); //DataAccessLocale.SetDataContabile(TT); //DataAccessLocale.SetEsercizio(TT.Year); if (TT.Year != CurrentEsercizio) { MessageBox.Show("Avvertimento: l'esercizio è stato automaticamente impostato al " + E.GetSys("esercizio").ToString()); } DialogResult = DialogResult.OK; }
private bool checkimporto() { bool OK = false; if (txtImporto.Text == "") { return(false); } string errmsg = "L'importo dovrebbe essere un numero compreso \r" + "tra 0 e " + importototale.ToString("c") + ". Proseguo comunque?"; try { decimal importo = CfgFn.GetNoNullDecimal(HelpForm.GetObjectFromString(typeof(Decimal), txtImporto.Text, HelpForm.GetStandardTag(txtImporto.Tag))); if (((importo >= 0) && (importo <= importototale) && rdbNormale.Checked) || rdbVariazione.Checked) { OK = true; } else { OK = (MessageBox.Show(errmsg, "Avviso", MessageBoxButtons.YesNo) == DialogResult.Yes); } } catch { MessageBox.Show("E' necessario inserire un numero", "Avviso", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation); return(false); } return(OK); }
public bool DatiValidi() { int esercizio; try { esercizio = (int)HelpForm.GetObjectFromString(typeof(int), txtEsercizio.Text.ToString(), "x.y.year"); if ((esercizio < 0)) { MessageBox.Show("L'esercizio non può essere negativo"); txtEsercizio.Focus(); return(false); } } catch { MessageBox.Show("E' necessario inserire un esercizio"); txtEsercizio.Focus(); return(false); } try { DateTime TT = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txtDataRiferimento.Text.ToString(), "x.y"); return(true); } catch { MessageBox.Show("E' necessario inserire una data valida"); txtDataRiferimento.Focus(); return(false); } }
private void btnStart_Click(object sender, EventArgs e) { object start = HelpForm.GetObjectFromString(typeof(int), txtEsercizioInizio.Text, "x.y"); object stop = HelpForm.GetObjectFromString(typeof(int), txtEsercizioFine.Text, "x.y"); if ((start == null) || (start == DBNull.Value) || (stop == null) || (stop == DBNull.Value)) { MessageBox.Show(this, "Specificare entrambe gli esercizi sui quali si vuole impostare il flag", "Errore"); return; } if (cmbEnte.SelectedValue == DBNull.Value) { MessageBox.Show(this, "Specificare l'ente inventariale", "Errore"); return; } object ente = cmbEnte.SelectedValue; DataSet dsOut = DataAccess.CallSP(Meta.Conn, "compute_set_transmitted", new object[] { ente, start, stop }, true, 0); if ((dsOut == null) || (dsOut.Tables.Count == 0)) { MessageBox.Show(this, "Errore nell'esecuzione della procedura di aggiornamento del flag", "Errore"); } else { MessageBox.Show(this, "Procedura eseguita correttamente", "Errore"); } }
void RenderHtmlPage(DataAccess DepConn) { int n_anno = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), anno.Text, null)); if (n_anno == 0) { n_anno = DateTime.Now.Year; } string kind = rdbTipo.SelectedValue; if (kind == null) { kind = "C"; } kind = kind.ToUpper(); if (kind != "D") { kind = "C"; } DataTable dt = GetMainData(DepConn, n_anno, kind, dep); string xml = getHtmlForTable(dt); mydata.InnerHtml = xml; }
public bool DatiValidi() { int esercizio; try { esercizio = (int)HelpForm.GetObjectFromString(typeof(int), txtEsercizio.Text.ToString(), "x.y.year"); if ((esercizio < 0)) { MessageBox.Show("L'esercizio non può essere negativo"); txtEsercizio.Focus(); return(false); } } catch { MessageBox.Show("E' necessario inserire un esercizio"); txtEsercizio.Focus(); return(false); } if (cmbSemestre.SelectedValue == null) { MessageBox.Show("E' necessario selezionare un Semestre"); return(false); } txtEsercizio.Focus(); return(true); }
private void btnBilancio_Click(object sender, System.EventArgs e) { string filter; int esercizio = CfgFn.GetNoNullInt32(Meta.GetSys("esercizio")); string filteridfin = QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.BitSet("flag", 0)); //Il filtro sull'UPB c'è sempre object idupb = Meta.GetAutoField(txtUPB); if (idupb == null) { idupb = DBNull.Value; } if (idupb != DBNull.Value) { filter = QHS.CmpEq("idupb", idupb); } else { filter = QHS.CmpEq("idupb", "0001"); } filter = QHS.AppAnd(filteridfin, filter); //Aggiunge eventualmente il filtro sul disponibile if (chkFilterAvailable.Checked) { decimal currval = 0; if (txtImporto.Text.Trim() != "") { currval = CfgFn.GetNoNullDecimal(HelpForm.GetObjectFromString( typeof(decimal), txtImporto.Text, "x.y.c")); } filter = GetData.MergeFilters(filter, QHS.CmpGe("availableprevision", currval)); } string filteroperativo = "(idfin in (SELECT idfin from finusable where " + QHS.CmpEq("ayear", Meta.GetSys("esercizio")) + "))"; if (chkListTitle.Checked) { FrmAskDescr FR = new FrmAskDescr(0); DialogResult D = FR.ShowDialog(this); if (D != DialogResult.OK) { return; } filter = GetData.MergeFilters(filter, QHS.Like("title", "%" + FR.txtDescrizione.Text + "%")); filter = GetData.MergeFilters(filter, filteroperativo); MetaData.DoMainCommand(this, "choose.finview.default." + filter); return; } DS.finview.ExtendedProperties[MetaData.ExtraParams] = filter; MetaData.DoMainCommand(this, "manage.finview.treesupb"); }
public void MetaData_AfterGetFormData() { DataRow lastRow = HelpForm.GetLastSelected(DS.sortinglevel); int codelen = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), txtLungCodice.Text, "x.y")); int flag = CfgFn.GetNoNullInt32(lastRow["flag"]); lastRow["flag"] = flag & 0xff | (codelen << 8); }
private void btnOk_Click(object sender, EventArgs e) { object acc = HelpForm.GetObjectFromString(typeof(decimal), txtAcconto.Text, "x.y"); citytax_account = CfgFn.GetNoNullDecimal(acc); object rc = HelpForm.GetObjectFromString(typeof(decimal), txtRedditoComplessivo.Text, "x.y"); annualincome = CfgFn.GetNoNullDecimal(rc); }
public void GeneralLeaveDateTextBox(object sender, System.EventArgs e) { TextBox T = (TextBox)sender; if (T.IsDisposed) { return; } if (!T.Enabled) { return; } if (T.ReadOnly) { return; } if (T.Text == "") { return; } string tag = "x.y.d"; string hhsep = CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator; string ppsep = CultureInfo.CurrentCulture.NumberFormat.NumberGroupSeparator; string S = T.Text; try { object O1 = HelpForm.GetObjectFromString(typeof(DateTime), S, tag); if ((O1 != null) && (O1 != DBNull.Value)) { T.Text = HelpForm.StringValue(O1, tag); return; } } catch { } S += hhsep + "0" + ppsep + "0"; int len = S.Length; object O = DBNull.Value; while (len > 0) { try { O = HelpForm.GetObjectFromString(typeof(DateTime), S, tag); if ((O != null) && (O != DBNull.Value)) { break; } } catch { } len = len - 1; S = S.Substring(0, len); } T.Text = HelpForm.StringValue(O, tag); return; }
private void generaRecordV(TextWriter tw, DataTable t, int numRecV) { decimal importoADebito = 0; decimal importoaCredito = 0; tw.Write("V"); string cf = getStringaDiLunghezzaN(txtCodiceFiscale.Text, 16);//Codice fiscale contribuente tw.Write(cf); tw.Write("1".PadLeft(8, '0').PadRight(8 + 3 + 25 + 20 + 16)); //Progressivo invio all'interno del flusso, non superiore a 999 tw.Write("D"); //TIPO MODELLO (modello Enti Pubblici v. 2016) tw.Write(" ".PadRight(3)); //Codice ufficio finanziario 3 caratteri tw.Write("0".PadRight(11, '0')); //Codice Atto, se presente deve essere formalmente corretto tw.Write(" ".PadRight(18)); //Identificativo operazione int max = t.Rows.Count < numRecV * 22 ? t.Rows.Count : numRecV * 22; for (int i = (numRecV - 1) * 22; i < max; i++) { DataRow r = t.Rows[i]; tw.Write(r["tiporiga"].ToString()); tw.Write(getStringaDiLunghezzaN(r["codicetributo"], 6)); //Codice tributo/ Causale tw.Write(getStringaDiLunghezzaN(r["codice"], 5)); //Significato dipendete da tipo riga tw.Write(getStringaDiLunghezzaN(r["estremi"], 17)); //vedere specifiche tw.Write(getStringaDiLunghezzaN(r["riferimentoA"], 6)); tw.Write(getStringaDiLunghezzaN(r["riferimentoB"], 6)); tw.Write(formattaImporto(r["importoadebito"]));//Importo a debito importoADebito += (decimal)r["importoadebito"]; tw.Write(formattaImporto(r["importoacredito"]));//Importo a credito importoaCredito += (decimal)r["importoacredito"]; } for (int i = max; i < numRecV * 22; i++) { tw.Write(' ');//tipo riga tw.Write("".PadRight(6)); tw.Write("".PadRight(5)); tw.Write("".PadRight(17)); tw.Write("".PadRight(6)); tw.Write("".PadRight(6)); tw.Write("0".PadRight(15, '0')); tw.Write("0".PadRight(15, '0')); } tw.Write(" ".PadRight(58)); tw.Write(formattaImporto(importoADebito).PadRight(15, '0')); //Importo a debito tw.Write(formattaImporto(importoaCredito).PadRight(15, '0')); //Importo a credito tw.Write("P"); //Segno saldo tw.Write(formattaImporto(importoADebito - importoaCredito).ToString().PadLeft(15, '0').PadRight(15 + 4)); //Saldo di Sezione tw.Write(formattaImporto(importoADebito - importoaCredito)); //Saldo finale modello F24 EP DateTime _DataDiVersamento = (DateTime)HelpForm.GetObjectFromString( typeof(DateTime), txtDataDiVersamento.Text, txtDataDiVersamento.Tag.ToString()); string dataDiVersamento = _DataDiVersamento.ToString("ddMMyyyy", cultureInfo); tw.Write(dataDiVersamento.PadRight(8 + 82));//Data di versamento tw.Write("A\r\n"); }
private void txtNewSconto_Leave(object sender, EventArgs e) { if (inChiusura) { return; } object sconto = HelpForm.GetObjectFromString(typeof(double), txtNewSconto.Text, "x.y.fixed.4..%.100"); txtNewSconto.Text = HelpForm.StringValue(sconto, "x.y.fixed.4..%.100"); }
private void btnSpesa_Click(object sender, EventArgs e) { string filter = ""; string filterreg = QHS.DoPar(QHS.AppOr(QHS.IsNull("idreg"), QHS.CmpEq("idreg", idpettycashreg))); int selectedfase = CfgFn.GetNoNullInt32(cmbFaseSpesa.SelectedValue); if (selectedfase > 0) { filter = QHS.AppAnd(filter, filterreg, QHS.CmpEq("nphase", selectedfase)); } else { filter = QHS.AppAnd(filter, QHS.AppAnd(filterreg, QHS.CmpNe("nphase", Conn.GetSys("maxexpensephase")), QHS.CmpGe("nphase", Conn.GetSys("expensefinphase")))); } int ymov = CfgFn.GetNoNullInt32(txtEserc.Text.Trim()); int nmov = CfgFn.GetNoNullInt32(txtNum.Text.Trim()); decimal importoForFilter = CfgFn.GetNoNullDecimal(HelpForm.GetObjectFromString(typeof(Decimal), txtImporto.Text, "x.y.c")); if (importoForFilter == 0) { importoForFilter = importoRimasto; } if (importoForFilter > 0) { filter = QHS.AppAnd(filter, QHS.CmpGe("available", importoForFilter)); } if (ymov != 0) { filter = QHS.AppAnd(filter, QHS.CmpEq("ymov", ymov)); } if ((ymov != 0) && (nmov != 0)) { filter = QHS.AppAnd(filter, QHS.CmpEq("nmov", nmov)); } MetaData E = Disp.Get("expense"); E.FilterLocked = true; E.DS = D.Clone(); DataRow Choosen = E.SelectOne("default", filter, "expense", null); if (Choosen == null) { return; } idexp = Choosen["idexp"]; txtEserc.Text = Choosen["ymov"].ToString(); txtNum.Text = Choosen["nmov"].ToString(); cmbFaseSpesa.SelectedValue = Choosen["nphase"]; }
bool LimiteImportoRaggiunto() { decimal rimasto = CfgFn.GetNoNullDecimal(HelpForm.GetObjectFromString(typeof(Decimal), txtRimasto.Text, "x.y.c")); if (rimasto == 0) { MessageBox.Show("Non è possibile aggiungere ulteriori dettagli. La somma dei dettagli inseriti è pari al Totale Fattura"); return(true); } return(false); }
private bool controllaData(TextBox txt) { try { DateTime TT = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txt.Text.ToString(), "x.y"); return(true); } catch { return(false); } }
private void txtNinv_Leave(object sender, EventArgs e) { if (txtNinv.Text.Trim() == "") { txtNinv.Text = ""; } if (txtNinv.Text.Trim() != "") { txtNinv.Text = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), txtNinv.Text, "x.y")).ToString(); } ScegliFattura(); }
private void btnOK_Click(object sender, System.EventArgs e) { if (!DatiValidi()) { return; } int esercizio = (int)HelpForm.GetObjectFromString(typeof(int), txtEsercizio.Text.ToString(), "x.y.year"); Conn.CallSP("entry_shrink", new object[] { esercizio }, false, 6000); MessageBox.Show("Operazione eseguita."); }
public bool DatiValidi() { try { DateTime TT = (DateTime)HelpForm.GetObjectFromString(typeof(DateTime), txtData.Text.ToString(), "x.y"); return(true); } catch { MessageBox.Show("E' necessario inserire una data valida"); txtData.Focus(); return(false); } }