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
A

An Enigma

@An Enigma
About
Posts
7
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • multi-user winforms application
    A An Enigma

    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

    C# csharp database question php winforms

  • multi-user winforms application
    A An Enigma

    Woah, 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?

    C# csharp database question php winforms

  • multi-user winforms application
    A An Enigma

    Haha, 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

    C# csharp database question php winforms

  • multi-user winforms application
    A An Enigma

    Hi, 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;
    
    C# csharp database question php winforms

  • Calendar DayView help
    A An Enigma

    My 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

    C# question database sql-server com sysadmin

  • Calendar DayView help
    A An Enigma

    Hi, 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

    C# question database sql-server com sysadmin

  • SQL exception
    A An Enigma

    Hi, 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

    Java java database html sales tools
  • Login

  • Don't have an account? Register

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