Ramy Mahrous 401 Postaholic Featured Poster

I don't really offend you try this http://www.lmgtfy.com/?q=blowfish+cipher+c%23

Ramy Mahrous 401 Postaholic Featured Poster

Welcome to Tugce and every Turkish people here and every where, I said why Serkan gave me reputation points :D now I knew, I've no problem I'll gave you when I celebrate 9th power strength :D
You didn't add on MSN did you still at your job since last message I sent you?

Ramy Mahrous 401 Postaholic Featured Poster

Add item then check it, I don't have any solution right now for empty lists.

Ramy Mahrous 401 Postaholic Featured Poster

Don't use old threads :p

List< String >  names = new List< String >();
names.Add("Serkan");
if(names.GetType().IsGenericType)
Console.WriteLine(names[0].GetType().Name);
Ramy Mahrous 401 Postaholic Featured Poster

How you bind your ComboBox?
Because we may wrap it by custom class and get unique items

serkan sendur commented: nice +5
Ramy Mahrous 401 Postaholic Featured Poster

Exactly like what adatapost have said, but I think you built your query well then please attach your solution to know where your problem in.

Ramy Mahrous 401 Postaholic Featured Poster

I've looked on their implemetation (DirectoryInfo implementation) and they format string (Directory path) in the constructor like to get the full internal path and so on, so you don't have anything. the idea is Windows Platform hasn't such type of directories. You may use any open source of C# which intended to run on such operating systems which permit using space in the end of directory name.

Ramy Mahrous 401 Postaholic Featured Poster

Read this post http://blogs.msdn.com/coding4fun/archive/2006/10/31/912569.aspx and compare its code with yours

Ramy Mahrous 401 Postaholic Featured Poster

You're working in web browser so you have full control to handle what to get and what to not. but if you're relay on some made controls you need to see if they have any interfaces to those functionalities so you can call them from external application.

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

I think you misuse Remoting if you come to ask this question, because as Windows service is running you can hold variables on it (I assume you are holding connection strings, user name, etc..).

That was abstraction, let's move to the next step, does both applications running on the same PC?
Then you can use Process Domain techniques, it may be on different on the same network so the solution is Sockets, please tell us more about that.

Ramy Mahrous 401 Postaholic Featured Poster

@Scott, they say SQL Server 2005 not 2000, Express not MSDE, because if they need to search on some code to attach they'll be confused.

sknake commented: good catch +4
Ramy Mahrous 401 Postaholic Featured Poster

Because it's big thread I didn't read all, but you can tell us what the specific problem you face, like I've problem that my data not updated and show us your code with little explanation and using Code Tags.

But, It's very hard to solve a bulk of problems + helping in logic and database design.

Ramy Mahrous 401 Postaholic Featured Poster

One of prerequisite to have SQLExpress installed, then you can attach your database automatically using SMO, if you need any help regarding SMO don't hesitate to reply.

Serkan, I didn't became Feature Code yet, I'll add two code snippets today, then sleep then dream that HappyGeek sent me PM congratulates me :D

Ramy Mahrous 401 Postaholic Featured Poster

By what you are transferring??

Ramy Mahrous 401 Postaholic Featured Poster

Neither me..

Ramy Mahrous 401 Postaholic Featured Poster

Compare between the two tables by Database engine using Outer join then the result would be shown in the Grid.

Ramy Mahrous 401 Postaholic Featured Poster

But ORM very useful for large business applications. You mayn't find the reason to use it.

Ramy Mahrous 401 Postaholic Featured Poster

OK!

Ramy Mahrous 401 Postaholic Featured Poster

Is that the inside repeater or so?

Ramy Mahrous 401 Postaholic Featured Poster

Please clarify!
I hope it's not a request for graduation project idea.

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

Look what I understand you need to assign variable to another value

Dim value1 as string
Dim value2 as string
value1 = "value1"
value2 = "value2"
value2 = value1
MessageBox.Show(value2) 'shows value1
Ramy Mahrous 401 Postaholic Featured Poster

You're most welcome please mark it as solved.

Ramy Mahrous 401 Postaholic Featured Poster

If you've option to buy 3rd party tool, I recommend you to use Telerik RadGrid has some cool functionalities.

Ramy Mahrous 401 Postaholic Featured Poster

Its properties are readonly you can't set it, I recommend you to read this article http://www.aspfree.com/c/a/.NET/HTTP-File-Upload-without-User-Interaction-using-dot-NET/1/

Ramy Mahrous 401 Postaholic Featured Poster

Modify it

string str = TextBox1.Text;
int l = str.Length;
int i;http://www.egyhat.com/radio/
for (i = 0; i < l; i++)
{
if (str[i] == ' ')
{
Response.Write("Invalid");
}
else
{
Response.Write("valid");
}
}

The reason you str returns char and you assign it to " " (string) I've better solution for that if you need.

Ramy Mahrous 401 Postaholic Featured Poster

You're most welcome, Danny :)
I hope you like it, when I had facebook account I had 700 pics there, I may schedule changing my avatar periodically :D

Ramy Mahrous 401 Postaholic Featured Poster
ddanbe commented: Nice reply! +7
Ramy Mahrous 401 Postaholic Featured Poster

Yes you got it right, It just mapping to database object.
Because it separates Data Access Layer from Logic Access Layer by putting these objects (Creating by ORM) to make life more easier and more separated.

Ramy Mahrous 401 Postaholic Featured Poster

