This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Private Sub gridList_AfterCellUpdate(sender As Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles gridList.AfterCellUpdate | |
| Dim total = Enumerable.Range(1, 12). | |
| Sum(Function(i) e.Cell.Row.Cells(i).Value) | |
| Me.ds.Rows(e.Cell.Row.Index).SetCellValue(GridColumns.Total, total) | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dim band = Me.grdList.DisplayLayout.Bands(0) | |
| Dim setting As Infragistics.Win.UltraWinGrid.SummarySettings | |
| Dim startIndex = band.Columns(GridColumns.Gokei).Index | |
| Dim endIndex = band.Columns(GridColumns.Month10).Index | |
| For colIndex = startIndex To endIndex | |
| setting = band.Summaries.Add(Infragistics.Win.UltraWinGrid.SummaryType.Sum, band.Columns(colIndex)) | |
| setting.DisplayFormat = "{0:#,##0}" | |
| setting.Appearance.TextHAlign = Infragistics.Win.HAlign.Right | |
| Next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.Join(" ,", array) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ObservableCollection<Item> items = this.ListView.DataContext as ObservableCollection<Item>; | |
| selected.ToList().ForEach((s) => | |
| { | |
| Item item = items.Where((i) => i.Value == s.Value).SingleOrDefault(); | |
| if (item != null) | |
| { | |
| items.Remove(item); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string[][] array = new string[][] { new string[] { "a" }, new string[] { "b" }, new string[] { "c" } }; | |
| string[] select = array.Select(v => v[0]).ToArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Person | |
| /// </summary> | |
| private class Person | |
| { | |
| public int Id { get; set; } | |
| public string Name { get; set; } | |
| } | |
| /// <summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<int> intList = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8 }; | |
| List<int> resultList = new List<int>(); | |
| foreach (int i in intList) | |
| { | |
| if (i > 5) | |
| { | |
| break; | |
| } | |
| resultList.Add(i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resultList = intList.Where(i => i <= 5).ToList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 商品マスタ全件取得 | |
| List<MShohin> shohinList = mshohinDataAccess.SelectList(); | |
| foreach(MShohin s in shohinList) | |
| { | |
| // 何かしらの処理 | |
| var shohinCd = s.ShohinCd; | |
| var shohinName = s.ShohinName; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// delimiterで区切られた文字をパスカル形式にします | |
| /// </summary> | |
| /// <param name="value">value</param> | |
| /// <param name="delimiter">delimiter</param> | |
| /// <returns>Pascalizeed value</returns> | |
| public static string Pascalize(string value, string delimiter) | |
| { | |
| if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(delimiter)) | |
| { |
OlderNewer