public void Save(ApplicationForm form) { var table = GetTable(); var entity = new FormEntity(form); TableOperation operation = TableOperation.InsertOrReplace(entity); table.Execute(operation); }
public ExcelViewModel(FormEntity entity) { Gender = entity.Gender; Email = entity.Email; Phone = entity.Phone; QQ = entity.QQ; Weibo = entity.Weibo; Description = entity.Description; Name = entity.RowKey; Class = int.Parse(entity.PartitionKey) % 100; Grade = int.Parse(entity.PartitionKey) / 100; Groups = string.Join(",", (from g in GroupXmlStore.GetAll() where (g.Value & entity.Groups) != 0 select g.Name).ToArray()); }
public ApplicationFormViewModel(FormEntity entity) { Gender = entity.Gender; Email = entity.Email; Phone = entity.Phone; QQ = entity.QQ; Weibo = entity.Weibo; Description = entity.Description; Timestamp = entity.Timestamp.DateTime; Name = entity.RowKey; Class = int.Parse(entity.PartitionKey) % 100; Grade = int.Parse(entity.PartitionKey) / 100; Groups = (from g in GroupXmlStore.GetAll() where (g.Value & entity.Groups) != 0 select g.Name).ToArray(); }