예제 #1
0
파일: Conto.cs 프로젝트: Fred68/Consuntivo
		public Conto(int numero, string descrizione, string nota, AlertConto alert)
			{
			this.numero = numero;
			this.descrizione = descrizione;
			this.nota = nota;
			this.alert = alert;
			}
예제 #2
0
파일: Conto.cs 프로젝트: Fred68/Consuntivo
		public Conto()
			{
			numero = 0;
			descrizione = "-";
			nota = "";
			alert = AlertConto.Negativo;
			}
예제 #3
0
파일: Conto.cs 프로젝트: Fred68/Consuntivo
		public override bool FromString(string str)
			{
			bool ok = false;
			string[] cmp = str.ToString().Split(new char[] { Separatore.field });
			if (cmp.Length == CAMPI)
				{
				Conto tmp = new Conto();
				tmp.numero = Conto.String2IntOrZero(cmp[0]);
				tmp.descrizione = cmp[1];
				tmp.nota = cmp[2];


				foreach (AlertConto ta in Enum.GetValues(typeof(AlertConto)))
					{
					if (cmp[3] == ta.ToString())
						{
						tmp.alert = ta;
						ok = true;
						break;
						}
					
					}

				if (ok)
					{
					this.numero = tmp.numero;
					this.descrizione = tmp.descrizione;
					this.nota = tmp.nota;
					this.alert = tmp.alert;
					}
				}
			return ok;
			}