protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 1) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { DDLAreaType.DataSource = bll.GetType("AreaFact"); DDLAreaType.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 1) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { int id = int.Parse(Request.QueryString["ID"]); DDLAreaType.DataSource = bll.GetType("AreaFact"); DDLAreaType.DataBind(); AreaFactModel areafact = afbll.GetAreaFactByID(id); txtFactName.Text = areafact.FactName; txtMainHead.Text = areafact.MainHead; DDLAreaType.SelectedValue = areafact.TypeID.ToString(); txtTelphone.Text = areafact.Tel; ftbMemo.Text = areafact.Memo; } } }