|
|
|
hi
how to create GUI for back end so that we can create and alter the database
for MS SQL using C# in Windows application.
|
|
|
|
|
create a form -> put on some controls -> make the controls do sql stuff
now you have an idea you can give it a try, then come back if you get any specific problems (other than 'i cant be bothered to try myself so someone give me the code' syndrome)
If only MySelf.Visible was more than just a getter...
|
|
|
|
|
How about simply using Management Studio? If you don't know how to create an application I suspect you are going to be struggling with the SQL even more
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
I wrote the following query in sql server 2005 but it didn't work.
SELECT Branch_no, no_of_employees, in_date, The_in_time, the_out_time FROM (
SELECT Branch_no, count(emp_no) as no_of_employees, in_date,
Cast(DATEPART(HOUR,in_time) as varchar(2)) + ':' +
Cast(DATEPART(MINUTE,in_time) as varchar(2)) The_in_time,
Cast(DATEPART(HOUR,out_time) as varchar(2)) + ':' +
Cast(DATEPART(MINUTE,out_time) as varchar(2)) The_out_time,
FROM Attendance
group by Branch_no, in_date )
WHERE The_in_time >= '6.00' ;
Actualy what I want is to get no of employees in each branch who has come to the office after 6.00 AM. I had to cast datetime fields to extract the time portion because it holds both date and time parts.
ex: 01/01/2009 06:00:00 AM
pls help me regarding above matter.
thanks in advance.
|
|
|
|
|
Try this,
SELECT Branch_no, COUNT(*) EmployeeCount
FROM Attendance
GROUP BY Branch_no
HAVING DATEPART(HH,in_time) >= 6
ORDER BY COUNT(*) DESC
If it doesnt work, try posting the message in the database forums
|
|
|
|
|
I had two hundered tables in database. I want to retrive the tables with one common field.How to does this .I Want use C# and Sql .I had different Tonnage in all the tables. if i want to call 300 tonnage in that all the tables(200 tables).How to retrive it from the datatable in the database.
thank's in adv
lavan
|
|
|
|
|
if you are using oracle the following query can be used to retrieve the table names based on the column-name
select * from dba_tab_columns where lower(owner) = 'order_schema' and lower(column_name) like '%column-name%'
Satish
|
|
|
|
|
Hi All,
Can you please help me in solving the below problem.
I am trying to access the Windows schduler task programmatically using c# to enable/disable the task.
The task is already created. Can you give me some idea how do i go about it?
Thanks in advance.
Regards,
Sunny
|
|
|
|
|
The last time I did this was by COM interop to the ITaskScheduler interface.
«_Superman_»
|
|
|
|
|
|
Need to update application configuration
private void UpdateAppSettings( string settingName, string settingValue)
{
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
AppSettingsSection appSettings = config.AppSettings;
KeyValueConfigurationElement setting = appSettings.Settings[settingName];
setting.Value = settingValue;
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
}
Not able to build the application error showing thet Configuration is not there in System.Configuration namespace
|
|
|
|
|
You have to add a reference to the assembly.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
there are a function that allows to know the number of page of a Word file by opening it? thank you very much.
|
|
|
|
|
Nova has developed Social Networking Channel (SNC) for one year. User can add his/her events of their lives to the system; then the system will turn the events into a line presented by Flash. SNC can also interface with other social network websites, like Facebook and MySpace, so users can easily use this system when they visit Facebook and Myspace.
We used Web Client SoftWare Factory as the architecture, and used Nhiberate,AntiXssLibrary,Ajax in the process of developing.
Web Client Software Factory is based on MVP, but it is optimized, so it is more easier to maintenance for good-sized system. We added Nhiberate in MVP, so the logic of the architecture is clearer and the code is simpler. On the other side, Web Client Software Factor is interface oriented; accordingly it is better compare to MVC.
One of the most important feature of Web Client Softeare Factory is Depency Injection (DI). An config file always exists for Depency Injectionto kepp the Depency object. It will return a depency object through a special role of the system. For example:
Public Model User{
String name;
}
Public Controller IUserController{
Public void Add();
}
Public Controller ChineseUser:IUserController();
Public Controller EnglishUser:IUserController();
Public Viewer UserViewer{
Private IUserController _userController;
Public IUserController{
//Get the current DI of UserViewer through the system role form the //config file, the following method can be implemented by the DI //system automatically
Return CurrentController;
}
}
modified on Wednesday, February 11, 2009 8:27 PM
|
|
|
|
|
This is a programming forum, if you want to advertise pay for it
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi all. I'm trying build a C Sharp applicatiopn that would scan through my hard disk which has two partitions, i.e. C: and D:, for all the pdf file type document but i have no idea on how to start.
Anyone with an idea?
|
|
|
|
|
|
Thank you. I'm working on it.
|
|
|
|
|
Hi,
My problem is that I want to find a specific color in a certain area of the screen.
I'm using GetPixel[^] to find the color of a specific point on the screen, but it doesn't give me the ability to search an area of the screen.
What I have come up with so far is these while loops, which does the following:
1. Loop through the X values at the first "line" of the area.
2. Set X to 0. Increment Y by 1 (going to the next "line" of the area).
3. Repeat.
In the code below I'm searching in the area between 0,0 and 50,50.
int x = 0;
int y = 0;
int x2 = 50;
int y2 = 50;
while (x <= x2 && y <= y2)
{
while (x <= x2)
{
Color c = Win32.GetPixelColor(x, y);
if (c.R == 128 && c.G == 128 && c.B == 128)
{
}
x++;
}
x = 0;
y++;
} Can this be achieved in a better way?
By the way, as you can see in the comment in the code, I want to break out of the loop there if the specified color has been found, but it didn't work out with the break keyword. Don't tell me I have to use the G word.
Thanks.
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
Hi,
as I can see it, the simplest solution is to use a flag, whether the value was found or not:
bool bFound = false;
while ((!bFound) && (x <= x2 && y <= y2))
{
while ((!bFound) && (x <= x2))
{
Color c = Win32.GetPixelColor(x, y);
if (c.R == 128 && c.G == 128 && c.B == 128)
{
bFound = true;
}
if(!bFound)
x++;
}
if(!bFound) {
x = 0;
y++;
}
}
Better way would be to put this while thing into method and call return when you found the Color.
Regards
Sebastian
|
|
|
|
|
Thanks
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
int x1 = 0;
int y1 = 0;
int x2 = 50;
int y2 = 50;
Color colorCheck = new Color(128, 128, 128);
bool found = false;
for(int x = x1; x <= x2; x++)
{
for(int y = y1; y <= y2; y++)
{
if(Win32.GetPixelColor(x, y) == colorCheck)
{
found = true;
Console.WriteLine("Color found at {0},{1}", x, y);
break;
}
}
if(found)
break;
}
If only MySelf.Visible was more than just a getter...
|
|
|
|