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

highjo

@highjo
About
Posts
36
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help! implementing user session timeout in winform c#2.0
    H highjo

    hello thanks for the reply and sorry for the late response.i didn't check my mail lately and thought(sorry :)) this subject doen't interest anybody.I'm not sure i understand what you are trying to explain but i have a good news.My same codes is working silly enough from me i put the check.stop(); after calling the loginform.so i did call it before and reset the winforms.forms.timers object on formclosing too.i did some tweak to it.that part was changed to if (!usersession.SessionAlive) { check.Stop(); if(logininstance == null) logininstance = new LoginForm(); logininstance.ShowDialog(); } thanks a lot! ;)

    eager to learn

    C# csharp help career

  • Help! implementing user session timeout in winform c#2.0
    H highjo

    Hello fellas! i'm trying to built an implementation of user session which timeout after a certain pediod. I have a class usersession which does the job.    <pre>using System.Timers; public class usersession {       private static bool sessionalive;       private static Timer usertimer;       public static bool SessionAlive       {             get { return sessionalive; }             set { sessionalive = value; }       }       public static void   BeginTimer()       {             try             {                SessionAlive = true;                   //usertimer.Start();                usertimer = new Timer(int.Parse(ConfigurationManager.AppSettings["sessiontime"].ToString()));                   usertimer.Enabled = true;                usertimer.AutoReset = false;                  usertimer.Elapsed += new ElapsedEventHandler(DisposeSession);             }             catch (Exception ex)             {                   return;             }       }       private static void   DisposeSession(object source, ElapsedEventArgs e)       {             try             {                   SessionAlive = false;             }             catch (System.Exception ex)             {                   return;     &nbs

    C# csharp help career

  • definivelty confused about sqlite as embedded database
    H highjo

    i just wanted to precise that i can connect to the database though the server explorer.and there is no table created from visual studio queries.but the table's data can be displayed on a grid when i run it.weird!! hanging on your replies, i can't find anything meaningful to my case.thanks

    eager to learn

    C# php database sqlite question csharp

  • definivelty confused about sqlite as embedded database
    H highjo

    Hello good fellas I'm struggling since this morning about this sqlite thing.after reading some good tutorials i decided to   use it as my embedded database in my winform application. i downloaded SQLite-1.0.61.0-setup that install the system.datal.sqlite for me and downloaded the firefox plugin sqlite manager and another management tool called wxSQLitePlus found <a href="http://cfred.free.fr/wxsqliteplus.php">here</a> based on this tutorials found <a href="http://decoding.wordpress.com/2009/01/14/using-sqlite-with-net/">here</a> (just being explicit) Hoping i'm not posting any stupid stuff that will be ignored, here are my 2 challenges. the first challenge is that i can't reference the database inside a folder let'say database i have exception "Unable to open the database file".my app.config is as follow <code><connectionStrings>       <add name="embcon" connectionString="Data Source=database\iagency.db;Version=3;"/>    </connectionStrings></code> but if the iagency.db is inside the root folder there is no problem at all.app.config like <code><connectionStrings>       <add name="embcon" connectionString="Data Source=iagency.db;Version=3;"/>    </connectionStrings></code> the second chalenge is that object created via tools such as either firefox plugin or wxsqlite+ cannot be queried inside visual studio 2005 that i'm using.if it's a table when queried , i have an excetion the object doesn't exist even though both tools displays the same data. and inversly table created by queries inside visual studio cannot be viewed by the tools. so what's the deal? is it a memory stuff or i'm just missing some points? can enybody explain what is happening ?Thanks for reading.

    eager to learn

    C# php database sqlite question csharp

  • Insert into child table in nhibernate 2.1.0
    H highjo

    hello good gurus.I've hesitated a lot before posting here coz i've been doing research(some of the articles here are too advanced for me :) ) but righ now i don't have the choice.it' seems that forum.hibernate.org is pointing to jboss for some reasons i don't know so please... i'm new to nhibernate and i wanted to do a small application with 3 tables(i use 2 for now).table currency and table country here are the mapping files //country table mapping //currency table mapping the many to one relationship that country hold is an attribute of the type Currency in the country persistence class.Now while my test can_add_currency and can_add_country succeeded(i export the schema) i have null value in the table country on the field currency_id. here is the test code [Test] public void can_add_new_country() { CountryManager cm = new CountryManager(); Country country = new Country(); //country.CurrencyId = CurrencyManager.GetCurrencyById(1); country.CurrencyId = new CurrencyManager().GetCurrencyById(1

    C# java database xml

  • webservice async call vs backgroundworker?
    H highjo

    Thanks vitaliy.Your suggestion helps but for some reason the progress bar is not updated at all since i have only one web service per form.Thank any way.

    eager to learn

    C# css visual-studio design beta-testing help

  • webservice async call vs backgroundworker?
    H highjo

    hello guys! i'm having some issue figuring out what to use for my application.i'm developing a desktop application pulling most of its data from websevices.I display the data which can be huge with a datagrid. i have a webservice datasource and bind that datasource to the grid. Now i want to give better user experience and feedback to users.The method i found online for the backgroundworker with the progressbar is not satisfactory enough.Actually they use loops to give the reportprogress the percentage to show while in my implementation i can't put webservice calling into a loop.I'll like to use the webservice async call with the progress bar but then i don't know how to update the progress bar to display the appropiate percentage.So if anybody can point me to a ressource or a workarround i'll be more than glad.I 'm open to suggestion so please let me know what you think. Thanks for reading this.

    eager to learn

    C# css visual-studio design beta-testing help

  • Challenge manipulating combobox selectedvalue and selectedvaluechanged
    H highjo

    Thanks guys for replying this post.Really apreciated it.The method that worked for me is the one suggested by deep@Pune.Thanks

    eager to learn

    C# database tutorial question

  • Challenge manipulating combobox selectedvalue and selectedvaluechanged
    H highjo

    Hi! i know people have asked a lot about comboboxes but it's not really about how to get the value or index or whatever.Let me explain.it's users access management application with users, roles and rights: i have a form editRight with 2 combobox cmbUsers to list users and cmbroles to list role of each users and 3 listboxes.let's pause here on load event i fill users combobox with users private void EditRight_Load(object sender, EventArgs e) { try { //Load the user list in the dt_users dataset.dt_users and dt_roles are declare as global variables dt_users = UserManager.FindAll().Tables[0]; //set the combobox cmbUsers datasource cmbUsers.DataSource = dt_users.DefaultView; //set display member and value member cmbUsers.DisplayMember = "user_name"; cmbUsers.ValueMember = "user_id"; CallFillRoleCombo((int)cmbUsers.SelectedValue); } catch (System.Exception ex) { MessageBox.Show(ex.Message); } } private void CallFillRoleCombo(int uid) { try { //load users roles into dt_roles database dt_roles = UserRoleManager.FindByUser(uid).Tables[0]; //set combobox datasource cmbroles.DataSource = dt_roles.DefaultView; cmbroles.DisplayMember = dt_roles.Columns[2].ToString(); cmbroles.ValueMember = dt_roles.Columns[1].ToString(); } catch (System.Exception ex) { MessageBox.Show(ex.Message); } } private void cmbUsers_SelectedValueChanged(object sender, EventArgs e) { CallFillRoleCombo((int)cmbUsers.SelectedValue); } when i run the code its throws exception:Object reference not set to an instance of an object.It seems that its calling the cmbUsers_SelectedValueChanged eventhandler when setting the display member of the cmbUsers combobox. How to work around it?Thank you for reading this.

    eager to learn

    C# database tutorial question

  • random selection of business object classes
    H highjo

    Hello guys! happy new year to you all.I'm about to do something while having no idea about how to do it nor where to start.I'm using asp.net/c# 2.0 and code author as ORM for a web site that have registered users.In order to collect information from those users, this scenario has been ussued:after a user logged, in there should be a pop up(modal dialog) that will occasionally ask for information where in the table in the database, that information field is empty.ok supposing i have 3 tables covering the whole information needed.The ORM generated business classes so i thought i need a kind of system that will take the user guid and check in the database for empty field and prompt for it to be filled.It should ask only one question after login the whole day and not every day.First i'll like to start with how to pick the object of one of the 3 classes corresponding to 3 tables in the database and performing the checking.Thanks for reading this and thanks in advance for your solution.

    eager to learn

    ASP.NET csharp asp-net database business tutorial

  • Matches from 2 tables
    H highjo

    thanks for your answer.it's makes me see other things that did appeared to me at first.i'll get back to you

    eager to learn

    Database help tutorial question

  • Matches from 2 tables
    H highjo

    hello guys ! i need a report where i need data from two tables.here is the scenario.i have a table Ip-to-country which contains most ipnumbers ranges and th country which i appended a new field for iddcode.the second table is text_status tables which contains field like mobilenumber and other stuffs not needed for now.I want to do a report where it would be easier to have iddcode field in the text_status table which would be the iddcode of the mobilenumber. what is chalenging to me is how to insert the corrresponding iddcode for the mobilenumber. knowing that iddcode are from 1 digits to 4. ex 1 for us, 44 for uk, 359 for bulgaria and 1441 for bermuda. as you can see bermuda and us start by one.so i'm confused about the way to go to know for which country a mobilenumber is for.thanks for reading this. Ps: i even tried to substring the mobilenumber but at the end the problem is still the same. Need some help please.thanks

    eager to learn

    Database help tutorial question

  • Custom Membership Api.Im confused the more i search on the net
    H highjo

    hello fellas! "Please i know this is a recurrent question. but i need some explanation.Please" i'm a bit new and on probation period.Been giving a project to build a site registration system with Membership API.Please remember i'm new so please be easy.After reading atricles from the net and post from forums to forums. I made a change to the database with the aspnet_regsql.exe tool and stuff.All i need to do is to be able to store additional users information in another table create for that. After reading this cool article from http://www.devx.com/codemag/Article/34492/0/page/1 i decided to go for this model since i have only to care about consist data in my additional table. that model constist of inheriting classes like MembershipProvider, MembershipUser, etc and create custom functions for exemple creauser which will call the membership createuser then return the UserId to then use it to insert to my additional table.The fact is after reading those articles with differents approaches really confuses me more.Added the fact that i have done anything with security namespace. So far it obvious to create my inheriting classes like.MySqlMembershipProvider, MyMembershipUser and MyMembership(for my methods create or GetUser).But from reading people creates classes like TheirConfiguration TheirProviderCollection.it confuses me.Can any one tell me which classes i really need for my schema ie one additional table?thanks

    eager to learn

    ASP.NET database question asp-net com security

  • Extending membership class.URgent!!!
    H highjo

    i' m sure for you guys those things are piece of cake, and you can easily look down on beginnners and tell them that what they are asking for is just ennoying.I can't find a ressource and i' not asking for you guys to do the whole thing for me.I you know something or where i can find it why don't you just say it.what would it cost you? guys?after all this is part of a community where we can help each other not necessaryly by correcting a code of give algorithms.I'm on probation pediode somewher this is the porject i've being given to.i lack time that's all. OK. If i want to do this thing by using my user interface and extended database schema, i know i need to 1. create my own membership provider(what i did in the web.config but doudting if i should create that class too) 2. create my MembershipUser class which extend the .NET MembershipUser(so far i just know about the constructor. how to create my own constructor with the base one is not clear for me) 3. create my own membership class which will extend the >net Membership class. and extend major methods.Just need to know where i' m going before i start.That's why i need a sample. i'm not a guru as you guys. if anyonne feels to give me some clues it will be great.thanks!

    eager to learn

    ASP.NET com json help question

  • Extending membership class.URgent!!!
    H highjo

    after a long analysis i opt for exentding the membership api and i found a good tuto on http://www.devx.com/codemag/Article/34492 what suit my application.i would use my interface rather but the problem is i can't access the code because the original code is on www.code-magazine.com which is unaccessible since saturday what is terrible for me.cause i spent too much time deciding and i need to have the big picture of that tuto before i start.if anyone has downloaded the code before please let me know.please this is pretty urgent!!!

    eager to learn

    ASP.NET com json help question

  • update database from a querystring data
    H highjo

    hi guys! briefly, i have an application which use an api for its interaction with another plattform.at this point a need to update my database with data from a call from that api which uses querystring to pass data.Simple and fairky straight foward but couldn't suceeded.and the funniest is it doesn't throw any error. tried for 3 days now to find out where the problem is without any changes.i'm sure it just a little thing but can't see it.i would like to ask for help on this. here is my codes the page call.aspx that the api use as callback to pass the data is. protected void Page_Load(object sender, EventArgs e) { gid = Request["Id"]; numbstatus = Request["status"]; if(apimsgid != null && numbstatus != null) { //misc.logerr("callback data :" + gid + " : " + numbstatus); //this line up was to check if the function receives the parameters gid = gid.Trim(); numbstatus= numbstatus.Trim(); if (gid != "" && numbstatus != "") { DatabaseLayer dlayerobj = new DatabaseLayer(); Response.Write(dlayerobj.UpdateStatusByApiId(gid, numbstatus)); } } } } now the function in the database layer is : public string UpdateStatusByApiId(string theapiid, string thestatusnum) { string status = convertStatus(thestatusnum); //the convertStatus method gives a normal name as ok, or no for diferenttype of numbers from the api.no problem here try { SqlCommand updatecmd = new SqlCommand(); updatecmd.CommandType = CommandType.Text; updatecmd.Connection = con; //the connection con is created in the constructor. updatecmd.CommandText = "update TState set DStatus =@stat where Gid=@apid"; updatecmd.Parameters.Add("@stat", SqlDbType.VarChar, 20).Value = status; updatecmd.Parameters.Add("@apid", SqlDbType.VarChar, 128).Value = theapiid; updatecmd.ExecuteNonQuery(); return theapiid + " : " + status; this also to see if the fucntion receives its param well and it receives it } catch (Exception ex) { misc.logerr(ex.ToString()); return ex.ToString(); } } please let me know cause i'm stacked here and can't move forward without this.. ps:can anyone tell me the best practice testing in debugging.i m

    ASP.NET help database testing beta-testing json

  • asp.net with jquery
    H highjo

    hello there! noone has something to share with me? a little help? need this help to move forward.thanks for replying.if a part is not clear just tell me and i'll be glad to explain.thanks :(

    eager to learn

    ASP.NET question csharp javascript asp-net algorithms

  • asp.net with jquery
    H highjo

    Hi! guys i'm using jquery to do some interesting interaction in a sms sending web application.from a textbox where the user should write the phone number(numbers are comma separated) after writing a comma the application extract that number and send it through jquery ajax function for number validity.so far everything is cool even though i know that my function extracting is not perfect(coz it becomes buggy when the first comma is pressed and then the number is edited if somebody fell to give better algorithm i would be pleased).the problem arises when collecting the response from the webform.the response which a boolean is actually sent with this Response.write(response).when i display it from an alert function is dispay something like

    true //if it's correct or false if not and something like this

    Untitled Page
    

    how do i extract actually the value true or false. my code is not seeing the true but always execute the statment in case it's false even though i have it true and displayed as described in my checkout alert function here are my codes. this is the one using the jquery ]]> ]]> Untitled Page #vall { color: #0000FF; width:30px;float:left;margin-left: 10px} #err { color: #FF0000; width:30px;float:left;margin-left: 10px} $().ready(function(){ var i = -1; $('#txtNumbers').keyup(function(e){ var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; if(key== 188) { var y = $(this).val(); if(y.length!= 0 ) { var n = y.substring(i+1,y.lastIndexOf(',')); i = y.las</x-turndown>

    ASP.NET question csharp javascript asp-net algorithms

  • Need Solution for a so simple XML Data binding!though can figure out [modified]
    H highjo

    ok bro it's already there. thanks for helping

    eager to learn

    ASP.NET csharp javascript php asp-net wpf

  • Need Solution for a so simple XML Data binding!though can figure out [modified]
    H highjo

    got ya! thanks bro! :-\

    eager to learn

    ASP.NET csharp javascript php asp-net wpf
  • Login

  • Don't have an account? Register

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