Exemple #1
0
 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);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 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));
 }
Exemple #5
0
 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();
 }
Exemple #6
0
 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();
 }
Exemple #7
0
 public static string ToDBString(AmountAndPrice val)
 {
     return(string.Format("{0}|{1:0.00}", val.Amount, val.Price));
 }
Exemple #8
0
 private void ReadFromStream_V1(BinaryReader br)
 {
     ReadFromStream_V0(br);
     this.FullPayment = new AmountAndPrice(br);
 }