Click here to Skip to main content
15,174,758 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard Deeming13-Sep-19 8:21
mveRichard Deeming13-Sep-19 8:21 
AnswerRe: i want to erase two datatables with a single button please help Pin
Richard Deeming10-Sep-19 2:33
mveRichard Deeming10-Sep-19 2:33 
QuestionHow to perform non-case search in DataGridViewComboBoxColumn Pin
mo14923-Sep-19 9:09
Membermo14923-Sep-19 9:09 
SuggestionRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
CHill604-Sep-19 0:38
mveCHill604-Sep-19 0:38 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
mo14924-Sep-19 5:58
Membermo14924-Sep-19 5:58 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
CHill605-Sep-19 1:02
mveCHill605-Sep-19 1:02 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
mo14925-Sep-19 6:42
Membermo14925-Sep-19 6:42 
QuestionLinq, GroupBy, Select, First() or Last() Pin
jkirkerx28-Aug-19 13:38
professionaljkirkerx28-Aug-19 13:38 
So I have a Linq statement, that groups product sales by SKU over a period of about 3 years.
The products go up in price from inflation, so I grab the last price sold for.
But sometimes they will give a product away for free after a sales is made for say $1.00

Last Month - $12.00
This month - Free or $0
I'm trying to figure out how to group the items that have a price above 0
Dim gCustomerItemsAll As List(Of MarginItemCustomerProfit) = sTpAll.Where(Function(w) w.FCustomerNo.Equals(cI.FCustomerNumber)).OrderBy(Function(ob) ob.FItemNo).GroupBy(Function(item) item.FItemNo).Select(Function(cl) New MarginItemCustomerProfit() With {
   .FCustomerNumber = cl.First().FCustomerNo,
   .FItemNumber = cl.First().FItemNo,
   .FShipQty = cl.Sum(Function(qty) qty.FShipQty),
   .FCost = cl.Last().FCost,
   .FPrice = cl.Last().FPrice,
   .FAmount = cl.Sum(Function(amount) amount.FAmount)
}).ToList()
I tried this
.Last(Function(price) price > 0)
but it failed
If it ain't broke don't fix it
Discover my world at jkirkerx.com

AnswerRe: Linq, GroupBy, Select, First() or Last() Pin
Maciej Los28-Aug-19 22:24
mveMaciej Los28-Aug-19 22:24 
GeneralRe: Linq, GroupBy, Select, First() or Last() Pin
jkirkerx29-Aug-19 7:59
professionaljkirkerx29-Aug-19 7:59 
AnswerRe: Linq, GroupBy, Select, First() or Last() Pin
Richard Deeming29-Aug-19 8:14
mveRichard Deeming29-Aug-19 8:14 
GeneralRe: Linq, GroupBy, Select, First() or Last() Pin
jkirkerx29-Aug-19 9:32
professionaljkirkerx29-Aug-19 9:32 
QuestionTrying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Augusto10026-Aug-19 7:51
MemberAugusto10026-Aug-19 7:51 
AnswerRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
ZurdoDev26-Aug-19 8:38
professionalZurdoDev26-Aug-19 8:38 
AnswerRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Richard Deeming27-Aug-19 3:55
mveRichard Deeming27-Aug-19 3:55 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Augusto10027-Aug-19 6:36
MemberAugusto10027-Aug-19 6:36 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Richard Deeming27-Aug-19 6:40
mveRichard Deeming27-Aug-19 6:40 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Augusto10027-Aug-19 7:23
MemberAugusto10027-Aug-19 7:23 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Richard Deeming27-Aug-19 7:30
mveRichard Deeming27-Aug-19 7:30 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Augusto10027-Aug-19 7:36
MemberAugusto10027-Aug-19 7:36 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Richard Deeming27-Aug-19 8:07
mveRichard Deeming27-Aug-19 8:07 
GeneralRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Mycroft Holmes27-Aug-19 16:14
professionalMycroft Holmes27-Aug-19 16:14 
QuestionCount the number of database hit were made Pin
desanti24-Aug-19 13:37
Memberdesanti24-Aug-19 13:37 
AnswerRe: Count the number of database hit were made Pin
Gerry Schmitz25-Aug-19 3:30
mveGerry Schmitz25-Aug-19 3:30 
GeneralRe: Count the number of database hit were made Pin
desanti25-Aug-19 4:49
Memberdesanti25-Aug-19 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.