protected void btnSaveSPClientChannelSettingFilters_Click(object sender, AjaxEventArgs e) { try { SPClientChannelSettingFiltersWrapper obj = SPClientChannelSettingFiltersWrapper.FindById(int.Parse(hidId.Text.Trim())); obj.FilterValue = cmbFilterProvince.SelectedItem.Value; //obj.IsEnable = this.chkIsEnable.Checked; //obj.ClientChannelSettingID = this.txtClientChannelSettingID.Text; SPClientChannelSettingFiltersWrapper.Update(obj); winSPClientChannelSettingFiltersEdit.Hide(); } catch (Exception ex) { Coolite.Ext.Web.ScriptManager.AjaxSuccess = false; Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = "错误信息:" + ex.Message; return; } }
public void Show(int id) { try { SPClientChannelSettingFiltersWrapper obj = SPClientChannelSettingFiltersWrapper.FindById(id); if (obj != null) { if (string.IsNullOrEmpty(obj.FilterValue)) { this.cmbFilterProvince.SetValue(obj.FilterValue); } ; //this.chkIsEnable.Checked = ValueConvertUtil.ConvertNullableValue<bool>(obj.IsEnable); //this.txtClientChannelSettingID.Text = obj.ClientChannelSettingID.ToString(); hidId.Text = id.ToString(); winSPClientChannelSettingFiltersEdit.Show(); } else { ScriptManager.AjaxSuccess = false; ScriptManager.AjaxErrorMessage = "错误信息:数据不存在"; return; } } catch (Exception ex) { Coolite.Ext.Web.ScriptManager.AjaxSuccess = false; Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = "错误信息:" + ex.Message; return; } }
public void DeleteRecord(int id) { try { SPClientChannelSettingFiltersWrapper.DeleteByID(id); ScriptManager.AjaxSuccess = true; } catch (Exception ex) { ScriptManager.AjaxSuccess = false; ScriptManager.AjaxErrorMessage = string.Format(ex.Message); return; } }
protected void storeSPClientChannelSettingFilters_Refresh(object sender, StoreRefreshDataEventArgs e) { int recordCount = 0; string sortFieldName = ""; if (e.Sort != null) { sortFieldName = e.Sort; } int startIndex = 0; if (e.Start > -1) { startIndex = e.Start; } int limit = this.PagingToolBar1.PageSize; int pageIndex = 1; if ((startIndex % limit) == 0) { pageIndex = startIndex / limit + 1; } else { pageIndex = startIndex / limit; } List <SPClientChannelSettingFiltersWrapper> datas; if (ChannleClientID > 0) { datas = SPClientChannelSettingFiltersWrapper.FindAllByOrderByAndFilterAndClientChannelSettingID(sortFieldName, (e.Dir == SortDirection.DESC), pageIndex, limit, SPClientChannelSettingWrapper.FindById(ChannleClientID), out recordCount); } else { datas = SPClientChannelSettingFiltersWrapper.FindAllByOrderBy(sortFieldName, (e.Dir == SortDirection.DESC), pageIndex, limit, out recordCount); } storeSPClientChannelSettingFilters.DataSource = datas; e.TotalCount = recordCount; storeSPClientChannelSettingFilters.DataBind(); }
protected void btnSaveSPClientChannelSettingFilters_Click(object sender, AjaxEventArgs e) { try { SPClientChannelSettingFiltersWrapper obj = new SPClientChannelSettingFiltersWrapper(); obj.ParamsName = "province"; obj.FilterType = "eq"; obj.FilterValue = this.cmbFilterProvince.SelectedItem.Text.Trim(); obj.IsEnable = true; obj.ClientChannelSettingID = SPClientChannelSettingWrapper.FindById(ChannleClientID); SPClientChannelSettingFiltersWrapper.Save(obj); winSPClientChannelSettingFiltersAdd.Hide(); } catch (Exception ex) { Coolite.Ext.Web.ScriptManager.AjaxSuccess = false; Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = "错误信息:" + ex.Message; } }