Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

Hayder Marzouk

@Hayder Marzouk
About
Posts
32
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Who knows how to change font in console?
    H Hayder Marzouk

    Hi, To change the font : - right click on the console title bar - select properties - Select the Font Panel and change the font. HTH. Hayder Marzouk

    C# tutorial question

  • Data binding using checkbox
    H Hayder Marzouk

    Hi, This can be resolved using Format/Parse handlers. Here the code : Binding YesNoBinding = new Binding("Checked", yourDatasource, "YourPropertyName", false, DataSourceUpdateMode.OnPropertyChanged); YesNoBinding.Format += new ConvertEventHandler(YesNoBinding_Format); YesNoBinding.Parse += new ConvertEventHandler(YesNoBinding_Parse); yourCheckBox.DataBindings.Add(YesNoBinding); And here the code for handlers : void YesNoBinding_Parse(object sender, ConvertEventArgs e) { if ((bool)e.Value == true) e.Value = "Y"; else e.Value = "N"; } void YesNoBinding_Format(object sender, ConvertEventArgs e) { if ((string) e.Value == "Y") e.Value = true; else e.Value = false; } HTH. Hayder Marzouk

    C# database question wpf wcf

  • Paintdesktop Api with back buffer
    H Hayder Marzouk

    Hi, I Created an application that allows user to draw shapes, pictures,... I had also flickering problem and a single line of code resolved my problem. Try this line in the Initilization of ure Control/Form : SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); Change the first argument to ure needs. HTH. Hayder Marzouk

    C# graphics csharp json tutorial question

  • How to send variable from aspx.cs page to aspx page
    H Hayder Marzouk

    Hi, - Declare your variable as public in the aspx.cs - in your .Aspx use : <%=myVar%> in any place HTH Hayder Marzouk

    ASP.NET tutorial

  • MySQL connection problem
    H Hayder Marzouk

    Hi, You have downloaded MySQl connector, so use it instead of oledb. It's a native driver and fully managed .Net so more performant than oledb driver. HTH. Hayder Marzouk

    Database csharp mysql help

  • SQL triple-join question
    H Hayder Marzouk

    Hi, Many ways to write the query : 1- using "IN" : select userid from tblusers where userTeamId in (select teamId from tblTeams where teamOfficeId in (select officeID from tblOffices where officeId= 'XYZ')) 2- Using Join (more recommended) : SELECT tblUsers.userID FROM tblUsers INNER JOIN tblTeams ON tblUsers.userTeamId = tblTeams.teamId INNER JOIN tblOffices ON tblTeams.teamOfficeId = tblOffices.officeId where tblOffices.OfficeId = 'XYZ' HTH. Hayder Marzouk

    Database question database sharepoint collaboration tutorial

  • Autocomplete File Path
    H Hayder Marzouk

    Hi, These feature is implemented in .Net framework 2.0 but not in .Net 1. Here a usefull link that contains some code to implement Autocomplete feature : http://blog.theple.com/neoworkadmin/folder/13.html?uid=65[^] Go to the section : Ability to add Auto-Complete to any Text Box HTH. Hayder Marzouk

    Windows Forms tutorial

  • Duplicate record from Datagrid.
    H Hayder Marzouk

    Hi, To find duplicated records use the above code sample : DataView v = myDataSet.Tables["YourTable"].DefaultView; v.Sort = "YourPrimaryKey ASC"; Dictionary> duplicatedRecords = new Dictionary>(); for (int i = 0; i< v.Count -1; i++) { int j = i +1; object iValue = v[i]["YourPrimaryKey "]; while (v[j]["YourPrimaryKey "] == iValue) { if (! duplicatedRecords.ContainsKey(i)) { duplicatedRecords.Add(i, new List()); } duplicatedRecords[i].Add(j); j++; } i = j; } HTH. Hayder Marzouk

    Windows Forms sharepoint

  • Supress main report section with subreport
    H Hayder Marzouk

    Hi, Try right cliking onthe report and selecting Format Section Check the case Suppress Blank section HTH. Hayder Marzouk

    .NET (Core and Framework) visual-studio csharp

  • Querying Microsoft Active Directory (Windows Server 2003) from SQL Server
    H Hayder Marzouk

    Hi, Visit this blog : http://adsdsoobject.codebetter.com/blogs/brendan.tompkins/archive/2003/12/19/4746.aspx[^] Here also a complete article : http://fromelard.free.fr/Scripts/SQL_Linked_AD/SQL_Linked_AD.pdf[^] Unfortunatly it's in french. I can help u translating it if u want. HTH. Hayder Marzouk

    Database database windows-admin sql-server sysadmin question

  • Problem Displaying moneyfield in gridview
    H Hayder Marzouk

    Hi, My response works in a .Net 2.0 Windows Forms application not is an ASP.NET Project. So... - Edit the gridview columns - Select ure column - Select the property DefaultCellStyle and click the button in the right. - You will find the Format property in a new opened property form - Set the property to c HTH. Hayder Marzouk

    C# help

  • problem.
    H Hayder Marzouk

    Hi, Here an example. U have 2 dlls : DLL1 and DLL2. In DLL1 u have a class Employee with a method Fire() In DLL2 u have a class Boss. 1- if u declare the Fire method as protected, in the boss class u can invoke the Fire method and U cannot invoke the fire method anywhere else the Boss class 2- if u declare it as Internal : u can invoke the fire method anywhere in DLL1 but not in DLL2. U cannot also view the method in the Boss class (because it's in the DLL2) 3- If u declare it as Internal protected, u can only invoke the method from a class inheriting from Employee located in the DLL1. HTH. Hayder Marzouk

    C# help tutorial

  • DataGridView problem
    H Hayder Marzouk

    hi, Don't think datagrid, think datasource. So ure solution is in the the datatable. use the ColumnChanged or ColumnChanging event of ure datatabl. Here an example : mydataTable.ColumnChanged += new DataColumnChangeEventHandler(mydataTable_ColumnChanged); void mydataTable_ColumnChanged(object sender, DataColumnChangeEventArgs e) { if (e.Column.ColumnName == "Primary" ||e.Column.ColumnName == "Secondary") { if (e.PropsedValue == true ) { //............. do something } } } HTH. Hayder Marzouk

    C# help

  • Problem Displaying moneyfield in gridview
    H Hayder Marzouk

    Hi, Set the DefaultCellStyle.Format property of the column to c HTH. Hayder Marzouk

    C# help

  • problem when creating database independant access layer
    H Hayder Marzouk

    Hi, In fact they are different : SQLServer provider : @ + name Oracle : p + name OleDB : ? (without a name) ODBC (i think) : ? (without a name) Me too i don't know why MS decided to change parameter names with providers. It's as is it and we must deal with that. There are many other differences : - Data Types - Quotes : []in sql and access , "" in Oracle,.... - And Queries are different so use only standard SQL (SQL-92 or SQL-99) to be sure that u don't need to rewrite your application when changing provider. I think u must create a class for each provider and declare diffrences as variables that u change in each class. I am sure that's the better way. HTH. Hayder Marzouk

    Database database help csharp sql-server sysadmin

  • Converting seconds to hours and mins
    H Hayder Marzouk

    Hi, Here some sql to calculate Hours, Minutes, seconds using only built in sql functions and in one sql select statement: select floor(duration / 3600) as h, floor( (duration - floor (duration /3600) )/60) as m, duration - floor(duration / 3600) * 3600 - floor( (duration - floor (duration /3600) )/60) * 60 as sec then u can concatenate all these fields HTH. Hayder marzouk

    Database help question

  • get data in background for datagridview
    H Hayder Marzouk

    Hi, Use VirtualMode option of the datagridview. U can find examples in the MSDN HTH. Hayder Marzouk

    C# css database question

  • Wheres my data when app.config is an Embedded Resource
    H Hayder Marzouk

    Hi, It saves it somewhere in C:\Documents and settings\UserName\LocalSettings\Application Data \Your Application Name .Exe XXXXXXXXXXXXXXXXXXXXXXXXXXX\VersionNumber\user.config Try search *.config in your documents and settings and u will find it. That's because .Net wants to save Config settings for each Windows user. so it does not touch the application.config file that can be shared between many users. That happens even u don't set the Build action to Embedded Resource wich is not logic because the config file must not be embedded in the exe. HTH. Hayder Marzouk

    C# csharp hardware question learning

  • deleting an sql database
    H Hayder Marzouk

    Hi, When u cannot delete a database that means that a connection to the database is still alive. - If u want to delete it from SQL Server Entreprise manager, do the following : 1- Right click on the database 2- Choose All tasks \ Detach database 3- U can see the number of connections to the database. Click on the Clear button to force open connections to disconnect. 4- Do not detach the database but click on cancel and now u can delete the database. - If u are deleting the database from SQL Query Analyzer be sure to be not connected on the database to delete. Choose the master database in the combobox. To delete the database just execute the query : Drop database YourDatabase. - If ure using .net to delete the database. U must turn off Pooling in your connection strings. That's because even u close all connections by using Connection.Close() method, connections still open for performance reasons. HTH.

    Database

  • Synchronizing Sql 2000 database. Need help.
    H Hayder Marzouk

    Hi, U can use the Replication feature built in SQL Server 2000. Here a goog article about it : http://www.devarticles.com/c/a/SQL-Server/Replication-SQL-Server-2000--Part-1/[^] HTH

    Database
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups