Ramy Mahrous 401 Postaholic Featured Poster

You're welcome my friend.

Ramy Mahrous 401 Postaholic Featured Poster

You're welcome my friend, hope your project handed soon. we're here for help

Ramy Mahrous 401 Postaholic Featured Poster

If you want to create UDF in source code and save this UDF in your SQL Server, just use SMO library to help you regards this.

To add reference to SMO
Project->Add reference->Microsoft.SqlServer.Smo

Ramy Mahrous 401 Postaholic Featured Poster

You can deal with UDF from VB.NET as you use it in SQL Server, ADO.NET helps you, but please tell me do you want to pass parameters to UDF or return the value of UDF.

Ramy Mahrous 401 Postaholic Featured Poster

Developers just don't look at methods documentation!!
Round method returns the rounded number that's your problem, friend!

double d = 1000.0 / 3000.0;
d = Math.Round(d, 2);
Console.WriteLine(d);
SiPexTBC commented: Thanks. +1
Ramy Mahrous 401 Postaholic Featured Poster

what's the type of DLL, managed or unmanaged?

Ramy Mahrous 401 Postaholic Featured Poster

You can, just change the access modifier of those controls to public

Ramy Mahrous 401 Postaholic Featured Poster

Almostly you use disconnected mode, so commit your dataset with newly changes.

Ramy Mahrous 401 Postaholic Featured Poster

Outlook may be need (erhan.kula@bcx.co.za)'s password to complete the operation It's just guess

Ramy Mahrous 401 Postaholic Featured Poster

In first gridview you can disble editing, and when user presses edit button open the next gridview containing the record to be edited and enable editing in this gridview (second gridview).

Ramy Mahrous 401 Postaholic Featured Poster

Integrate with their libraries, no there is not generic media player controller

Ramy Mahrous 401 Postaholic Featured Poster

Send your message (Data + indicator) to server and via indicator call a method (in server) to save the data into file.

Ramy Mahrous 401 Postaholic Featured Poster

Bravo! go through it and feel free to drop your questions here, and you'll find who would answer!

Ramy Mahrous 401 Postaholic Featured Poster

No, you must install MS BI tools

Ramy Mahrous 401 Postaholic Featured Poster

I can play with SQL Server in this problem
1- define a trigger [on delete] let this trigger commit delete if deleted row > 1 and let it insert one of deleted rows into table again.

DELETE FROM table WHERE date1 in (SELECT date1 FROM table) AND varchar1 in (SELECT varchar1 FROM table

that's not the optimal solution but I think it works, I just wake up now and found this question.

Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster
System.Diagnostics.Process.GetProcessesByName("process name")[0].Id;
Ramy Mahrous 401 Postaholic Featured Poster

Yes, yes I am sorry I was wrong thanks, pclfw :)

Ramy Mahrous 401 Postaholic Featured Poster

Handle button pressing, then set Label.Text = YourTextBox.Text;

Please for more questions on developing web application via C# aka ASP.NET, go to this forum http://www.daniweb.com/forums/forum18.html to find vast and clear answers

Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

If he's working on VS2008 he can traget the framework where the application runs on, I guess the problem came from changing library paths.

Ramy Mahrous 401 Postaholic Featured Poster

hope it solved!

Ramy Mahrous 401 Postaholic Featured Poster

@erictenson:
sorry??

Ramy Mahrous 401 Postaholic Featured Poster

after form constructor add this line

CheckForIllegalCrossThreadCalls = false;
Ramy Mahrous 401 Postaholic Featured Poster

modify the connection string, or verify the second pc connects to your DB Server.

Ramy Mahrous 401 Postaholic Featured Poster

hmmm,
SELECT MIN(column) FROM table WHERE ( SELECT TOP 3 (column) FROM table ORDER BY column desc )

Ramy Mahrous 401 Postaholic Featured Poster

Use replication

Ramy Mahrous 401 Postaholic Featured Poster

byty is the array of byte returned from your DB

MemoryStream ms=new MemoryStream(byty);
			pictureBox1.Image=Image.FromStream(ms);
Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

Still, don't fully understand you!!

Ramy Mahrous 401 Postaholic Featured Poster