My solution Danny is more scalable
Don't depends on current requirements and you should have some flexibility
I argue using RegularExpression
pattern = .....
Then if this text matches the pattern return true to accept the value otherwise false.
I'll do code snippet for it soon.

Ramy Mahrous 401 Postaholic Featured Poster

You're welcome
Yes, yes

Ramy Mahrous 401 Postaholic Featured Poster

Yes, Scott I was search about Scope_Identity yesterday I totally forgot it, thanks :)

Ramy Mahrous 401 Postaholic Featured Poster

You can use both but everyone has some pros&cons
GridView
Pros: Free, stable, and easy to bind data
Cons: A lot of work should be done to do some exportation to some formats and not richy
Business Objects (Crystal report)
Pros: Stable, less work to be done for exportation to some formats, and richy.
Cons: Not free, and a lot of work to bind data

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

Please mark it as solved if it's.

Ramy Mahrous 401 Postaholic Featured Poster

I expect you've auto increment identifier

Create proc InsertSP
@somevalues
AS
INSERT INTO YourTable Values(....)
SELECT MAX(PK) FROM yourTable

Then call the InsertSP

btn_click()
{
MessageBox.Show(GetValue("InsertSP").ToString());
}

Object GetValue (string procName)
{
//I didn't assume stored procedure takes parameters.
SqlConnection conn = new SqlConnection(...);
SqlCommand com = new SqlCommand(procName, conn);
com.CommandType = CommandType.StoredProcedure;
conn.Open();
com.ExecuteScalar();
}
Ramy Mahrous 401 Postaholic Featured Poster

I added some modifications to Scott code

using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;

namespace daniweb
{
  public partial class frmFile : Form
  {
    public frmFile()
    {
      InitializeComponent();
    }

    public static void AppendText(string FileName, string Buffer)
    {
      //I'm using another method here in case you want to log writes etc. 
      //It encapsulates the write process
      File.WriteAllText(FileName, Buffer);
    }

    private void button1_Click(object sender, EventArgs e)
    {
      const string fName = @"C:\file3.txt";
      string buffer = Guid.NewGuid().ToString(); //junk data
      AppendText(fName, buffer);
      Process p = Process.Start("notepad.exe", fName);
      p.WaitForExit();
    }
  }
}
Ramy Mahrous 401 Postaholic Featured Poster

If your stored procedure returns value just one value (which returns form aggregate functions) use SqlCommand and give it stored procedure name and then execute it as Scalar; it returns object you then can cast it

Object GetValue (string procName)
{
//I didn't assume stored procedure takes parameters.
SqlConnection conn = new SqlConnection(...);
SqlCommand com = new SqlCommand(procName, conn);
com.CommandType = CommandType.StoredProcedure;
conn.Open();
com.ExecuteScalar();
}
Ramy Mahrous 401 Postaholic Featured Poster

You don't beat up anyone you just talking much by not good way, I feel that Dani is your home and you're the one who says who should do what, if your don't like Serkan don't offense him personally and reply in a good manner PLEASE!

jephthah commented: kum-bah-YAHHHH m'lord... kum-bah-yah.... +12
iamthwee commented: 'Don't offense him' it should be 'don't offend him' -4
Ramy Mahrous 401 Postaholic Featured Poster

@William. Serkan asks something politely, doesn't he? and your reply is somewhat harsh please don't offense people. everyone in the community is part of it, you == me == Serkan == Salem == Dani, no one can let this community stand up without others help, if anyone criticize me it doesn't mean I'm good or bad, it means how others see me and I should take his words in my consideration and I debate this is the best thread Serkan wrote not because the subject has my name, I don't care but what I need to say kindly, don't offense someone did dozen of threads marked as SOLVED and when he asks and no one answers he posts the full answer + sample application.

Ramy Mahrous 401 Postaholic Featured Poster

Best of luck, man :)

Ramy Mahrous 401 Postaholic Featured Poster

Look Serkan I didn't fully understand your question what specific functionality you are looking for but every item on the subject and how to talk to it using .NET, I just searched for windows shell API C# and I found some posts, Am I right?
http://www.codeproject.com/KB/cs/decompresswinshellapics.aspx

Ramy Mahrous 401 Postaholic Featured Poster

Thanks, Scott :)

Ramy Mahrous 401 Postaholic Featured Poster

If the criteria for being featured are post count, solved thread count, and reputation points

then what??? looool what's the criteria?? I swear I'm not looking for any award from any kind but just I wanted to comment on this line :) I just need to nominate Danny he deserves it.

Ramy Mahrous 401 Postaholic Featured Poster

I'm going to write a lot of code snippets.

Ramy Mahrous 401 Postaholic Featured Poster

Excuse me I've another solution :) due to being fan of SMO I'll do it using it

public void (string databaseName, string filePath)
{
try
            {
                Server localServer = new Server(); //local using windows athuentication 
                Backup backupMgr = new Backup();
                backupMgr.Devices.AddDevice(filePath, DeviceType.File);
                backupMgr.Database = databaseName;
                backupMgr.Action = BackupActionType.Database;
                backupMgr.SqlBackup(localServer);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message + " " + ex.InnerException);
            }
}
sknake commented: best solution on the thread +3
Ramy Mahrous 401 Postaholic Featured Poster

I also nominate Danny (ddanbe) and adatapost, please take this issue into your consideration.

ddanbe commented: You're too kind. +7