private void cbdanhmuc_SelectedIndexChanged(object sender, EventArgs e) { if (cbdanhmuc.SelectedValue.ToString().Trim() == "0001") { this.Width = 214; this.Height = 130; pncontrol.Controls.Clear(); uckhachhang uc = new uckhachhang(); pncontrol.Controls.Add(uc); } //if (cbdanhmuc.SelectedValue.ToString().Trim() == "0002") //{ // this.Width = 214; // this.Height = 100; // pncontrol.Controls.Clear(); // ucnhanvien uc = new ucnhanvien(); // pncontrol.Controls.Add(uc); //} //if (cbdanhmuc.SelectedValue.ToString().Trim() == "0003") //{ // this.Width = 214; // this.Height = 100; // pncontrol.Controls.Clear(); // ucxe uc = new ucxe(); // pncontrol.Controls.Add(uc); //} //if (cbdanhmuc.SelectedValue.ToString().Trim() == "0004") //{ // this.Width = 214; // this.Height = 250; // pncontrol.Controls.Clear(); // uchoadon uc = new uchoadon(); // pncontrol.Controls.Add(uc); //} }
public frmInAn(DTO_ResizeForm rz) { InitializeComponent(); _Load_Combobox(); DTO_ResizeForm rs = rz; originalHeight = rs.CHIEU_CAO; originalWidth = rs.CHIEU_DAI; cbdanhmuc.SelectedValue = rs.Index; if (cbdanhmuc.SelectedValue.ToString() == "0001") { pncontrol.Controls.Clear(); uckhachhang uc = new uckhachhang(); pncontrol.Controls.Add(uc); this.Width = 214; this.Height = 130; } }