public static AmountAndPrice FromDBString(string val) { try { string[] a = val.Split(new char[] { '|' }); AmountAndPrice r = new AmountAndPrice(int.Parse(a[0]), decimal.Parse(a[1])); return(r); } catch { } return(null); }
private void ReadFromStream_V0(BinaryReader br) { this.Email = br.ReadString(); this.Title = br.ReadString(); this.DisplayLines = DisplayLines.ReadFromStream(br); this.RequestedType = (Data_AppUserFile.eUserStatus)br.ReadInt32(); this.Numbers = new AmountAndPrice(br); this.Messages = new AmountAndPrice(br); this.Month = new AmountAndPrice(br); this.Setup = new AmountAndPrice(br); }
private void InitWithDefaults() { this.Email = string.Empty; this.Title = string.Empty; this.DisplayLines = new string[0]; this.RequestedType = Data_AppUserFile.eUserStatus._end; this.Numbers = new AmountAndPrice(0, 0M); this.Messages = new AmountAndPrice(0, 0M); this.Month = new AmountAndPrice(0, 0M); this.Setup = new AmountAndPrice(0, 0M); this.FullPayment = new AmountAndPrice(0, 0M); }
public static Data_AppUserWallet Create( string Email, string Title, string[] DisplayLines, Data_AppUserFile.eUserStatus RequestedType, AmountAndPrice Numbers, AmountAndPrice Messages, AmountAndPrice Month, AmountAndPrice Setup, AmountAndPrice FullPayment) { return(new Data_AppUserWallet(Email, Title, DisplayLines, RequestedType, Numbers, Messages, Month, Setup, FullPayment)); }
public Data_AppUserWallet( Data_AppUserFile.eUserStatus RequestedType, AmountAndPrice Numbers, AmountAndPrice Messages, AmountAndPrice Month, AmountAndPrice Setup, AmountAndPrice FullPayment ) { InitWithDefaults(); this.RequestedType = RequestedType; this.Numbers = Numbers.Clone(); this.Messages = Messages.Clone(); this.Month = Month.Clone(); this.Setup = Setup.Clone(); this.FullPayment = FullPayment.Clone(); }
private Data_AppUserWallet( string Email, string Title, string[] DisplayLines, Data_AppUserFile.eUserStatus RequestedType, AmountAndPrice Numbers, AmountAndPrice Messages, AmountAndPrice Month, AmountAndPrice Setup, AmountAndPrice FullPayment) { InitWithDefaults(); this.Email = Email.Trim(); this.Title = Title; this.DisplayLines = DisplayLines.MyClone(); this.RequestedType = RequestedType; this.Numbers = Numbers.Clone(); this.Messages = Messages.Clone(); this.Month = Month.Clone(); this.Setup = Setup.Clone(); this.FullPayment = FullPayment.Clone(); }
public static string ToDBString(AmountAndPrice val) { return(string.Format("{0}|{1:0.00}", val.Amount, val.Price)); }
private void ReadFromStream_V1(BinaryReader br) { ReadFromStream_V0(br); this.FullPayment = new AmountAndPrice(br); }