|
Hi,
I am creating a project using typed dataset for the first time.
The DataTier returns a dataset of the .xsd type to the webservice
//dsEmps is the .xsd
public dsEmps GetData()
{
string strSQL = "SELECT EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, PostalCode, Country, HomePhone, Extension, Photo, Notes, ReportsTo, PhotoPath FROM Employees";
string strConn = "Server=localhost;" + "DataBase=Northwind;" + "Integrated Security=SSPI;Connect Timeout=5";
dsEmps dsData = new dsEmps();
using(SqlDataAdapter oDA = new SqlDataAdapter(strSQL, strConn))
{
oDA.Fill(dsData, "Employees");
return dsData;
}
}
here if I use the dataset as below:
placing a dot after the dataset (i.e. dsData) shows the Employees table and then placing another dot shows the field names...
This is good so far. But the problem is that in the webservice where I get the returned dataset as below, I can not get the column names after daData.Employees.
//EmpData is the datatier...
public EmpData.dsEmps GetData()
{
try
{
EmpData.Employees dc = new EmpData.Employees();
return dc.GetData();
}
catch
{
throw;
}
}
Can you see why this is the case?
Thanks
|
|
|
|
|
I need to create a site using sharepoint, and to be honest I have no idea about sharepoint. I am willing to learn though. Can anyone give me suggestions or URL for an article with an example on how to work with sharepoint?
Any help is very much appreciated.
Thanks!!
Winning is not Important. Wanting to win is!!!
|
|
|
|
|
Download the Windows SharePoint Services with Service Pack 2, install it, and read the SPS Online Help. It has a whole lot of information on SharePoint initialization, administration, and customization.
I just finished customizing a SharePoint installation for Ernst & Young for Sarbanes-Oxley compliance. At the beginning of the project, I knew nothing of SharePoint. I found the online help indispensable.
To supplement the books, I read the blogs by the SharePoint developers. Google for SharePoint blogs and you can read those, too.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Does anyone know of any API for Visual Studio that has functions for sending Short Message Service (SMS) Text Messages to Cell Phones??
I know there are a few services out there you can connect to and send messages using SOAP/XML messaging but these services are NOT free.
MSN Messenger has a feature that allows you to send a Text Message to any mobile device. If this is possible through MSN, then there must be an API available for developers to include this feature in their apps??
Any info is much appreciated.
mheese@inebraska.com
|
|
|
|
|
Can someone point me in the right direction? I’m trying to write a MDI application that has an invisible parent window. (I’m assuming that’s kind of how it would work) Like MS Word. Each instance of a document is in its own form but all forms are children of winword.exe
I like the idea of the hierarchy that is made with and MDI but I don’t like having everything inside one container form.
Also can someone point me in the direction of how to make dock-able forms. Something like Dream weaver where you have the option of having all the windows under one container or you can have each window as a separate window.
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
I'm working on a C# application that uses the Windows Media Player to play my mp3s.
I'd like to catch the EndOfStream event to move to the next mp3, but I don't have a clue how to build this.
Can anyone help with some code?
Thanks
|
|
|
|
|
|
|
hi all
I was making a non rectangular form in C# using a bitmap with a white background and set the transparency key property of the form to white and it works but when I color quality from the system properties to 32bit it didn't work
is there any way to overcome this
or is there a different method for drawing a non rectangular form using images
thx for your interest
|
|
|
|
|
The problem is that you may be using a 24bit image and it has some problems (I don't know why?) with 32bit color quality. Anyway there is a solution for this problem:
1) Load the image manually in the Load event(or wherever you want):
Bitmap bg;<br />
bg=(Bitmap)Bitmap.FromFile(@"Your image.bmp");<br />
bg.MakeTransparent(Color.White);
Instead of this you can use an ImageList and don't forget to set the TransparentColor property
2) Draw the image in the Paint event:
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
e.Graphics.DrawImage(bg,0,0,this.Width,this.Height);<br />
<br />
}
Another approach to this could be using regions, but it is more complicated, if you want to learn more about this please let me know and I'll try to show you an example
Pablo Hernandez Valdes
|
|
|
|
|
Hi Pablo Hernandez
Many thx for your efforts to help me and others, i had used the code that u send to me and it didnt work see the code
Bitmap bg;<br />
private void Form1_Load(object sender, System.EventArgs e)<br />
{<br />
bg=(Bitmap)Bitmap.FromFile(@"C:\Documents and Settings\sabry\Desktop\tt.bmp");<br />
bg.MakeTransparent(Color.White);<br />
}<br />
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
e.Graphics.DrawImage(bg,0,0,this.Width,this.Height);<br />
}
and also i changed the transparency color to white
i want to know why it didn't work in all color qualities
and i want to know about the other methods
again many thx
|
|
|
|
|
Maybe it didn't work because the BackColor must be set to the color you want to make transparent, if not it does nothing at all. In my computer it works fine with this. If it still doesn't work please tell me and I'll try to send you my full code.
If you want to do something like this using regions, for example, if you want a triangular window you can do
System.Drawing.Drawing2D.GraphicsPath gp=new System.Drawing.Drawing2D.GraphicsPath(new Point[]{new Point(0,0),new Point(200,0),new Point(100,200)},new byte[]{(byte)PathPointType.Start,(byte)PathPointType.Line,(byte)PathPointType.Line});<br />
this.Region=new Region(gp);
Now you get a triangular window. You can intersect, join, complement different regions to obtain more complex shapes and even use non polygonal regions with bezier curves (PathPointType.Bezier ). With a litte effort you can make a region that conform to your bitmap and use it for the form.
Any problems please let me know.
Pablo Hernandez Valdes
|
|
|
|
|
see this it works greet
another good one like u helped me to do it
public Form1()<br />
{<br />
InitializeComponent();<br />
Bitmap Img = new System.Drawing.Bitmap(@"C:\myPic.bmp");<br />
Img.MakeTransparent(Img.GetPixel(1,1));<br />
this.BackgroundImage = Img; <br />
this.TransparencyKey = Img.GetPixel(1,1);<br />
}
thx for ur interest
|
|
|
|
|
Is there an event or function that is fired when the user clicks the close button at the upper right portion of the screen of a WEB PAGE? And if there is, what is it? I am working on this ASP.NET project, and I want to output a message box when that button is clicked.
Thank you,
The Major Rager
|
|
|
|
|
Maybe this should be in the Web Development forum...
I think (not sure) the <body> tag has a onClosing event or something:
<html onClosing="DoSomethingWithJavascriptOrSomething">
How you can use this with Asp.Net i have no idea .
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Hi there,
You can hook on OnUnload event of the web form by using js....
<< >>
|
|
|
|
|
Just as the other two people have said. But, this event can't be handled server-side in ASP.NET. There is no event for it. You can only handle this event in client-sie JavaScript.
But, this is really a question for the ASP.NET or Web Development forums.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Am writing some code for en editor. Main problem here is; when I load large files ( > 10mb ) the GUI hangs.
User chooses which file to open with the built-in OpenFileDialog. When user press "OK" ( or "Open") I run a read-method, that passes file data to a byte-array. After that a new method is called, this one translates the byte-array and puts the output into a textbox. However, not the entire content is passed to the textbox, only the amount of content that can fit in the textbox ( depending on how the user has resized it) is added. Textbox is scrolled with external scrollbar
(this is not the exact code, just a hint of how the code looks like. If it can help, I'll gladly post the exact code too, but right now I don't have the code available)
Read_File(string FileName)
{
FileStream FS = new FileStream(options);
byte[] byteBuffer = new byteBuffer[FS.filelength];
Passes the bytes from the file into the byteBuffer
FS.Close
}
Write_text(int scrollbarvalue)
{
Starts textwriting from byteBuffer[scrollbarvalue*16]
Stops adding text when the texdtbox-control is full
}
both ReadFile() and write_text() works fine, point is, I want them to run simoultanoiusly. Preferable, write_text() should be launched when Read_File has read enough data to fill up the textbox-controller
The amount of data that can fit in the textbox is calculated by a formula containing Fontheight, and Textbox.ClientSize.Height ( Locked Width)
|
|
|
|
|
Designing a real editor is a fairly complicated proposition. Take a look at http://www.gnu.org/ to get a feel for what you are diving into.
Mike
|
|
|
|
|
It's not an editor like Emacs I am trying to make. It's a hex editor. It simply reads a file, displays the content in hex and ascii format and allows the user to change byte-values
|
|
|
|
|
Under .net framework, we can use reflection to get a object's all properties,such as:
PropertyInfo[] p= label1.gettype().getproperties();
But, if the object is office application object, we donot get the properties using same reflection, such as:
Word.BookMark wdbk=word_applicationclass.ActiveDocument.bookmark[1]
PropertyInfo[] p= wdbk.gettype().getproperties();
why? how to get the all properties?
thank you very much.
|
|
|
|
|
Hello
I am having a lot of trouble with binding a ds to a text box control.
I have a query SELECT Name, Address, PostCode FROM Customer
This query fills the dataset. This works fine as l have tested this in my web service. The xml displays the name, address, and postcode.
But l get my error message when l try and bind this to the text box control. I have tried many things and l now that the syntax is right. Am l missing something.
//Error Message - Cannot create a child list for field Customer
txtName.DataBindings.Add("Text",ds,"Customer.Name");
txtAddress.DataBindings.Add("Text",ds,"Customer.Address");
txtPostcode.DataBindings.Add("Text",ds,"Customer.PostCode");
many thanks in advance,
Steve
|
|
|
|
|
I'm trying to import a csv text file into a datagrid. when i get it done, only the first field in the text file appears. i'm not sure why. am i only getting one field into the data set? or are all the fields getting into the data set and i'm only transfering one field to the data grid?
here's my code:
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DataFiles;Extended Properties=""text;HDR=Yes;FMT=TabDelimited""";
OleDbConnection conn = new OleDbConnection(strConnection);
string selectString = "Select * From [sellerEngine_1.txt]";
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText = selectString;
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
conn.Open();
string dataTableName = "SellerEngine";
da.Fill(ds, dataTableName);
DataTable dt = ds.Tables[dataTableName];
dataGrid1.DataSource = dt.DefaultView;
conn.Close();
thanks!
Thomas Barker
|
|
|
|
|
Hi
Does anybody know if there is any format that I can use in the String.Format(..) method to write an integer appended with the "st" or "nd" or "rd" or "th" without having to write custom code?
Thanks
|
|
|
|
|
|