public AppMilkTea(string text1, string text2, List <String> role) { InitializeComponent(); this.userName = text1; this.pass = text2; this.role = role; or = new Order(userName, pass); ql = new QuanLy(userName, pass); or.Dock = DockStyle.Fill; // pnDGV.Controls.Clear(); ql.AutoScaleMode = AutoScaleMode.None; or.AutoScaleMode = AutoScaleMode.None; pnDGV.Controls.Add(or); authorization(role); }
private void Show(BunifuThinButton2 btn) { ChangeBtn(btn); if (isQuanLy == true) { ql = new QuanLy(userName, pass); ql.AutoScaleMode = AutoScaleMode.None; ql.Dock = DockStyle.Fill; // pnDGV.Controls.Clear(); animator1.Hide(or); pnDGV.Controls.Add(ql); ql.Hide(); animator2.ShowSync(ql); isOerder = false; isThongKe = false; isQuanLy = false; } if (isOerder == true) { or = new Order(userName, pass); or.AutoScaleMode = AutoScaleMode.None; or.Dock = DockStyle.Fill; // pnDGV.Controls.Clear(); animator1.Hide(ql); pnDGV.Controls.Add(or); ql.Hide(); animator2.ShowSync(or); isOerder = false; isThongKe = false; isQuanLy = false; } if (isThongKe) { XtraReport1 report1 = new XtraReport1(userName, pass); report1.ShowPreviewDialog(); isOerder = false; isThongKe = false; isQuanLy = false; } }