Esempio n. 1
0
 public bool Deserialize(JSON_AwardParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.id       = json.id;
     this.iname    = json.iname;
     this.name     = json.name;
     this.expr     = json.expr;
     this.icon     = json.icon;
     this.bg       = json.bg;
     this.txt_img  = json.txt_img;
     this.start_at = DateTime.MinValue;
     if (!string.IsNullOrEmpty(json.start_at))
     {
         DateTime.TryParse(json.start_at, out this.start_at);
     }
     this.grade = json.grade;
     this.hash  = json.iname.GetHashCode();
     return(true);
 }
Esempio n. 2
0
 public void Deserialize(string language, JSON_AwardParam json)
 {
     this.Deserialize(json);
     this.localizeFields(language);
 }