Exemplo n.º 1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            int id = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (id > 0)
            {
                DinhNghiaInfo info = DinhNghiaController.GetInfo(id);

                if (info != null)
                {
                    txtTen.Text              = info.Ten.ToString();
                    txtMoTa.Text             = info.MoTa;
                    dropTypeOf.SelectedValue = info.Code.ToString();
                }
            }
            else
            {
                btnUpdate.Visible = false;
            }
            dgrChucDanh.DataSource = DinhNghiaController.GetAll(dropTypeOf.SelectedValue);
            dgrChucDanh.DataBind();
        }