Beispiel #1
0
        public void LoadTop(FlowLayoutPanel fpnl, string str)
        {
            fpnl.Controls.Clear();
            DataTable data = Data.Instance.loadTop(str);

            foreach (DataRow item in data.Rows)
            {
                ucTaiKhoan uc = new ucTaiKhoan(this);
                uc = InfoUc(item["id"].ToString(), item["username"].ToString(), item["isactive"].ToString());
                if (item["isduocban"].ToString() == "co")
                {
                    uc.picBan.Visible = uc.picHuy.Visible = true;
                }
                fpnl.Controls.Add(uc);
            }
        }
Beispiel #2
0
        ucTaiKhoan InfoUc(string id, string username, string hoatdong)
        {
            ucTaiKhoan uc = new ucTaiKhoan(this);

            uc.lbID.Text   = id;
            uc.lbUser.Text = username;
            if (hoatdong == "co")
            {
                uc.bunifuToggleSwitch1.Value = true;
            }
            else
            {
                uc.bunifuToggleSwitch1.Value = false;
            }
            return(uc);
        }
Beispiel #3
0
        public void loadTaiKhoan()
        {
            fpnlItem.Visible = true;
            fpnlItem.Controls.Clear();
            panel2.Controls.Clear();
            DataTable data = Data.Instance.GetTaiKhoan();

            foreach (DataRow item in data.Rows)
            {
                ucTaiKhoan uc = new ucTaiKhoan(this);
                uc = InfoUc(item["id"].ToString(), item["username"].ToString(), item["isactive"].ToString());
                if (item["isduocban"].ToString() == "co")
                {
                    uc.picBan.Visible = uc.picHuy.Visible = true;
                }
                fpnlItem.Controls.Add(uc);
            }
        }