15,890,438 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 Sandip Paul 491984 (Top 49 by date)
Sandip Paul 491984
28-Feb-17 6:56am
View
as i mentioned i want to show list where all items need to show that are passed from previous activity
Sandip Paul 491984
27-Feb-17 8:35am
View
this is my adapter
Sandip Paul 491984
27-Feb-17 8:35am
View
public class ItemLazyAdapter extends BaseAdapter {
private Activity activity;
private ArrayList<HashMap<String, String>> data;
private static LayoutInflater inflater = null;
private int count = 0;
private HashMap<String, String> itemlist = new HashMap<String, String>();
// public ImageLoader imageLoader;
public ItemLazyAdapter(Activity a, ArrayList<HashMap<String, String>> d) {
activity = a;
data = d;
inflater = (LayoutInflater) activity
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
notifyDataSetChanged();
// imageLoader = new ImageLoader(activity.getApplicationContext());
}
public int getCount() {
return data.size();
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView,
final ViewGroup parent) {
final ViewHolder holder;
View vi = convertView;
if (convertView == null) {
holder = new ViewHolder();
vi = inflater.inflate(R.layout.productlist_row, null, false);
holder.titem = (TextView) vi.findViewById(R.id.item);
holder.tdet = (TextView) vi.findViewById(R.id.det);
holder.tprice = (TextView) vi.findViewById(R.id.price);
holder.tpid = (TextView) vi.findViewById(R.id.pid);
holder.ithumb_image = (ImageView) vi.findViewById(R.id.list_image);
holder.tCount = (TextView) vi.findViewById(R.id.txtcount);
holder.ibuttonInc = (ImageView) vi.findViewById(R.id.btplus);
holder.ibuttonDec = (ImageView) vi.findViewById(R.id.btminus);
vi.setTag(holder);
} else {
holder = (ViewHolder) vi.getTag();
}
// image
itemlist = data.get(position);
// Setting all values in listview
holder.titem.setText(itemlist.get(ViewItem.KEY_PNAME));
holder.tdet.setText(itemlist.get(ViewItem.KEY_DET));
holder.tprice.setText(itemlist.get(ViewItem.KEY_PRICE));
holder.tpid.setText(itemlist.get(ViewItem.KEY_PCODE));
// String url = song.get(ViewStores.KEY_THUMB_URL);
holder.ibuttonInc.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
count = Integer.parseInt(holder.tCount.getText().toString());
count++;
holder.tCount.setText(String.valueOf(count));
}
});
holder.ibuttonDec.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
count = Integer.parseInt(holder.tCount.getText().toString());
if (count > 0) {
count--;
}
holder.tCount.setText(String.valueOf(count));
}
});
return vi;
}
private class ViewHolder {
public TextView titem, tdet, tprice, tpid, tCount;
public ImageView ithumb_image, ibuttonInc, ibuttonDec;
}
}
Sandip Paul 491984
18-Mar-15 4:08am
View
The user may not open any browser.When admin send any message from a website then client must be notified.
For that a small window application will be installed in client machine which can revive message and show alert on the screen.
Can you tell which mechanism is best to use in this scenario.
I have seen SignalR is used for both way communication but here in case server uses web application and client uses desktop or winform application.
Sandip Paul 491984
18-Mar-15 3:39am
View
There will a small application will running in background which can communicate with server and when server send any message then that exe file show a popup on the desktop.
Sandip Paul 491984
28-Jan-15 3:07am
View
i am new to android .i just want to send all the sqlite data to ms sql server by onclick listner of a button.'" + + "' are used to pass the parameters.can you tell me how to implement this?
Sandip Paul 491984
25-Jan-15 7:15am
View
Actually the above android code woked for php so i just change the url to .asmx web service.i am new to android my aim is sync data from sqlite to remote ms sql server by using .asmx web service.
This is my web service
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Runtime.Serialization.Json;
using System.Web.Script.Services;
using System.Web.Script.Serialization;
using System.ComponentModel;
[WebService(Namespace = "http://surveyservices.sanraysinfotech.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
//[ScriptService]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class Service : System.Web.Services.WebService
{
List<wilaya> Wilayalist = new List<wilaya>();
List<moughata> Moughataalist = new List<moughata>();
List<commune> Communelist = new List<commune>();
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public String GetWilaya()
{
string conStr = WebConfigurationManager.ConnectionStrings["SQLDbConnection"].ConnectionString;
DataTable dt = new DataTable();
SqlDataReader dr = null;
using (SqlConnection conn = new SqlConnection(conStr))
{
string sql = string.Format(@"Select * from [WilayaMast]");
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
dr = cmd.ExecuteReader();
dt.Load(dr);
conn.Close();
cmd = null;
}
int countRow = dt.Rows.Count;
foreach (DataRow drEmp in dt.Rows)
{
Wilaya objwilaya = new Wilaya();
objwilaya.WCode = Convert.ToInt32(drEmp["Wcode"].ToString());
objwilaya.WName = drEmp["WName"].ToString();
objwilaya.WID = drEmp["WID"].ToString();
Wilayalist.Add(objwilaya);
}
return new JavaScriptSerializer().Serialize(Wilayalist);
}
}
[Serializable]
public class Wilaya
{
public int WCode { get; set; }
public string WName { get; set; }
public string WID { get; set; }
}
and the ouput is
<string>[{"WCode":0,"WName":"Select","WID":"0"},{"WCode":1,"WName":"El Hodh Ech Charghi","WID":"1"},{"WCode":2,"WName":"El Hodh El Gharbi","WID":"2"},{"WCode":3,"WName":"Assaba","WID":"3"},{"WCode":4,"WName":"Gorgol","WID":"4"},{"WCode":5,"WName":"Brakna ","WID":"5"},{"WCode":6,"WName":"Trarza","WID":"6"},{"WCode":7,"WName":"Adrar","WID":"7"},{"WCode":8,"WName":"Dakhlet Nouadhibou","WID":"8"},{"WCode":9,"WName":"Tiris Zemmour","WID":"11"},{"WCode":10,"WName":"Inchiri","WID":"12"},{"WCode":11,"WName":"Tagant","WID":"9"},{"WCode":12,"WName":"Guidimagha","WID":"10"},{"WCode":13,"WName":"Nouakchott","WID":"13"}]
please help me to sort out my prob
Sandip Paul 491984
25-Jan-15 7:10am
View
Deleted
actually this code worked for some php so i just convert the link to .asmx.I am new to android.My aim is to store data from ms sql server to sqlite and vice versa by using web service.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Runtime.Serialization.Json;
using System.Web.Script.Services;
using System.Web.Script.Serialization;
using System.ComponentModel;
[WebService(Namespace = "http://surveyservices.sanraysinfotech.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
//[ScriptService]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class Service : System.Web.Services.WebService
{
List<wilaya> Wilayalist = new List<wilaya>();
List<moughata> Moughataalist = new List<moughata>();
List<commune> Communelist = new List<commune>();
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public String GetWilaya()
{
string conStr = WebConfigurationManager.ConnectionStrings["SQLDbConnection"].ConnectionString;
DataTable dt = new DataTable();
SqlDataReader dr = null;
using (SqlConnection conn = new SqlConnection(conStr))
{
string sql = string.Format(@"Select * from [WilayaMast]");
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
dr = cmd.ExecuteReader();
dt.Load(dr);
conn.Close();
cmd = null;
}
int countRow = dt.Rows.Count;
foreach (DataRow drEmp in dt.Rows)
{
Wilaya objwilaya = new Wilaya();
objwilaya.WCode = Convert.ToInt32(drEmp["Wcode"].ToString());
objwilaya.WName = drEmp["WName"].ToString();
objwilaya.WID = drEmp["WID"].ToString();
Wilayalist.Add(objwilaya);
}
return new JavaScriptSerializer().Serialize(Wilayalist);
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public String GetCommune()
{
// getting connection string
string conStr = WebConfigurationManager.ConnectionStrings["SQLDbConnection"].ConnectionString;
DataTable dt = new DataTable();
SqlDataReader dr = null;
// Creating Sql Connection
using (SqlConnection conn = new SqlConnection(conStr))
{
// Creating insert statement
string sql = string.Format(@"Select * from [CommuneMast]");
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
dr = cmd.ExecuteReader();
dt.Load(dr);
conn.Close();
cmd = null;
}
int countRow = dt.Rows.Count;
foreach (DataRow drcommune in dt.Rows)
{
Commune objcommune = new Commune();
objcommune.CCode = Convert.ToInt32(drcommune["CCode"].ToString());
objcommune.CName = drcommune["CName"].ToString();
objcommune.CID = drcommune["CID"].ToString();
objcommune.MCode = Convert.ToInt32(drcommune["MCode"]);
Communelist.Add(objcommune);
}
return new JavaScriptSerializer().Serialize(Communelist);
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
//public List<moughata> GetMoughata()
public String GetMoughata()
{
// getting connection string
string conStr = WebConfigurationManager.ConnectionStrings["
Sandip Paul 491984
25-Jan-15 5:19am
View
can you tell me how to resolve this?
Sandip Paul 491984
24-Jan-15 15:32pm
View
my offline data will be stored on sqlite and when user sync by pressing a button then all sqlite data will b transfer to mssql and vice versa.
Sandip Paul 491984
24-Jan-15 15:31pm
View
can i use web services to do that.if yes can u help me the steps
Sandip Paul 491984
8-May-14 3:47am
View
i tried this it gives me a error Error
'System.Web.UI.UpdatePanel' does not have a public property named 'LinkButton'.
Sandip Paul 491984
8-May-14 3:16am
View
Button inside the footer template of gridview.So how can i use update panel
Sandip Paul 491984
12-Apr-14 6:55am
View
but as my columns are days of a month so i can not fixed the index.
Sandip Paul 491984
12-Apr-14 6:55am
View
but as my columns are days of a month so i can not fixed the index
Sandip Paul 491984
10-Apr-14 7:19am
View
from pivot.Here is my stored procedure
ALTER procedure [dbo].[EmpAttandance] @iMon int,@iyear int
as
begin
-- Getting all distinct dates into a temporary table #Dates
SELECT DISTINCT ADate INTO #Dates
FROM AttandanceTran where DATEPART(MM,ADate) =@iMon and DATEPART(YYYY,ADate)=@iyear
ORDER BY ADate
-- The number of days will be dynamic. So building
-- a comma seperated value string from the dates in #Dates
DECLARE @cols NVARCHAR(4000)
SELECT @cols = COALESCE(@cols + ',[' + CONVERT(varchar, Adate, 106)
+ ']','[' + CONVERT(varchar, Adate, 106) + ']')
FROM #Dates
ORDER BY Adate
-- Building the query with dynamic dates
DECLARE @qry NVARCHAR(4000)
SET @qry =
'SELECT * FROM
(SELECT Empcode,Name,Type,Adate,count(type) over(PARTITION BY empcode) AS Tot
FROM AttandanceTran INNER JOIN Empmast ON AttandanceTran.ECode=Empmast.ECode
where DATEPART(MM,ADate)=' + CAST(@imon as varchar(10)) + '
and DATEPART(YYYY,ADate)=' + CAST(@iyear as varchar(10)) + ' )emp
PIVOT (Max(Type) FOR ADate IN (' + @cols + ')) AS Type'
-- Executing the query
EXEC(@qry)
-- Dropping temporary tables
DROP TABLE #Dates
end
Sandip Paul 491984
10-Apr-14 7:14am
View
i did the first part by pivot.but i am not able to do second part i,e i need to show the count the present days.
Sandip Paul 491984
10-Apr-14 3:26am
View
count(at.Type) gives the total of present days and absent days.I need count of present days
Sandip Paul 491984
10-Apr-14 3:25am
View
I have tried this but it gives sum of present days and absent days .I need only sum of present days
Sandip Paul 491984
10-Apr-14 2:56am
View
count(Type) gives me total of Present and Absent days.I need only present days
Sandip Paul 491984
10-Apr-14 2:55am
View
I need to show number of present days!!!
Sandip Paul 491984
22-Mar-14 1:30am
View
instead of using dataset i am using a temp table in which i inserting the values from a gridview and then connecting the table with my report.is the way is correct? please suggest me...
Sandip Paul 491984
20-Mar-14 10:42am
View
ReportDocument cryRpt = new ReportDocument();
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;
var path = Server.MapPath("reportfiles\\PTaxLoc.rpt");
cryRpt.Load(path);
crConnectionInfo.ServerName = "50.2.1.1";
crConnectionInfo.DatabaseName = "Apex";
crConnectionInfo.UserID = "DB_admin";
crConnectionInfo.Password = "dbAdmin1";
CrTables = cryRpt.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = crConnectionInfo;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
CrystalReportViewer1.ReportSource = cryRpt;
CrystalReportViewer1.RefreshReport();
This is my code .can you tell me is this anything wrong?
Sandip Paul 491984
18-Mar-14 2:46am
View
please solve m problem
Sandip Paul 491984
17-Mar-14 10:19am
View
i did the same method with sql server i put web server ip address,user name and password but it showing me the same error.
Sandip Paul 491984
11-Mar-14 7:24am
View
ImageButton btndetails = sender as ImageButton;
GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;
Session["clientid"] = Convert.ToInt32(ClientDet.DataKeys[gvrow.RowIndex].Value);
is the session["clientid"] value is equal for all user who click the gridview or it id different for all user.I am little bit confuse please help me.
Sandip Paul 491984
10-Mar-14 15:24pm
View
sry it was typing mistake
it is datetime.parse(txtdob.tex).tostring("yyyy-mm-dd")
Sandip Paul 491984
10-Mar-14 9:26am
View
actually i got a project in which i have to change the existing data to new format.The old data have the data format as yyyymmdd format and i need to change it to mm-dd-yyyy before redesign the application
Sandip Paul 491984
4-Mar-14 9:29am
View
how do i post data?
Sandip Paul 491984
4-Mar-14 9:29am
View
--deleted--
Sandip Paul 491984
4-Mar-14 9:28am
View
--deleted--
Sandip Paul 491984
3-Mar-14 12:46pm
View
<asp:BoundField DataField = "Vdate" HeaderText = "Tran Date" DataFormatString="{0:MM/dd/yyyy}" HtmlEncode="false" />
after doing that gridview showing date MM/dd/yyyy instead of 03/03/2014
Sandip Paul 491984
3-Mar-14 8:27am
View
means the computer in which the aspx has been uploaded
Sandip Paul 491984
3-Mar-14 8:21am
View
is the calender extender date format is dependent on windows date format?
Sandip Paul 491984
20-Feb-14 7:42am
View
r u there sir?
Sandip Paul 491984
20-Feb-14 7:18am
View
but txtrate is there inside the gridview as a itemtemplate
Sandip Paul 491984
20-Feb-14 7:05am
View
This is cs code:
protected void QtyChanged(object sender, EventArgs e)
{
GridViewRow row = (GridViewRow)drpsubitem.NamingContainer;
TextBox prate = (TextBox)row.FindControl("txtrate");
TextBox pqty = (TextBox)row.FindControl("txtquantity");
TextBox pamt = (TextBox)row.FindControl("txtamt");
pamt.Text = Convert.ToString(float.Parse(prate.Text) * Convert.ToInt32(pqty.Text));
float gvamt = 0;
foreach (GridViewRow g1 in gvChallan.Rows)
{
TextBox txtgvamt = (TextBox)g1.FindControl("txtamt");
gvamt = gvamt + float.Parse(txtgvamt.Text);
}
txttotamt.Text = Convert.ToString(gvamt);
}
protected void RateChanged(object sender, EventArgs e)
{
GridViewRow row = (GridViewRow)drpsubitem.NamingContainer;
TextBox prate = (TextBox)row.FindControl("txtrate");
TextBox pqty = (TextBox)row.FindControl("txtquantity");
TextBox pamt = (TextBox)row.FindControl("txtamt");
pamt.Text = Convert.ToString(float.Parse(prate.Text) * Convert.ToInt32(pqty.Text));
float gvamt = 0;
foreach (GridViewRow g1 in gvChallan.Rows)
{
TextBox txtgvamt = (TextBox)g1.FindControl("txtamt");
gvamt = gvamt + float.Parse(txtgvamt.Text);
}
txttotamt.Text = Convert.ToString(gvamt);
}
Sandip Paul 491984
20-Feb-14 7:03am
View
Sir I am trying to create a invoice program in asp.net in which whenever a user select a product based on that product the rate will be fetched from database and show it on the grid and based on the quantity the amount will be calculated and show it on the amount column in the grid.beside that i have also added a total amount field just below the gridview in which the amount summary will be shown based on quantity chaged or rate changed but when i am trying to do i got that error
Sandip Paul 491984
20-Feb-14 6:55am
View
<asp:GridView ID="gvChallan" runat="server" AutoGenerateColumns="False"
CellPadding="3" HorizontalAlign="Center"
BackColor="White" BorderColor="#CCCCCC" Font-Size="Small"
BorderStyle="None" BorderWidth="1px" ShowFooter="True" Width="950px" >
<columns>
<asp:TemplateField HeaderText="Product Name">
<itemtemplate>
<asp:DropDownList ID="drpproduct" Width="200px" runat="server" DataValueField="PName"
onselectedindexchanged="drpproduct_SelectedIndexChanged" AutoPostBack="true" >
<HeaderStyle Width="200px" />
<asp:TemplateField HeaderText="Sub Item">
<itemtemplate>
<asp:UpdatePanel ID="Upsubitem" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="drpproduct" EventName="TextChanged" />
</Triggers>
<contenttemplate>
<asp:DropDownList ID="drpsubitem" Width="200px" runat="server" DataValueField="BName"
onselectedindexchanged="drpsubitem_SelectedIndexChanged" AutoPostBack="true" >
<HeaderStyle Width="200px" />
<asp:TemplateField HeaderText="Quantity">
<itemtemplate>
<asp:UpdatePanel ID="upqty" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="drpproduct" EventName="TextChanged" />
</Triggers>
<contenttemplate>
<asp:TextBox ID="txtquantity" runat="server" MaxLength="5" CssClass="textb"
Width="70px" OnTextChanged="QtyChanged" AutoPostBack="true" >
<HeaderStyle Width="70px" />
<asp:TemplateField HeaderText="Unit">
<itemtemplate>
<asp:UpdatePanel ID="upUnit" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="drpproduct" EventName="TextChanged" />
<contenttemplate>
Sandip Paul 491984
20-Feb-14 6:55am
View
A control with ID 'txtrate' could not be found for the trigger in UpdatePanel 'uptotamt'.
This is the error i am getting
Sandip Paul 491984
16-Feb-14 10:59am
View
yah it work if removing if(!ispostbak) can u tell me why this happen
Sandip Paul 491984
15-Feb-14 14:18pm
View
I have tried this but problem has not solve.
Sandip Paul 491984
1-Oct-13 16:36pm
View
i just want to build my package with visual studio installer.In which i want to add some custom action which prevents the uninstall process when the application is running.can anyone help me how to do this
Sandip Paul 491984
1-Oct-13 1:48am
View
i just want to build my package with visual studio installer.In which i want to add some custom action which prevents the uninstall process when the application is running.can anyone help me how to do this
Sandip Paul 491984
1-Oct-13 1:48am
View
Deleted
i just want to build my package with visual studio installer.In which i want to add some custom action which prevents the uninstall process when the application is running.can anyone help me how to do this
Sandip Paul 491984
30-Sep-13 16:37pm
View
i have developed a small application in c# but it can be uninstalled from control panel add/remove program.so i want to add a custom action during uninstall which check the current status of that application.If it is running then it will show a message.thats it..
Sandip Paul 491984
25-Sep-13 5:37am
View
ya i have done
1> first i include a installer.cs file and add the code
2>next i create a custom on delete
but the problem remains same at its position
Sandip Paul 491984
24-Sep-13 16:55pm
View
its not working.i added the code in installer class and then add custom action delete
Sandip Paul 491984
24-Sep-13 9:29am
View
can anyone post a code that stop uninstall when the application is running.
Show More