示例#1
0
        private void butAddLanguage_Click(object sender, EventArgs e)
        {
            int langID = Int32.Parse(ddlLanguageList.SelectedValue);

            LangAPI.SaveShowAdmin(langID, true, UserContext.UserID);

            Bind_LanguageDropDown();
            Bind_LanguageGrid();
        }
示例#2
0
        private void butSave_Click(object sender, EventArgs e)
        {
            foreach (RepeaterItem rp in grdLanguageList.Items)
            {
                Lang     lang     = (Lang)rp.DataItem;
                CheckBox chkUser  = (CheckBox)rp.FindControl("chkUser");
                CheckBox chkAdmin = (CheckBox)rp.FindControl("chkAdmin");


                int langID = Int32.Parse(chkUser.ToolTip);
                LangAPI.SaveShowUser(langID, chkUser.Checked, UserContext.UserID);

                if (chkAdmin.Checked == false)
                {
                    langID = Int32.Parse(chkAdmin.ToolTip);
                    LangAPI.SaveShowAdmin(langID, chkAdmin.Checked, UserContext.UserID);
                }
            }

            Bind_LanguageGrid();
            Bind_LanguageDropDown();
        }