15,905,563 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 ahmad zrein (Top 31 by date)
ahmad zrein
4-Aug-15 13:03pm
View
no additional process just fire the crystal report, for the view it show all items on invoice but the total is incorrect
ahmad zrein
18-Aug-14 11:39am
View
thanks
ahmad zrein
17-Aug-14 19:31pm
View
I try it but no success for what I want, I thought some one have the site
ahmad zrein
16-Aug-14 1:58am
View
it is ok thanks it works fine
ahmad zrein
16-Aug-14 1:51am
View
the problem when I run it it shows only month button, this due I think mistake in add controls
thanks
ahmad zrein
24-Jul-13 1:23am
View
check the connecting string, change it to the new deployed database server
ahmad zrein
1-Jun-13 14:21pm
View
My Question is i have stock item table {item no, item name } and purchase child table include { item no}, i want to have datagridview have item no from purchase child and when select item it show the item name directly. have a relation between parent and child.
i used this code but i am not convinced ;
private string selectQueryStringPurChild = "SELECT dbo.acc_PurChild.iRecnoPur, dbo.acc_PurChild.iPurchaseID, dbo.acc_PurChild.iStockID, " +
"dbo.acc_Stkitem.cFullname, dbo.acc_PurChild.nQty, dbo.acc_PurChild.nDisc, dbo.acc_PurChild.nCost, " +
"dbo.acc_PurChild.nTotal, dbo.acc_PurChild.nVat, dbo.acc_PurChild.nLine " +
"FROM dbo.acc_PurChild INNER JOIN " +
"dbo.acc_Stkitem ON dbo.acc_PurChild.iStockID = dbo.acc_Stkitem.iStockID";
private void dgvacc_PurChild_CellLeave(object sender, DataGridViewCellEventArgs e)
{
int ncolumn = dgvacc_PurChild.CurrentCell.ColumnIndex;
switch (ncolumn)
{
case 1:
GetStockItemFullName();
break;
}
}
private void GetStockItemFullName()
{
dgvacc_PurChild.CurrentRow.Cells[2].Value = "2222";
}
ahmad zrein
15-Dec-12 1:05am
View
please clarify your question
ahmad zrein
6-Dec-12 11:46am
View
what type of work needed please add me to skype ahmad.hikmat.zrein
ahmad zrein
6-Dec-12 9:00am
View
maskedTextBox1.Text = convert.todatetime(DateTime.Now.ToString());
ahmad zrein
6-Dec-12 8:58am
View
the prolem is in left join
try to use where only
or inner join
ahmad zrein
4-Dec-12 16:09pm
View
So check the select statement, check if data is duplicate
please show the select statement
ahmad zrein
6-Nov-12 19:01pm
View
i do not think you an filter on crystal report directly, you can work on the sql stataement then refresh.
in the form you can select, then in the same form you have crystal report layout, any changes witll refresh.
hopy undestand your question
ahmad zrein
6-Nov-12 18:50pm
View
as i understand the question , why you do not use substr
ahmad zrein
6-Nov-12 18:49pm
View
i use nchar (10) in sql data base design
n is unicode, read about it
ahmad zrein
6-Nov-12 18:38pm
View
pdf is just a print function, if you use print rdlc or crystal or direct print it display it in pdf.
ahmad zrein
31-Oct-12 12:52pm
View
question is not clear, use help and look for update()
ahmad zrein
31-Oct-12 9:38am
View
the query defined do not work.
1. when we use sum or mathematical variable ist sould be done alone, because we must use group by.
SELECT sum(EL) as el, sum(CL) as cl, sum(ML) as ml FROM attendance group by date or id ....
2. What i mean divide the work into two part
part 1 do the sum query
part 2 do subtraction 15, 1, 14 ...
as you want
hope this what i understood
ahmad zrein
28-Oct-12 21:26pm
View
I am using stored procedure, do this help
ahmad zrein
13-Aug-12 15:29pm
View
private void BindDataGridView()
{
try
{
dataset.Locale = System.Globalization.CultureInfo.InvariantCulture;
sqldaParent = new SqlDataAdapter(selectQueryStringAcc_TransParent, clsConnectionAcc.con);
SqlCommandBuilder sqlcbParent = new SqlCommandBuilder(sqldaParent);
sqldaParent.Fill(dataset, "acc_TransParent");
sqldaChild = new SqlDataAdapter(selectQueryStringAcc_TransChild, clsConnectionAcc.con);
sqldaChild.Fill(dataset, "acc_TransChild");
// Establish a relationship between the two tables.
DataRelation relation = new DataRelation("TransParentChild",
dataset.Tables["acc_TransParent"].Columns["iLedgerID"],
dataset.Tables["acc_TransChild"].Columns["iLedgerID"]);
dataset.Relations.Add(relation);
bsParent.DataSource = dataset;
bsParent.DataMember = "acc_TransParent";
bsChild.DataSource = bsParent;
bsChild.DataMember = "TransParentChild";
}
catch (SqlException)
{
MessageBox.Show("Connection is not established");
}
}
i want to update the master detail dataset
ahmad zrein
13-Aug-12 12:05pm
View
i tried most commands update datset it does not work. i am using foreach datarow in dgv_ and send data to sql database , but i do not know is the row is to use update or insert command. or some thing i do not know, i need to read more.
ahmad zrein
25-Nov-11 12:50pm
View
Deleted
this mu web.config
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<customerrors mode="Off">
<httphandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false">
<compilation debug="true" targetframework="4.0">
<assemblies>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
<buildproviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<system.webserver>
<modules runallmanagedmodulesforallrequests="true">
<validation validateintegratedmodeconfiguration="false">
<handlers>
<add name="ReportViewerWebControlHandler" precondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
ahmad zrein
20-Nov-11 6:19am
View
this what i need, because i can define arabic unicode
can i have example
thanks again
ahmad zrein
19-Nov-11 21:59pm
View
yes it is nvarchar
ahmad zrein
19-Nov-11 21:57pm
View
i mean when open the database from sql design and enter arabic character it takes. while entering data from the program it give ???
ahmad zrein
19-Nov-11 12:51pm
View
yes when insert data directly into the sql database it take arabic correctly. but when i use insert ... Values in c# it save ????
thanks in advance
ahmad zrein
14-Nov-11 1:54am
View
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Branch : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String queryStringBranch = "SELECT * FROM Branch";
DataSet dsBranch = GetData(queryStringBranch);
if (dsBranch.Tables.Count > 0)
{
DetailsViewBranch.DataSource = dsBranch;
DetailsViewBranch.DataBind();
}
else
{
//Message.Text = "Unable to connect to the database.";
}
}
#region
DataSet GetData(String queryString)
{
// Retrieve the connection string stored in the Web.config file.
String connectionString = "Data Source=nancyintdatabase.db.8547965.hostedresource.com; Initial Catalog=nancyintdatabase; User ID=nancyintdatabase; Password=NANint001;";
DataSet ds = new DataSet();
try
{
// Connect to the database and run the query.
SqlConnection connection = new SqlConnection(connectionString);
SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection);
// Fill the DataSet.
adapter.Fill(ds);
}
catch
{
// The connection failed. Display an error message.
//Message.Text = "Unable to connect to the database.";
}
return ds;
}
#endregion
#region
protected void NextButton_Click(object sender, EventArgs e)
{
Response.Redirect(Request.RawUrl);
}
protected void PreviousButton_Click(object sender, EventArgs e)
{
}
protected void CustomerDetailView_DataBound(object sender, EventArgs e)
{
// Get the pager row.
DetailsViewRow pagerRow = DetailsViewBranch.BottomPagerRow;
// Get the Label controls that display the current page information
// from the pager row.
Label pageNum = (Label)pagerRow.Cells[0].FindControl("PageNumberLabel");
Label totalNum = (Label)pagerRow.Cells[0].FindControl("TotalPagesLabel");
if ((pageNum != null) && (totalNum != null))
{
// Update the Label controls with the current page values.
int page = DetailsViewBranch.DataItemIndex + 1;
int count = DetailsViewBranch.DataItemCount;
pageNum.Text = page.ToString();
totalNum.Text = count.ToString();
}
}
protected void DetailsViewBranch_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
{
}
#endregion
}
ahmad zrein
14-Nov-11 1:30am
View
i add as told but give error asp:scriptmanager
it seems something is missing
<form id="formTransfer" runat="server">
<asp:scriptmanager id="ScriptManager1" runat="server" enablepagemethods="true" xmlns:asp="#unknown" />
ahmad zrein
4-Nov-11 14:30pm
View
thanks i solve it it is my mistake the code are correct and work fine
sorry for interuption
thanks
ahmad zrein
4-Nov-11 7:18am
View
protected void ButtonLogOn_Click(object sender, EventArgs e)
{
string lcuser, lcpassword;
string gcuser, gcpassword, gcbranch, gcaddress;
lpass = false;
lcuser = this.txtUserName.Value;
lcpassword = this.txtPassword.Value;
SqlConnection con = new SqlConnection("Data source = UIS-PC\\SQLEXPRESS; Initial Catalog=Database1; integrated security = SSPI;");
SqlCommand selectid = new SqlCommand("SELECT cuser, cpassword, cbranch, caddress FROM branch", con);
con.Open();
SqlDataReader BranchReader = selectid.ExecuteReader();
for (int i = 0; i < BranchReader.FieldCount; i++)
{
BranchReader.Read();
gcuser = BranchReader.GetValue(0).ToString();
gcpassword = BranchReader.GetValue(1).ToString();
gcbranch = BranchReader.GetValue(2).ToString();
gcaddress = BranchReader.GetValue(3).ToString();
string message = gcuser + gcpassword + gcbranch + gcaddress;
string caption = "Where am i";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;
result = MessageBox.Show(message, caption, buttons);
//if (gcuser.Trim() == lcuser.Trim() )
//& lcpassword.Trim() == gcpassword.Trim())
// {
lpass = true;
//MyVariables.Varaibles.gcbranch = gcbranch;
//MyVariables.Varaibles.gcaddress = gcaddress;
//string message = gcuser + gcpassword + gcbranch + gcaddress;
//string caption = "Where am i";
//MessageBoxButtons buttons = MessageBoxButtons.YesNo;
//DialogResult result;
// Displays the MessageBox.
//result = MessageBox.Show(message, caption, buttons);
//Response.Redirect("default.aspx");
// }
BranchReader.NextResult();
}
BranchReader.Close();
con.Close();
this the whole code
it display only getvalue(0) and getvalue(1)correct but getvalue(2) and getvalue (3) is empty although there is data in the table for all fields,
i insert them by hand
thanks for the help
ahmad zrein
3-Nov-11 23:59pm
View
I tried i before it give the same result null
Show More