コード例 #1
0
        public void Save(ApplicationForm form)
        {
            var table = GetTable();

            var entity = new FormEntity(form);
            TableOperation operation = TableOperation.InsertOrReplace(entity);
            table.Execute(operation);
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        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();
        }