Thanks for the reply Mycroft. The way you described it in your post sounds like what I am looking for, would you know the name of the project? Thanks
An Enigma
Posts
-
multi-user winforms application -
multi-user winforms applicationWoah, this is too much unknown info for me there mate. :doh: The change password class changes the password for the user logged in. Are there any examples I can look at for what you are saying?
-
multi-user winforms applicationHaha, its only in the early stages of development lads, just like I am a novice at this. Could you guys provide me with examples as to how I can do it better. PS. I am creating a winforms application only, no ASP.NET or nothing. Its a standalone app. Thanks
-
multi-user winforms applicationHi, What I am trying to achieve is that in the winforms application I am creating (a journal one), it allows multiple users to register/login and add/edit/delete their entries, my questions are: 1. How do I create the application that allows different users to login? 2. Once logged in, how will the application know which user is which and to update the logged in user's particular entries? Like in PHP you can use sessions do this easily, but how to do it in C#? I have created a simple register and login form right now, but the difference of user is my problem, I am using the SqlceDataReader but I can only login with the last user that exists in the DB and if a change that user's password, every user's password in the db is changed to that particular password. Is it better to use datasets? Here are the relevant bits from my code for both winforms: Main form:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlServerCe;/// <summary> /// The main entry point for the application. /// </summary> \[STAThread\] static void Main() { MainForm frmLogin = new MainForm(); frmLogin.ShowDialog(); } private void btnLogin\_Click(object sender, System.EventArgs e) { if (txtuser.Text.Equals("")) { MessageBox.Show("Please Enter User Name", "Organiser", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (txtpwd.Text.Equals("")) { MessageBox.Show("Please Enter Password", "Organiser", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } int count = 0; con = new SqlCeConnection(); con.ConnectionString = "Data Source=Database.sdf"; com = new SqlCeCommand("select \* from \[User\]", con); con.Open(); if (con.State == ConnectionState.Open) { SqlCeDataReader dtr = com.ExecuteReader(); while (dtr.Read()) { us = dtr\["username"\].ToString(); ps = dtr\["password"\].ToString(); if (us == txtuser.Text && ps == txtpwd.Text) { count = 1;
-
Calendar DayView helpMy intention wasnt to ask a direct question to Ertan, I referenced his work so that somebody can have a look at his code, since I am very new to C#. I dont know which part of the code to modify since he uses a list to store the info in. Thanks
-
Calendar DayView helpHi, This question is related to the Calenday Dayview control done by Ertan Tike (Calendar DayView Control[^]) My question is how do I modify it that it stores the title, startdate, enddate, colors and so forth in a SQL server DB rather than in the list? Any help will be much appreciated. Thanks
-
SQL exceptionHi, First time programming JSP as I have to do it for an uni assignment. Basically I have created a register HTML and JSP page:
Register Form Hotel Account ============= ACTION="Register" METHOD="POST"> Customer Name: Customer No: Customer Type: Customer Comp: Customer Address: Nationality: Passport No: Travel Agency: Password:
From there what I am trying to do is insert all the data gathered from the inputs into an DB. Now I have decided to do 4 Java classes and 1 servlet inorder to achieve this. I have created the account class to use the getter and setter methods:/* * Account.java * * Created on October 14, 2008, 9:45 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ /** * * */ public abstract class Account { String CustomerName, CustomerType, CustomerComp, CustomerAddress, Nationality, PassportNo, TravelAgency, Password; int CustomerNo; /** * default constructor */ public Account() { CustomerName = ""; CustomerNo = 0; CustomerType = ""; CustomerComp = ""; CustomerAddress = ""; Nationality = ""; PassportNo = ""; TravelAgency = ""; Password = ""; } /** * Constructor with parameters * @param AccNo int * @param cName String * @param cAddress String * @param bal String * @param sDate Date */ public Account(String cName, int cNo, String cType, String cComp, String cAdd, String n, String pNo, String tAgency, String pass) { CustomerName = cName; CustomerNo = cNo; CustomerType = cType; CustomerComp = cComp; CustomerAddress = cAdd