예제 #1
0
        public UserListForm()
        {
            InitializeComponent();

            if (!System.IO.File.Exists("save.csv"))
            {
                return;
            }

            string[] linse = System.IO.File.ReadAllLines(
                "save.csv",
                Encoding.GetEncoding("shift_jis"));

            foreach (var line in linse)
            {
                string[]    row      = line.Split(',');
                UserInfoDTO userInfo = new UserInfoDTO(
                    row[0],
                    row[1],
                    row[2],
                    row[3],
                    row[4]);
                _dtos.Add(userInfo);
            }
            dgvUserDataGrid.DataSource = _dtos;

            dgvUserDataGrid.Columns[0].HeaderText = "ID";
            dgvUserDataGrid.Columns[1].HeaderText = "メール送信";
            dgvUserDataGrid.Columns[2].HeaderText = "メールアドレス";
            dgvUserDataGrid.Columns[3].HeaderText = "プラン";
            dgvUserDataGrid.Columns[4].HeaderText = "テキスト";
        }
예제 #2
0
        public UserListForm()
        {
            InitializeComponent();

            if (System.IO.File.Exists("save.csv"))
            {
                string[] lines =
                    System.IO.File.ReadAllLines(
                        "save.csv",
                        Encoding.GetEncoding("shift_jis"));

                foreach (string line in lines)
                {
                    string[]    row = line.Split(',');
                    UserInfoDTO dto = new UserInfoDTO(
                        row[0],
                        row[1],
                        row[2],
                        row[3],
                        row[4]);
                    _dtos.Add(dto);
                }

                UserDataGrid.DataSource = _dtos;

                UserDataGrid.Columns[0].HeaderText = "ID";
                UserDataGrid.Columns[1].HeaderText = "メール送信";
                UserDataGrid.Columns[2].HeaderText = "メールアドレス";
                UserDataGrid.Columns[3].HeaderText = "プラン";
                UserDataGrid.Columns[4].HeaderText = "有効/無効";
            }
        }