15,899,679 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11380736 (Top 12 by date)
Member 11380736
8-Sep-19 15:37pm
View
It works perfect when the generic Entity type is hardcoded like here "MediaPerformerJunctionDataModel". But I would like it to be dynamic <t> or <t1,t2>
modelBuilder.Entity<mediaperformerjunctiondatamodel>().HasKey(pk => new { pk.CompositeKeyA, pk.CompositeKeyB });
modelBuilder.Entity<mediaperformerjunctiondatamodel>().HasOne(a => a.DataModelRelationA).WithMany(a => a.NavigationCollection).OnDelete(DeleteBehavior.Cascade).HasForeignKey(m => m.CompositeKeyA);
modelBuilder.Entity<mediaperformerjunctiondatamodel>().HasOne(mp => mp.DataModelRelationB).WithMany(p => p.NavigationCollection).OnDelete(DeleteBehavior.Cascade).HasForeignKey(p => p.CompositeKeyB);
Member 11380736
26-Aug-19 8:50am
View
I need to use a custom list
Member 11380736
25-Dec-15 15:53pm
View
index[0],index[2],index[1],index[3] == next to each other.
index[0],index[2],index[1],index[4] == ' NOT'next to each other.
Member 11380736
17-Dec-15 16:23pm
View
The ArrayList is all numbers like "1111100000000", "0111110000000".
And I want them to look like this:
int[,] a = { { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 } };
The reason I want to convert them is that I don't know how to create multi-array if conditions with an ArrayList like:
if(a[i,j] >= b[i,j])
{
do something...
}
Member 11380736
25-Nov-15 11:40am
View
I have a function that returns the ranking of the hand. But it finds it inside the array I'm trying to create, by searching inside the array.
Do you have any idea how to loop through all possible full house combinations like As,Ad,Ac,Ks,Kc etc.
Member 11380736
28-Feb-15 6:57am
View
Is it the same syntax if it's not a windows app ?
Member 11380736
28-Feb-15 5:37am
View
your a genius!!!
Member 11380736
26-Feb-15 16:01pm
View
Controlling the calculator is only for testing. I want to learn how to use WinSpy++ to get button id and then press what ever button I want
Member 11380736
20-Jan-15 11:08am
View
I couldn't find any installer for Managed API 2.0.
The solution was to download Managed API 2.1. install it and add the reference.
Do you know if version 2.1 also is open source ?
Member 11380736
16-Jan-15 16:52pm
View
But my user info comes from this sql coding:
//Brugers emailid
command.CommandText = "SELECT emailid from bruger WHERE bruger = @bruger";
globalvariables.Con.Open();
command.ExecuteScalar();
user.Text = command.ExecuteScalar().ToString();
//Luk forbindelsen
globalvariables.Con.Close();
//This writes my account in my user textbox, but pressing send button gives the error.
user.Text = command.ExecuteScalar().ToString();
Member 11380736
16-Jan-15 16:40pm
View
My user is not called "user1" but Yes if I manually type in my user account it works.
The exchange server isn't mine so I havn't got that much info about it. Think it's a microsoft exchange 2003 server. It's my employers (public hospital).
Here is what happens when the send button is pressed:
private void button4_Click_1(object sender, EventArgs e)
{
try
{
SmtpMail oMail = new SmtpMail("TryIt");
SmtpClient oSmtp = new SmtpClient();
// Set sender email address, please change it to yours
oMail.From = from.Text;
// Set recipient email address, please change it to yours
oMail.To = to.Text;
// Set email subject
oMail.Subject = subject.Text;
// Set email body
oMail.TextBody = body.Text;
Attachment oAttachment = oMail.AddAttachment(vedhæft.Text);
// Your Exchange Server address
SmtpServer oServer = new SmtpServer(smtp.Text);
// Set Exchange Web Service EWS - Exchange 2007/2010/2013
oServer.Protocol = ServerProtocol.ExchangeEWS;
// User and password for Exchange authentication
oServer.User = user.Text;
oServer.Password = password.Text;
// By default, Exchange Web Service requires SSL connection
oServer.ConnectType = SmtpConnectType.ConnectSSLAuto;
oSmtp.SendMail(oServer, oMail);
//Opret forbindelse til sql serveren
globalvariables NewConnection = new globalvariables();
NewConnection.con();
//Opret en sql kommando
SqlCommand command = globalvariables.Con.CreateCommand();
command.CommandText = "UPDATE bestillinger SET bestilt= @bestilt, bestiltbruger = @bruger Where firma = @firma and bestilt is null and udlevering is not null and udlevering BETWEEN @fradato AND @tildato";
command.Parameters.AddWithValue("@firma", firma.Text);
command.Parameters.AddWithValue("@bestilt", DateTime.Now);
command.Parameters.AddWithValue("@bruger", globalvariables.user);
command.Parameters.AddWithValue("@fradato", fradato.Value.Date);
command.Parameters.AddWithValue("@tildato", tildato.Value.Date);
command.ExecuteScalar();
//Luk forbindelsen
globalvariables.Con.Close();
//Kør Form1 sqlcount variable
(System.Windows.Forms.Application.OpenForms["Form1"] as Form1).sqlcount(sender, e);
MessageBox.Show("HA er nu bestilt!", "Mail afsendt", MessageBoxButtons.OK);
//Slet habestilling.csv fil fra PC
if (File.Exists(@"habestilling.csv"))
{
File.Delete(@"habestilling.csv");
}
//Slet vedhæftet sti fra tekstboksen
vedhæft.Text = "";
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Member 11380736
16-Jan-15 16:11pm
View
1) smtpMail send to an EWS
2) It's in Windows Forms Application.
3) I get this error: The remote server returned an error: (401) Unauthorized.
Show More