OK, we have no objection!! we faced a question and we answered!!
The code written in the question is Windows Application code not Console one.

Ramy Mahrous 401 Postaholic Featured Poster

Sorry give me sample input and sample output, I see your sql statement is correct.

Ramy Mahrous 401 Postaholic Featured Poster

It's a windows application!

Console is

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace SomeProductNameSample
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
///any code begins from here!
        }
    }
}
Ramy Mahrous 401 Postaholic Featured Poster

I don't think so, just copy your question and paste it in a new thread there :)

Ramy Mahrous 401 Postaholic Featured Poster

Enum is better.

Ramy Mahrous 401 Postaholic Featured Poster

Why this "and utype =@type" in your select statement??!!!! you want to filter selected user by utype ??! as you don't know his\her type at all

what you need to modify is to add new column in user table and select userID and uType using user name AND password!

Assign user object ID property with id returned from DB and also uType property (enum).

before calling a method check uType to authorize the current user.

P.S: DataReader.Read() doesn't take any arguments!! to loop for many records (and you don't need that in your case) use while loop

like

while(reader.Read())
{
///some sort of code goes here!
}
Ramy Mahrous 401 Postaholic Featured Poster

Yes, because every class needs references, those references information saved in project setting file (XML file) and this file contains a lot of information needed to compile\run class(es).

Ramy Mahrous 401 Postaholic Featured Poster

Kindly, move your thread to ASP.NET forum http://www.daniweb.com/forums/forum18.html to get quick help!

Ramy Mahrous 401 Postaholic Featured Poster

search in google I think it uses XML!!

Ramy Mahrous 401 Postaholic Featured Poster

add new column in your user table to identify the user type, sure you can't do that using just username and password!!!

Ramy Mahrous 401 Postaholic Featured Poster

No wizard for creating classes, methods, members, fields,.... in C# but you can use Class Diagram Designer that shipped with VSTS or VS architect edition to design your classes and add your methods, members, fields,.... in drag drop style.

Ramy Mahrous 401 Postaholic Featured Poster

Look,
Nested namespaces: used collect all related-functionality classes inside a parent namespace like

namespace System
{
class string...
class int...
class .....
namespace IO
{
class File...
class Stream....
class .....
}
}

Class inside class to limit the functionality of nested class to the parent class as you don't need your assembly or your nested class namespace classes to use nested class functionality (in short: more encapsulation)

Class outside namespace, won't be used except your assembly. (Don't know why some developers do that!!! as you can flag your class with internal keyword)

Any questions?!

Ramy Mahrous 401 Postaholic Featured Poster

No flag needed, he must put a foreign key in UserTable to identity UserType (Admin or User)
About session, I didn't notice :$

Ramy Mahrous 401 Postaholic Featured Poster

System.Security.Cryptography may help you for stronger and better encryption!

Ramy Mahrous 401 Postaholic Featured Poster

Encrypt your data!!!

Ramy Mahrous 401 Postaholic Featured Poster

Just read your XML file as normal file,

string xmlData = File.ReadAllText("path.xml");

then write this data to your binary file

FileStream fs = new FileStream("path.txt", FileMode.OpenOrCreate);
BinaryWriter sw = new BinaryWriter(fs);
sw.Write(s);
sw.Close();
Ramy Mahrous 401 Postaholic Featured Poster

Usually Crystal Report depends on DataSet, load your 2 tables in 1 DataSet, and use it as report Data Source.

Ramy Mahrous 401 Postaholic Featured Poster

If you install SQL Server 2005 Developer Edition or Enterprise one, it'd install for you BI package to develop such application in rapid way :)

Ramy Mahrous 401 Postaholic Featured Poster

In UserClass define UserType enumerator and assign it a value (came from database userTable) indicates it as an admin or user

Ramy Mahrous 401 Postaholic Featured Poster

Dear,

public string GetUserFirstName(your params...)
{
//use ADO.NET to work with your database
}
......
Session.Add("SessionName", GetUserFirstName(your params));
......

For more questions, I recommend to start your threads in ASP.NET form at http://www.daniweb.com/forums/forum18.html