15,907,497 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 aciobanita (Top 22 by date)
aciobanita
16-Jul-11 10:24am
View
I do like that:
<pre>for (int i = 0; i < Table.Rows.Count; i++)
{
if (String.IsNullOrWhiteSpace(Table.Rows[i]["DeletedId"].ToString()))
{
bool validare;
validare = false;
dataProduseContract.Rows.Add(validare,Table.Rows[i]["Name"].ToString(), Table.Rows[i]["Quantity"].ToString() + " " + Table.Rows[i]["QuantityUnit"].ToString(), Table.Rows[i]["Payment"].ToString(), Table.Rows[i]["Description"].ToString());
}
else
{
bool validarescos;
validarescos = true;
dataProduseContract.Rows.Add(validarescos, Table.Rows[i]["Name"].ToString(), Table.Rows[i]["Quantity"].ToString() + " " + Table.Rows[i]["QuantityUnit"].ToString(), Table.Rows[i]["Payment"].ToString(), Table.Rows[i]["Description"].ToString());
}
}</pre>
but i can't check or uncheck.
aciobanita
18-Jun-11 10:32am
View
I create a class
<pre>class ClientActiv
{
public static string NumeClient;
public static string ClientID;
}</pre>
On my form2, on accept button
<pre>System.Data.DataTable Table = new System.Data.DataTable();
Program.Connection.CommandText = "select * from DateClientiAmanet where ClientId=" + ClientID.Text;
Program.Connection.FillDataTable(Table, true);
ClientActiv.ClientID = Table.Rows[0][0].ToString();
Program.Connection.ExecuteNonQuery();
this.Close();</pre>
The problem is:
i can update the label on my usercontrol.
how i do?
aciobanita
30-Mar-11 0:15am
View
i observed, i need to inserd the new data,and then get the id.
aciobanita
30-Mar-11 0:03am
View
Ok,i use @@IDENTITY, but, i press the "Ad NEW", the nextIDString is "1", i save the data i database, and if i press AGAIN the "Ad New" - "nextIDString = the next value". After i close the application it's start over.
aciobanita
29-Mar-11 23:26pm
View
I try touse @@SCOPE_IDENTITY but in database access not work.
aciobanita
28-Mar-11 20:47pm
View
for the moment i'm using access, but i whant a statement to work for MySql, Access and micosoft sql.
is that posibl?
aciobanita
28-Mar-11 10:56am
View
I know that, i'm new in C#, i search on the internet the difference between parameterized query and store procedure. I make a small program don't need to use stored procedure, i will not have a big database and for the moment don't need the selection to be very fast.
thanks.
aciobanita
28-Mar-11 10:43am
View
If you whant to help fine, in not...,
thanks.
aciobanita
28-Mar-11 10:19am
View
im use procedure, NO?
Program.Connection.AddParameter("@ClientID", cboNumeClient.SelectedValue.ToString());
aciobanita
28-Mar-11 10:16am
View
No "ContractActive" is INT in the database.
aciobanita
27-Mar-11 14:05pm
View
if i remouve the DATEDIFF (day, Contracts.StartDate, Contracts.EndDate) AS ShippingDays, no error
aciobanita
27-Mar-11 13:52pm
View
i try this
Program.Connection.CommandText = "select Contracts.ContractId, Contracts.StartDate, Contracts.EndDate, Contracts.Procent, sum(ContractItems.Payment) AS Total_Platit, DATEDIFF (day, Contracts.StartDate, Contracts.EndDate) AS ShippingDays from Contracts INNER JOIN ContractItems ON Contracts.ContractId = ContractItems.ContractId WHERE ClientID=@ClientID "
+ "GROUP BY Contracts.ContractId, Contracts.StartDate, Contracts.EndDate, Contracts.Procent ORDER BY Contracts.StartDate";
error: No value given for one or more required parameters.
aciobanita
27-Mar-11 10:04am
View
As you see i use Convert.ToInt32(), because i set the column in the datagridview to a coustem format: 0,00 RON, is ok, or is another way to do?
aciobanita
27-Mar-11 10:00am
View
I use:
dataContracteClienti.Rows.Clear();
Program.Connection.CommandText = "select Contracts.ContractId, Contracts.StartDate, Contracts.EndDate, sum(ContractItems.Payment) AS Total_Platit from Contracts INNER JOIN ContractItems ON Contracts.ContractId = ContractItems.ContractId WHERE ClientID=@ClientID "
+ "GROUP BY Contracts.ContractId, Contracts.StartDate, Contracts.EndDate ORDER BY Contracts.StartDate";
Program.Connection.AddParameter("@ClientID", cboNumeClient.SelectedValue.ToString());
DataTable Table = new DataTable();
Program.Connection.FillDataTable(Table, true);
Table.Columns.Add(new DataColumn("ExtendedPrice", typeof(Decimal), "Total_Platit * 1.2"));
foreach (DataRow Row in Table.Rows)
{
dataContracteClienti.Rows.Add(Row["ContractId"].ToString(), Convert.ToDateTime(Row["StartDate"].ToString()), Convert.ToDateTime(Row["EndDate"].ToString()), Convert.ToInt32(Row["Total_Platit"].ToString()), Row["ExtendedPrice"].ToString());
}
look's ok
aciobanita
13-Mar-11 12:44pm
View
Is sims that a eror apeer at line 999 in FereastraPrincipala.Designer.cs
this.Controls.Add(this.informatiiContracte1);
aciobanita
13-Mar-11 12:10pm
View
I have to declare an instance for my UserContro in the main form?
aciobanita
13-Mar-11 12:09pm
View
If i remouve the InformatiiDespreClient(); from
private void InformatiiContracte_Load(object sender, EventArgs e)
{
txtNumeClient.Focus();
InformatiiDespreClient();
}
the errors errors disappear
aciobanita
13-Mar-11 12:07pm
View
ies the conections is in a separate file. The program run, but i whant to remove the error?
aciobanita
13-Mar-11 11:21am
View
Im new in c#,
aciobanita
13-Mar-11 11:20am
View
And when i drag the UserControl to the form
a nother error
The variable 'informatiiContracte1' is either undeclared or was never assigned. E:\AddressBook AMANET\TRIAL MAKER\Source\TabStripApp\FereastraPrincipala.Designer.cs
at line:
this.Controls.Add(this.informatiiContracte1);
aciobanita
13-Mar-11 11:17am
View
at FereastraPrincipala.Contracte.InformatiiContracte.InformatiiDespreClient() in E:\AddressBook AMANET\TRIAL MAKER\Source\TabStripApp\Contracte\InformatiiContracte.cs:line 36
at FereastraPrincipala.Contracte.InformatiiContracte..ctor() in E:\AddressBook AMANET\TRIAL MAKER\Source\TabStripApp\Contracte\InformatiiContracte.cs:line 21
aciobanita
11-Mar-11 16:48pm
View
I wrote Convert.ToInt32("0") because evry time i insert a row in data base is ecrypted, was at first time Converter.Encrypt("0"), but i repleced all with convert.toint and never modifi the INT.
Show More