示例#1
0
        public User SelectUser(string _Username, string _Password)
        {
            List<SqlParameter> paramList = new List<SqlParameter>();
            SqlParameter param = new SqlParameter();
            param = new SqlParameter("@Username", SqlDbType.NVarChar);
            param.Value = _Username.Replace("'", "''");
            paramList.Add(param);
            param = new SqlParameter("@Password", SqlDbType.NVarChar);
            param.Value = _Password.Replace("'", "''");
            paramList.Add(param);


            SqlDataReader rd = null;
            rd = dbHelper.ExecuteQuery("GetUser", paramList);
            if (rd.Read())
            {
                User user = new User(rd.GetInt32(0), rd.GetString(1), rd.GetString(2), rd.GetString(3), rd.GetString(4));
                rd.Close();
                return user;

            }
            else
            {
                rd.Close();
                return null;
            }
        }
示例#2
0
        public Login()
        {
            InitializeComponent();
            busCommon = new BusCommon();
            busUser = new BusUser();
            user = new User();

        }
示例#3
0
        public SellMedicine(User currentUser)
        {
            InitializeComponent();
            busUser = new BusUser();
            busThuoc = new BusThuoc();
            busBenhNhan = new BusBenhNhan();
            busHDX = new BusHDX();

            this.currentUser = currentUser;
            IDUser = currentUser.IDUser;

            this.ApplLoad();
        }
示例#4
0
 public QuanLy(User currentUser)
 {
     InitializeComponent();
     busUser = new BusUser();
     busSys = new BusSystem();
     busHDX = new BusHDX();
     busNT = new BusNhomThuoc();
     busThuoc = new BusThuoc();
     busNSX = new BusNSX();
     busDVT = new BusDVT();
     busNNP = new BusNPP();
     busHDN = new BusHDN();
     arrCTHDN = new ArrayList();
     this.currentUser = currentUser;
     IDUser = currentUser.IDUser;
 }
示例#5
0
 public ArrayList SelectAllUser()
 {
     SqlDataReader rd = dbHelper.ExecuteQuery("getAllUsers");
     ArrayList arrUser = new ArrayList();
     while (rd.Read())
     {
         User user = new User(rd.GetInt32(0), rd.GetString(1), rd.GetString(2), rd.GetString(3), rd.GetString(4));
         arrUser.Add(user);
     }
     rd.Close();
     return arrUser;
 }