protected void LoadZones() { //try //{ // dropPhongBan.SelectedValue = IDPhongBan.ToString(); // dropPhong.SelectedValue = IDPhongBan.ToString(); //} //catch (Exception) //{ // dropPhongBan.SelectedIndex = -1; // IDPhongBan = 0; //} lstCongViec.Items.Clear(); QuanLyCongViecKTXVaPSController.LoadCongViec(lstCongViec.Items, ConvertUtility.ToInt32(dropTrungTam.SelectedValue), IDPhongBan, 1, ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue)); lstCongViec.Items.Insert(0, new ListItem("Root", "0")); dropCongViecKPI.Items.Clear(); foreach (ListItem item in lstCongViec.Items) { dropCongViecKPI.Items.Add(new ListItem(item.Text, item.Value)); } MiscUtility.SelectItemFromList(lstCongViec, zoneSelected.ToString()); DataTable dt = QuanLyCongViecKTXVaPSController.GetAllByParentIDNew(zoneSelected, ConvertUtility.ToInt32(dropTrungTam.SelectedValue), IDPhongBan, 1, ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue)); dgrCongViec.DataSource = dt; dgrCongViec.DataBind(); LoadInfo(zoneSelected); }
private void LoadCommandData() { if (txtID.Text != string.Empty) { CommandInfo curCommand = CommandController.GetCommandByLang(ConvertUtility.ToInt32(txtID.Text)); if (curCommand != null) { txtID.Text = curCommand.CommandID.ToString(); txtParams.Text = curCommand.CommandParams; //txtName.Text = curCommand.CommandName; txtUrl.Text = curCommand.CommandUrl; MiscUtility.SelectItemFromList(dropParent, curCommand.CommandParentID.ToString()); MiscUtility.SelectItemFromList(dropCommandKeys, curCommand.CommandKey); MiscUtility.SelectItemFromList(dropIndex, curCommand.CommandOrder.ToString()); chkEnable.Checked = curCommand.CommandEnable; chkVisble.Checked = curCommand.CommandVisible; chkIsSuperUser.Checked = curCommand.IsSuperUser; DataTable dtCommandByLang = CommandController.GetCommandByCmdId(ConvertUtility.ToInt32(txtID.Text)); dgrNameFollowLang.DataSource = builddata(dtCommandByLang); dgrNameFollowLang.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { userId = ConvertUtility.ToInt32(Request.QueryString["uid"]); if (!CurrentUser.IsAdmin) { pnlAdmin.Visible = false; } if (!CurrentUser.IsSuperAdmin) { pnlSuperadmin.Visible = false; } else if (CurrentUser.IsSuperAdmin) { pnlSuperadmin.Visible = true; pnlAdmin.Visible = true; } if (!Page.IsPostBack) { PortalController.LoadPortals(lstPortal.Items); UserInfo user = UserController.GetUser(userId); if (user == null) { this.btnUpdate.Visible = false; this.btnManagePassword.Visible = false; return; } lblUsername.Text = user.Username; txtAddress1.Text = user.Address1; txtAddress2.Text = user.Address2; MiscUtility.SelectItemFromList(dropCity, user.City.ToString()); MiscUtility.SelectItemFromList(dropCountry, user.Country.ToString()); txtDisplayName.Text = user.DisplayName; txtEmail.Text = user.Email; txtFirstName.Text = user.FirstName; chkIsSuperAdmin.Checked = user.IsSuperAdmin; chkIsAdmin.Checked = user.IsAdmin; txtLastName.Text = user.LastName; txtMobile.Text = user.Mobile; txtTel.Text = user.Tel; txtZipCode.Text = user.ZipCode; DataTable dtUserPortals = PortalController.GetPortals(user.UserID, AppEnv.GetLanguage()); foreach (DataRow row in dtUserPortals.Rows) { if (lstPortal.Items.FindByValue(row["PortalID"].ToString()) != null) { lstPortal.Items.FindByValue(row["PortalID"].ToString()).Selected = true; } } //dropPartner.DataSource = PartnerController.GetPartners(); //dropPartner.DataBind(); //if (user.PartnerID != 0) //{ // dropPartner.SelectedValue = user.PartnerID.ToString(); //} } }
protected void Page_Load(object sender, EventArgs e) { if (!CurrentUser.IsSuperAdmin) { Response.Redirect(AppEnv.ADMIN_CMD); } controlId = ConvertUtility.ToInt32(Request.QueryString["cid"]); moduleId = ConvertUtility.ToInt32(Request.QueryString["mid"]); ModuleInfo module = ModuleController.GetModule(moduleId); ModuleControlInfo moduleControl = ModuleControlController.GetModuleControl(controlId); if (moduleControl == null) { this.btnDelete.Visible = false; } if (module == null) { module = ModuleController.GetModule(moduleControl.ModuleID); } if (module != null) { lblModuleName.Text = module.ModuleName; txtControlIcon.fpUploadDir = CheckPath(module); } if (!Page.IsPostBack) { if (module != null && module.ModuleFolder.Length > 0) { GetFiles(Server.MapPath("/"), Server.MapPath(module.ModuleFolder)); dropPath.DataSource = lstFile; dropPath.DataBind(); } MiscUtility.FillIndex(dropControlOrder, 30, 1); chkControlType.DataSource = RoleController.GetRoles(); chkControlType.DataBind(); if (moduleControl == null) { return; } lblModuleName.Text = ModuleController.GetModule(moduleControl.ModuleID).ModuleName; txtControlName.Text = moduleControl.ControlName; txtControlDescription.Text = moduleControl.ControlDescription; txtControlKey.Text = moduleControl.ControlKey; MiscUtility.SelectItemFromList(dropPath, moduleControl.ControlPath); txtControlIcon.Text = moduleControl.ControlIcon; txtControlDescription.Text = moduleControl.ControlDescription; chkControlHeader.Checked = moduleControl.ControlHeader; MiscUtility.SelectItemFromList(dropControlOrder, moduleControl.ControlOrder.ToString()); string[] roleList = (moduleControl.ControlRole != null)?moduleControl.ControlRole.Split("|".ToCharArray()):null; MiscUtility.SelectItemFromList(chkControlType, roleList); } }