예제 #1
0
        protected void ibDeleteInfo_Click(object sender, ImageClickEventArgs e)
        {
            //удаление созданного пользователем набора фильтров
            string sId = ddProfiles.SelectedValue;

            ListViewProfile.DeleteCustomProfile(ClassName, sId, _placeName);

            //ListViewProfile[] mas = ListViewProfile.GetProfiles(ClassName, _placeName, Mediachase.IBN.Business.Security.CurrentUser.UserID);
            //if (mas.Length == 0)
            //    throw new Exception("ListViewProfiles are not exist!");
            //SetProfileName(_pc, ClassName, mas[0].Id);

            SetProfileName(_pc, ClassName, GetFirstAvailableListViewProfile(ClassName));
            this.Page.Response.Redirect(this.Page.Request.RawUrl, true);
        }
예제 #2
0
        protected void grdMain_RowCommand(object source, DataGridCommandEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            if (e.CommandName == ConstDeleteCommand)
            {
                string id = e.CommandArgument.ToString();
                ListViewProfile.DeleteCustomProfile(ClassName, id, PlaceName);
            }
            else if (e.CommandName == ConstResetCommand)
            {
                string id = e.CommandArgument.ToString();
                //TODO - reset
            }

            CHelper.RequireDataBind();
        }