コード例 #1
0
        public override void DisplayRecord()
        {
            grdPostCodes.Rows.Clear();
            GridViewRowInfo row = null;

            using (TaxiDataContext db = new TaxiDataContext())
            {
                var list = db.stp_GetLocalizationDetails().Where(c => c.DetailId != null).ToList();
                foreach (var item in list)
                {
                    row = grdPostCodes.Rows.AddNew();
                    row.Cells[COLS.Id].Value       = item.MasterId;
                    row.Cells[COLS.MasterId].Value = item.DetailId;
                    row.Cells[COLS.PostCode].Value = item.PostCode;
                }
            }

            grdPostCodes.CurrentRow = null;
        }