|
Unless you are looking for storing shapes, tables etc you could go ahead with RTF.
|
|
|
|
|
That depends entirely on your appications requirements, not our opinions.
"Comments" where I work could be an entire Word document. It doesn't matter what we think, only what your requirements dictate.
|
|
|
|
|
Hello All..
Hello All..
I am working on Visual studio 2008 C# Windows application.
But I want to provide login for different user like purchase manager, admin, store manager, department user.
Can u help me in coding for creating this four different user’s login? and how to provide the password to admin.
My English is poor but I hope u understand this.
Plz help me..
|
|
|
|
|
You can build a simple screen which endows entitlements to user ids.
Entitlements can be screen wise with user ids assigned to them.
For e.g. one user can have access to store screens and another to the department.
Of course, only an admin can have access to the entitlement screen.
|
|
|
|
|
So use it wots problem at time when application starts, provide a form for login , no one can use the application.
Or you have any problem in coding??
|
|
|
|
|
Hello All,
I'm using Dot Net 3.5 for performing tasks in parallel using below code but It's not showing expected performance i.e. if serial task takes 1 min then using multitasking/parallel tasking it will finish within 1 min or much less time but it takes same time.
Code Snippet:
ManualResetEvent[] resetEvents = new ManualResetEvent[arrFileName.Count];
for (int i = 0; i < arrFileName.Count; i++)
{
resetEvents[i] = new ManualResetEvent(false);
ThreadPool.QueueUserWorkItem(new WaitCallback((object index) =>
{
int actionIndex = (int)index;
ThreadExcecute(arrFileName[actionIndex]);
resetEvents[actionIndex].Set();
}), i);
}
WaitHandle.WaitAll(resetEvents);
Any suggestion?
|
|
|
|
|
KIDYA wrote: king it will finish within 1 min or much less time but it takes same time.
This is not at all necessary.
It depends on how much work your processor / memory are involved with and what data is shared between these threads.
|
|
|
|
|
Thanks for reply ,that means performance is also based on processor speed/configuration,
I'm sharing same dll for performing each task which are not sharing any same inputs,does this matters?
|
|
|
|
|
Threading is useful in situations when you want to perform tasks in the background e.g. process complex calculations while allowing the user to navigate across across web page.
Threading do not necessarily mean performance will be improved.
|
|
|
|
|
Threading isn't actually a silver bullet, you know?
Anyway it's impossible to tell where this goes wrong without seeing what "ThreadExcecute(arrFileName[actionIndex]);" is doing.
|
|
|
|
|
ThreadExcecute function is doing encryption of a files using third party dll. So depending upon file size it will vary the encryption time.But If I've run this in parallel for multiple files then definitely it suppose to take less time.
|
|
|
|
|
Maybe.. with an SSD, sure. With a HDD, it's less clear: the throughput isn't that high anyway, and reading many files at the same time can introduce some seek latency.
|
|
|
|
|
|
Dear all,
I require your opinion on what approach is good and/or practical for the following scenario.
There is a web application which queries data from SQL server.
For example:
Users report to a manager
1. The process by clicking a button is finding who reports to me (manager)
2. So there is a stored procedure written to find the users reporting to the manager
Now, there is a report (rdlc on the web server displayed via reportviewer control) which takes the manager as an input to generate report data for the staff members reporting to that manager.
The stored procedure for this report uses existing stored procedure (as in step 2 above) to find the staff members reporting to the manager and then generate required data.
My question is:
1. Is this the right way of doing this
2. Is there a need to develop a separate SQL view just for this report
3. What would be the best approach on doing this.
Please help.
Thanks
Regards,
Nayan
|
|
|
|
|
Does this have something to do with a C# problem?
Use the best guess
|
|
|
|
|
Not a C# question. Next time, you can post in the database section for better answers.
However, IMO, you should stick to one stored procedure unless you follow coding standards where you have to have a view per report.
|
|
|
|
|
I need the encryt and decrypt cod using one time pad
for client and server
gruda
|
|
|
|
|
Member 10038068 wrote: I need the encryt and decrypt cod using one time pad Look in the Wikipedia[^] what a one-time pad is and make an attempt at writing it. If you have a specific question, I'll gladly help
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
yes I red that but in C# i cant the cod
can you finish the cod and send me for client and server
|
|
|
|
|
Member 10038068 wrote: can you finish the cod and send me for client and server Can you paint my garage?
I'm gonna skip this question.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
We do coding in different Style .
Which is most effective style of coding in C# to build a Class Library , which can be used in both Desktop and Web applications.
Suggest with example.
Regards
Bikash
|
|
|
|
|
This[^] MSDN page is what comes to mind after reading your question. I assume you're familiar with it?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
This always returns true, whether I have notepad open or not, can anyone tell me what I'm doing wrong?
if (IsSingleInstance())
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(Args));
}
else
{
Process current = Process.GetCurrentProcess();
foreach (Process process in Process.GetProcessesByName(current.ProcessName))
{
if (process.Id != current.Id)
{
SetForegroundWindow(process.MainWindowHandle);
break;
}
}
}
static Mutex _m;
[STAThread]
static void Main(string[] Args)
{
static bool IsSingleInstance()
{
try
{
Mutex.OpenExisting(@"Global\Notepad");
}
catch
{
Program._m = new Mutex(true, "Notepad");
return true;
}
return false;
}
}
|
|
|
|
|
What TYPE of exception is thrown? You may be having permission issues or something else... that is, the notepad exists and it's running, but you don't have permission to access it. If you look in the docs, there's 5 different exceptions it can throw, and the situations are very different...
http://msdn.microsoft.com/en-us/library/c41ybyt3.aspx[^]
|
|
|
|
|
Hi,
Thanks for the reply. It cannot find the handle, which is why I'm trying to find an example that works and then build from that.
Quote: No handle of the given name exists.
|
|
|
|