|
do any one of you know this namespace PointOfService is inherited from which dll. if any one of you know please reply me...its urgent.l
Raheel Iqbal
|
|
|
|
|
POS for .NET consists of two assemblies, Microsoft.PointOfService.dll and Microsoft.PointOfService.ControlBase.dll.
Source[^]
|
|
|
|
|
hi
i need help - i need to save information (STOCKS information)
from this site :
http://today.reuters.com/stocks/Overview.aspx?ticker=msft
i need to write a program in C# that get the information
and print it
Eyal
eyalso
|
|
|
|
|
//I have written the code on button click event.
//You also try the same ..It works
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Net;
private void button_Click(object sender, System.EventArgs e)
{
WebClient Client = new WebClient ();
Stream strm = Client.OpenRead ("http://today.reuters.com/stocks/Overview.aspx ticker=msft");
StreamReader sr = new StreamReader(strm);
string line = String.Empty ;
//listbox1.Items.Clear();
// create a writer and open the file
TextWriter tw = new StreamWriter(@"D:\date.xls");
}
do
{
line = sr.ReadLine();
if(line==null)
break;
//listbox1.Items.Add(line);
// write a line of text to the file
tw.WriteLine(line);
}
while(line!=null);
// MessageBox.Show(line);
sr.Close();
strm.Close();
// close the stream
tw.Close();
MessageBox.Show(@"File downloaded successfully at location D:\date.xls.");
}
Try this ...It works..
ajay_dalvi13@yahoo.co.in
-- modified at 6:13 Friday 25th November, 2005
|
|
|
|
|
|
Hi,
I am using OnSessionEnd Eventhandler in C#.
I am trying to invoke cmd.exe during system shutdown.
Whenever my program tries to invoke cmd.exe it fails and gives following error :
"The application failed to initialize properly (0x0000142)"
Pls find a solution for this ...
ajay_dalvi13
-- modified at 0:11 Monday 28th November, 2005
|
|
|
|
|
actually i want to make a combobox which has same features like combobox used in IE(Address Bar ComboBox). which has same features like AutoComplete and many more....
plz help me to solve this problem how would i make this kind of comboBox.
Amit Grover
|
|
|
|
|
What kind of answer do you expect? Complete source code?
You could start by looking at the various modified comboboxes here on CodeProject.
Clickety[^]
Otherwise just start with it and ask a bit more specific.
|
|
|
|
|
Hi,
Can anybody help me with this,
I want to display the data in the datagrid according to my requirement.Consider the following e.g,
I am a customer i have an unique customer id, i have multiple holdings, similarly there are many more customers.Now i want to display thisin my data grid as the first two column will have only one value i,e the customer ID and customer name, but in the same row the other cells will have multiple rows having details about each holdings of that customer
in short.1 customer will have many holdings, all details i need to show in a single row, but the column customername will have only one value.
Raghavan
-- modified at 1:56 Friday 25th November, 2005
|
|
|
|
|
try this code this might help you, change the code as per your needs.
protected string custid=null;
private void Page_Load(object sender, System.EventArgs e)
{
DataSet asd=new DataSet();
asd.Tables.Add();
asd.Tables[0].Columns.Add("Id");
asd.Tables[0].Columns.Add("name");
asd.Tables[0].Columns.Add("item_bought");
asd.Tables[0].Columns.Add("no_of_item");
asd.Tables[0].Columns.Add("item_price");
object[] qwe=new object[] {"1", "cust1" , "aaaa", "aaaaaa" ,"aaaaa" } ;
asd.Tables[0].Rows.Add(qwe);
object[] qwe1=new object[] {"1", "cust1" , "ssss", "sssss" ,"sssssssss" } ;
asd.Tables[0].Rows.Add(qwe1);
object[] qwe2=new object[] {"1", "cust1" , "ddddddd", "dddd" ,"ddddd" } ;
asd.Tables[0].Rows.Add(qwe2);
object[] qwe3=new object[] {"2", "cust2" , "fffffff", "ffffffff" ,"fffff" } ;
asd.Tables[0].Rows.Add(qwe3);
object[] qwe4=new object[] {"2", "cust2" , "ggggggg", "ggggggggg" ,"gggg" } ;
asd.Tables[0].Rows.Add(qwe4);
DataGrid1.DataSource=asd;
DataGrid1.DataBind();
}
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType.ToString()=="Item" || e.Item.ItemType.ToString()=="AlternatingItem")
{
string tmp;
tmp=e.Item.Cells[0].Text;
if(custid ==tmp)
{
e.Item.Cells[0].Text="";
e.Item.Cells[1].Text="";
e.Item.Cells[0].BorderStyle =BorderStyle.None;
e.Item.Cells[1].BorderStyle =BorderStyle.None;
}
if(custid ==null || custid !=tmp)
{
custid=e.Item.Cells[0].Text;
}
}
}
|
|
|
|
|
Good example, but why would you .ToString() ItemType when it is an enumeration that can be compared using the enum?
|
|
|
|
|
hi, I didn't knew it is an enumeration. thank to addin my knowledge
|
|
|
|
|
Hi,
I used your code.But still my doubt is not cleared. I would like toexplain it again. in your example i would like to display the cust id and cust name only once in the midlle of the first row in the first and second column,in the remaining columns of the first row ,coressponding values for each detail are displayed.
...........................................................................
..........|..........|..._1_....|....fsd....|....dsg....|
..........|..........|..._2_....|....sdf....|....sdg....|
...._1_...|.Raghavan.|..._3_....|....sdd....|....dgg....|
..........|..........|..._4_....|....sdu....|....dsd....|
..........|..........|..._5_....|....dfd....|....csg....|
..........|..........|..._6_....|....nsd....|....bsg....|
..........................................................................
|
|
|
|
|
try this code. I believe if you have multiple custid it would be very difficult to distinguish between them. One suggestion between two cust add a blank row so that you could easily distinguish between them. the variable not.
I hope this satisfies you.
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType== ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{
string tmp;
tmp=e.Item.Cells[0].Text;
if(custid ==null || custid !=tmp)
{
custid=e.Item.Cells[0].Text;
cnt=0;
idx=9999;
for(int i=0;i
|
|
|
|
|
hello to every body how i can put image in mssql database????bye c#???
|
|
|
|
|
The Image data type is just an array of bytes. In C# you need to get a byte array version of your image and assign this to a paramter in your SqlCommand object.
|
|
|
|
|
What im trying to do is use the OnPaint Method to draw graphics such as a oval in a panel and not in the default form.
Is this possible? Thanks
Thomas
|
|
|
|
|
Handle the paint event for the Panel. To make it easier, derive a class from Panel, so it's all in one spot, outside the form ( for re-use ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for your help!!! It helped me fix my problem.
It was a very easy fix and not sure why I missed it:
//what I had
Graphics g = CreateGraphics();
//What I Changed
Graphics g = world.CreateGraphics();
Thanks again for your help!
|
|
|
|
|
I'm having troubles in my aspx.cs page, I think...
Anyways, in a button_Click method in my aspx.cs page I have this code...
ViewState["isSubmitted"]="true";
However, when I click the button, the value doesn't get saved.../?! Well, at least I dont' think so. I read the isSubmitted value in my Form_Load method..
string str=(string)ViewState["isSubmitted"];
So, here's the deal. When my page runs I click the button, but the value isn't set to true, but then once I click it again, it is saved to true.
WHY?
/\ |_ E X E GG
|
|
|
|
|
Events happen between page_load and page_prerender, so this value has not been stored when you are reading it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hmm... WEll, I still want my ViewState value to be saved when the user clicks the button, and I want it to be displayed sometime (I don't care if it's in page_load, i just chose it..), where should I put the code to read the ViewState?
/\ |_ E X E GG
|
|
|
|
|
Well, for what you're doing I think you need to overload LoadViewSTate and SaveViewSTate as well, if you want it to persist between pages.
Either way, you can read it anywhere, so long as it's there, and it's not there when you actually click it until the prerender event.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
SO I can access my viewstate property that I set in my button_click after the follwing prerender event?
Ok, what would you do if you wanted to save a value in the view state after a button is clicked and then subsequently display it on the page?
Uverloading those methods sounds like overkill just to do what i'm doing...
/\ |_ E X E GG
|
|
|
|
|
eggie5 wrote: SO I can access my viewstate property that I set in my button_click after the follwing prerender event?
No - the prerender event fires AFTER the click event.
eggie5 wrote: Ok, what would you do if you wanted to save a value in the view state after a button is clicked and then subsequently display it on the page?
If I wanted it to be displayed just on that postback, I'd store it in a member variable, and do the drawing in prerender ( where it belongs ). If I wanted to persist it, I would probably use viewstate.
Christian Graus - Microsoft MVP - C++
|
|
|
|