Ejemplo n.º 1
0
        private DataGridViewModel <Dictionary <string, object> > GetDataList(RedEnvelopeGetRecordQuery query)
        {
            DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >();

            if (query != null)
            {
                PageModel <RedEnvelopeGetRecordInfo> redEnvelopeGetRecord = WeiXinRedEnvelopeProcessor.GetRedEnvelopeGetRecord(query);
                dataGridViewModel.rows  = new List <Dictionary <string, object> >();
                dataGridViewModel.total = redEnvelopeGetRecord.Total;
                foreach (RedEnvelopeGetRecordInfo model in redEnvelopeGetRecord.Models)
                {
                    Dictionary <string, object> dictionary = model.ToDictionary();
                    string text = "";
                    WeiXinRedEnvelopeInfo weiXinRedEnvelope = WeiXinRedEnvelopeProcessor.GetWeiXinRedEnvelope(model.RedEnvelopeId);
                    text = ((weiXinRedEnvelope == null) ? "未知" : weiXinRedEnvelope.Name);
                    dictionary.Add("RedEnvelopeName", text);
                    dataGridViewModel.rows.Add(dictionary);
                }
            }
            return(dataGridViewModel);
        }
Ejemplo n.º 2
0
 private void RedEnvelopeGetRecordBind(string sendCode)
 {
     this.rptRedEnvelopeGetRecord.DataSource = WeiXinRedEnvelopeProcessor.GetRedEnvelopeGetRecord(20, Guid.Parse(sendCode));
     this.rptRedEnvelopeGetRecord.DataBind();
 }