public void SetGridViewNGData(string[] Data, bool AddLastRow = false) { if (AddLastRow == true) { if (GridViewControl.InvokeRequired) { GridViewControl.Invoke(new MethodInvoker(delegate() { GridViewControl.Rows.Add(Data); })); } else { GridViewControl.Rows.Add(Data); } } else { if (GridViewControl.InvokeRequired) { GridViewControl.Invoke(new MethodInvoker(delegate() { GridViewControl.Rows.Insert(0, Data); })); } else { GridViewControl.Rows.Insert(0, Data); } GridViewControl.Rows[0].Selected = true; } }
/// <summary> /// Sort columns in GridView. /// </summary> /// <param name="sender">Object GridView.</param> /// <param name="e">Event Arguments.</param> private void SortButton_Click(object sender, System.EventArgs e) { DataGridViewColumn newColumn = GridViewControl.Columns.GetColumnCount(DataGridViewElementStates.Selected) == 1 ? GridViewControl.SelectedColumns[0] : null; DataGridViewColumn oldColumn = GridViewControl.SortedColumn; ListSortDirection direction; if (oldColumn != null) { if (oldColumn == newColumn && GridViewControl.SortOrder == SortOrder.Ascending) { direction = ListSortDirection.Descending; } else { direction = ListSortDirection.Ascending; oldColumn.HeaderCell.SortGlyphDirection = SortOrder.None; } } else { direction = ListSortDirection.Ascending; } if (newColumn == null) { MessageBox.Show("Select a single column and try again.", "Error: Invalid Selection", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { GridViewControl.Sort(newColumn, direction); newColumn.HeaderCell.SortGlyphDirection = direction == ListSortDirection.Ascending ? SortOrder.Ascending : SortOrder.Descending; } }
protected void Page_Load(object sender, EventArgs e) { Analytics.AnalyticsManager manager = new Analytics.AnalyticsManager(Server.MapPath("~/bin/privatekey.p12"), "*****@*****.**"); //that's the number after the p in google analytics url //ps. you need to give your email account taken from the service access from the web control panel in google analytics manager.LoadAnalyticsProfiles(); //Place Profile Web ID manager.SetDefaultAnalyticProfile("80425770"); List <Analytics.Data.DataItem> metrics = new List <Analytics.Data.DataItem>(); metrics.Add(Analytics.Data.Session.Metrics.visits); metrics.Add(Analytics.Data.Session.Metrics.timeOnSite); metrics.Add(Analytics.Data.Adsense.Metrics.adsenseRevenue); List <Analytics.Data.DataItem> dimensions = new List <Analytics.Data.DataItem>(); dimensions.Add(Analytics.Data.GeoNetwork.Dimensions.country); List <Analytics.Data.DataItem> filters = new List <Analytics.Data.DataItem>(); Analytics.Data.DataItem country = new Analytics.Data.DataItem(Analytics.Data.GeoNetwork.Dimensions.country.Name); country.Equals("Saudi Arabia"); filters.Add(country); System.Data.DataTable table = manager.GetGaDataTable(DateTime.Today.AddDays(-3), DateTime.Today, metrics, dimensions, filters, metrics, true); GridViewControl.DataSource = table; GridViewControl.DataBind(); }
private void GridViewDataBind() { WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder(); TreeNode tn = this.trvProjectClass.SelectedNode; if (tn != null) { String projectClassId = tn.Value; if (!String.IsNullOrEmpty(projectClassId)) { builder.AppendItem(ProjectInfoDBConst.ProjectClassID, projectClassId + "%", "LIKE"); } else { btnEditProjectClass.Enabled = false; } } else { btnEditProjectClass.Enabled = false; } List <ProjectInfo> infoList = ProjectInfoAdapter.Instance.GetProjectInfoList(builder); GridViewControl.GridViewDataBind <ProjectInfo>(this.gvList, infoList); //this.gvList.DataSource = projectList; //this.gvList.DataBind(); }
}//end void public static void LlenaGridViewDataReader( System.Data.SqlClient.SqlDataReader sqldr , GridView gv, Label lblTitulo, String DescripcionTitulo, Label lblMsj ) { try { if (sqldr.HasRows) { gv.DataSource = sqldr; gv.DataBind(); gv.Caption = gv.Rows.Count + " registros "; lblTitulo.Text = DescripcionTitulo; LabelControl.LimpiaLabel(lblMsj); } else { GridViewControl.LimpiaGridview(gv); LabelControl.LimpiaLabel(lblTitulo); lblMsj.Text = FmkCartera.Generales.Mensaje.DevuelveMsj(2); }//end if } catch (Exception ex) { lblMsj.Text = ex.Message; } }//end void
private void GridViewDataBind() { DataTable dt = PayMonthInfoAdapter.Instance.LoadPayMonthInfo(yearMonth, this.ddlReport.SelectedValue); this.gvList.ShowFooter = dt.Rows.Count > 0; GridViewControl.GridViewDataBind(this.gvList, dt); //this.gvList.DataSource = PayMonthInfoAdapter.Instance.LoadPayMonth(yearMonth, this.ddlReport.SelectedValue); //this.gvList.DataBind(); if (!(this.gvList.Rows.Count == 1 && (this.gvList.Rows[0].Cells[0].Text == SalaryConst.EmptyText || this.gvList.DataKeys[0].Value.ToString() == ""))) { for (Int32 i = 0; i < this.gvList.Rows.Count; i++) { for (Int32 j = 2; j < this.gvList.HeaderRow.Cells.Count - 1; j++) { this.gvList.Rows[i].Cells[j].HorizontalAlign = HorizontalAlign.Right;//金额列居右 } } } Int32 gvWidth = 0;//计算Grid的宽度 for (Int32 i = 0; i < this.gvList.HeaderRow.Cells.Count; i++) { gvWidth += this.gvList.HeaderRow.Cells[i].Text.Length; } this.gvList.Width = gvWidth * 15; this.gvList.Columns[this.gvList.Columns.Count - 1].Visible = !this.ddlReport.SelectedItem.Text.Contains("部门");//部门合计报表 隐藏操作列 }
protected void Page_Load(object sender, EventArgs e) { this.yearMonth = DecodedQueryString[FeeMonthInfoConst.YearMonth]; this.feeID = DecodedQueryString[FeeInfoConst.FeeID]; this.parentID = DecodedQueryString[FeeInfoConst.ParentID]; this.action = EnumHelper.Parse <ActionType>(DecodedQueryString[SalaryConst.QueryAction]); String feeType = DecodedQueryString[FeeInfoConst.FeeType], commonFeeType = DecodedQueryString[FeeInfoConst.CommonFeeType]; if (!String.IsNullOrEmpty(feeType)) { this.enumFeeType = EnumHelper.Parse <FeeType>(feeType); this.name = this.enumFeeType.Equals(FeeType.Common) ? "工资组成" : this.enumFeeType.Equals(FeeType.Sum) ? "工资计算" : this.enumFeeType.Equals(FeeType.Parameter) ? "参数" : this.enumFeeType.Equals(FeeType.Tax) ? "个税" : this.name; } if (!String.IsNullOrEmpty(commonFeeType)) { this.enumCommonFeeType = EnumHelper.Parse <CommonFeeType>(commonFeeType); } if (!IsPostBack) { this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvTaxList); } }
private void GridViewDataBind() { this.gvList.Columns[1].HeaderText = this.enumFeeType.Equals(FeeType.Parameter) ? "参数名称" : this.enumFeeType.Equals(FeeType.Tax) ? "个税名称" : "项目"; this.gvList.Columns[2].Visible = this.enumFeeType.Equals(FeeType.Parameter);//参数值 //运算符号 this.gvList.Columns[3].Visible = !(this.enumFeeType.Equals(FeeType.Parameter) || this.enumFeeType.Equals(FeeType.Tax)); //启用日期 this.gvList.Columns[6].Visible = this.enumFeeType.Equals(FeeType.Parameter) || this.enumFeeType.Equals(FeeType.Tax); WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder(); if (!this.enumFeeType.Equals(0)) { builder.AppendItem(FeeInfoDBConst.FeeType, this.enumFeeType.ToString("D")); } if (!String.IsNullOrEmpty(this.CommonFeeType)) { WhereSqlClauseBuilder builderOR = new WhereSqlClauseBuilder(LogicOperatorDefine.Or); foreach (String str in this.CommonFeeType.Split(',')) { builderOR.AppendItem(FeeInfoDBConst.CommonFeeType, EnumHelper.Parse <CommonFeeType>(str).ToString("D")); } builder.AppendItem(builderOR.ToSqlString()); } if (this.ddlFee.SelectedIndex > 0) { String strFeeID = this.ddlFee.SelectedValue; builder.AppendItem(FeeInfoDBConst.FeeID, strFeeID); //builder.AppendItem(FeeInfoDBConst.ParentID, strFeeID); } List <FeeInfo> feeInfoList = FeeInfoAdapter.Instance.GetFeeInfoList(yearMonth, builder);//.GetFeeTreeInfoList(yearMonth, builder); GridViewControl.GridViewDataBind <FeeInfo>(this.gvList, feeInfoList.OrderBy(ob => ob.FeeCode).ToList()); }
private void GridViewDataBind() { WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder(); if (!String.IsNullOrEmpty(this.PersonType)) { builder.AppendItem(PersonInfoDBConst.PersonType, EnumHelper.Parse <PersonType>(this.PersonType).ToString("D")); } TreeNode tn = this.trvDeparment.SelectedNode; if (tn != null) { String departID = tn.Value; if (!String.IsNullOrEmpty(departID)) { builder.AppendItem(PersonInfoDBConst.DepartmentID, departID + "%", "LIKE"); } else { btnModifyDepartment.Enabled = false; } } else { btnModifyDepartment.Enabled = false; } List <PersonInfo> infoList = PersonInfoAdapter.Instance.GetPersonInfoList(builder); GridViewControl.GridViewDataBind <PersonInfo>(this.gvList, infoList); //this.gvList.DataSource = infoList; //this.gvList.DataBind(); }
private static IGridViewControl LocateGrid() { IGridViewControl grid = new GridViewControl(); grid.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindWindow("Demo Form"), () => new FindByAutomationId("dataGridView1") )); return(grid); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvList); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (IsSame) { try { ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("AlbumBackAnimation"); if (animation != null) { animation.Configuration = new DirectConnectedAnimationConfiguration(); Image image = ((GridViewControl.ContainerFromIndex(GridViewControl.SelectedIndex) as GridViewItem).ContentTemplateRoot as FrameworkElement).FindName("AlbumImage") as Image; animation.TryStart(image); } } catch (Exception) { } } SingerImage.ImageOpened += SingerImage_ImageOpened; if (e.Parameter is ArtistResult Artist) { SingerImage.Opacity = 0; var bitmapimage = new BitmapImage(); SingerImage.Source = bitmapimage; bitmapimage.UriSource = new Uri(Artist.Artist.Img1V1Url); CancelToken = new CancellationTokenSource(); Locker = new AutoResetEvent(false); if (IsSame) { SingerImage.Opacity = 1; return; } this.Artist = Artist; SingerName.Text = Artist.Artist.Name; SingerIntroName.Text = Artist.Artist.Name + "简介:"; SingerIntroText.Text = " " + (Artist.Artist.BriefDesc ?? "无简介"); if (Artist.Artist.Alias.Count != 0) { GroupName.Text = Artist.Artist.Alias[0]; } else { GroupName.Text = ""; } SongCount.Text = "单曲数: " + Artist.Artist.MusicSize.ToString(); MVCount.Text = "MV数: " + Artist.Artist.MvSize.ToString(); AlbumCount.Text = "专辑数: " + Artist.Artist.AlbumSize.ToString(); } }
//string feeCodeGangWei; protected void Page_Load(object sender, EventArgs e) { yearMonth = DecodedQueryString[PayMonthInfoConst.YearMonth]; if (!IsPostBack) {//this.litTitle.Text = String.Concat(yearMonth.Substring(0, 4), "年", yearMonth.Substring(4, 2), "月薪资表"); this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvList); } }
protected void Page_Load(object sender, EventArgs e) { this.PersonType = DecodedQueryString[PersonInfoConst.PersonType]; if (!IsPostBack) { this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvList); } }
public void SetGridViewCellData(string Data, int RowIndex, int ColumnIndex) { if (GridViewControl.InvokeRequired) { GridViewControl.Invoke(new MethodInvoker(delegate() { GridViewControl.Rows[RowIndex].Cells[ColumnIndex].Value = Data; })); } else { GridViewControl.Rows[RowIndex].Cells[ColumnIndex].Value = Data; } //GridViewControl.Rows[0].Selected = true; }
private void GridViewDataBind() { WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder(); if (this.ddlUse.SelectedIndex > 0) { builder.AppendItem(ReportInfoDBConst.UserFlag, this.ddlUse.SelectedValue); } List <ReportInfo> infoList = ReportInfoAdapter.Instance.GetReportInfoList(builder); GridViewControl.GridViewDataBind <ReportInfo>(this.gvList, infoList); //this.gvList.DataSource = infoList; //this.gvList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { reportID = DecodedQueryString[ReportInfoConst.ReportID]; action = EnumHelper.Parse <ActionType>(DecodedQueryString[SalaryConst.QueryAction]); if (!IsPostBack) { this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvFeeList); GridViewControl.ResetGridView(this.gvWelfareList); GridViewControl.ResetGridView(this.gvSelectedFeeList); } }
private void InitializeControl() { Tools.DropDownListDataBindByEnum(this.ddlPersonType, typeof(PersonType), string.Empty, true, true); List <DepartmentInfo> departInfoList = DepartmentInfoAdapter.Instance.GetDepartmentInfoList(null).Where(dp => !dp.UseFlag == bool.Parse(Status.True.ToString())).ToList(); Tools.DropDownListDataBind(this.ddlDepartment, departInfoList, "", true, DepartmentInfoConst.DepartmentName, DepartmentInfoConst.DepartmentID); List <ProjectInfo> projectInfoList = ProjectInfoAdapter.Instance.GetProjectInfoList(null).Where(project => !project.UseFlag == Boolean.Parse(Status.True.ToString())).ToList(); Tools.DropDownListDataBind(this.ddlProject, projectInfoList, "", true, ProjectInfoConst.ProjectName, ProjectInfoConst.ProjectID); if (action != ActionType.Add) { PersonInfo info = PersonInfoAdapter.Instance.LoadPersonInfo(personID); this.SetPersonControlInfo(info); } else { if (String.IsNullOrEmpty(this.parentID)) { this.tbPersonCode.Text = PersonInfoAdapter.Instance.CreatePersonCode(); this.ddlDepartment.SelectedValue = String.IsNullOrEmpty(departId) ? "" : departId; } else//复制 { PersonInfo personInfo = PersonInfoAdapter.Instance.LoadPersonInfo(this.parentID); personInfo.ParentID = this.parentID; this.SetPersonControlInfo(personInfo); } this.tbEntryDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); List <PersonBaseFeeInfo> personBaseFeeInfoList = new List <PersonBaseFeeInfo>();//personInfoList.Add(new PersonBaseFee()); GridViewControl.GridViewDataBind <PersonBaseFeeInfo>(this.gvCommonList, personBaseFeeInfoList); GridViewControl.GridViewDataBind <PersonBaseFeeInfo>(this.gvPositionList, personBaseFeeInfoList); GridViewControl.GridViewDataBind <PersonBaseFeeInfo>(this.gvFloatList, personBaseFeeInfoList); GridViewControl.GridViewDataBind <PersonBaseFeeInfo>(this.gvCooperateList, personBaseFeeInfoList); GridViewControl.GridViewDataBind <PersonBaseFeeInfo>(this.gvVirtualList, personBaseFeeInfoList); } if (!String.IsNullOrEmpty(yearMonth)) { this.SetControlReadOnly(); } else { ////this.tabs-2.Visible = false; ////this.tabs-3.Visible = false; } }
private void GridViewDataBind() { List <ReportFee> reportFeeList = ReportInfoAdapter.Instance.GetReportFeeList(reportID); GridViewControl.GridViewDataBind <ReportFee>(this.gvSelectedFeeList, reportFeeList); //this.gvSelectedFeeList.DataSource = reportFeeList; //this.gvSelectedFeeList.DataBind(); List <FeeInfo> feeList = ReportInfoAdapter.Instance.GetReportCanSelectFeeList(reportID); //GridViewControl.GridViewDataBind<FeeInfo>(this.gvFeeList, feeList.OrderBy(ob => ob.FeeCode).ToList()); GridViewControl.GridViewDataBind <FeeInfo>(this.gvFeeList, feeList.Where(fee => fee.FeeType == FeeType.Common && fee.CommonFeeType != CommonFeeType.Welfare).OrderBy(ob => ob.FeeCode).ToList()); GridViewControl.GridViewDataBind <FeeInfo>(this.gvWelfareList, feeList.Where(fee => fee.FeeType == FeeType.Common && fee.CommonFeeType == CommonFeeType.Welfare).OrderBy(ob => ob.FeeCode).ToList()); GridViewControl.GridViewDataBind <FeeInfo>(this.gvCalculateFeeList, feeList.Where(fee => fee.FeeType == FeeType.Sum).ToList().OrderBy(ob => ob.FeeCode).ToList()); //this.gvFeeList.DataSource = feeList; //this.gvFeeList.DataBind(); }
private async void GridViewControl_ItemClick(object sender, ItemClickEventArgs e) { LoadingControl.IsLoading = true; var Result = await NeteaseMusicAPI.GetInstance().GetAlbumAsync((e.ClickedItem as SingerAlbum).ID); LoadingControl.IsLoading = false; await Task.Delay(500); Image image = ((GridViewControl.ContainerFromItem(e.ClickedItem) as GridViewItem).ContentTemplateRoot as FrameworkElement).FindName("AlbumImage") as Image; ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("ToAlbumAnimation", image).Configuration = new BasicConnectedAnimationConfiguration(); MusicPage.ThisPage.MusicNav.Navigate(typeof(MusicAlbum), Result, new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight }); }
}//string //Usado para Exportar a Excel y Paginacion public static void LlenaGridViewDataReaderSesionTabla(System.Data.SqlClient.SqlDataReader sqldr, GridView gv, Label lblTitulo, String DescripcionTitulo, Label lblMsj, ImageButton bt, String NombreSesion) { try { if (sqldr.HasRows) { System.Data.DataTable dt = new System.Data.DataTable(); dt.Load(sqldr); System.Web.HttpContext.Current.Session[NombreSesion] = dt; gv.DataSource = dt; gv.DataBind(); gv.Caption = gv.Rows.Count + " registros "; lblTitulo.Text = DescripcionTitulo; LabelControl.LimpiaLabel(lblMsj); ImageButtonControl.HabilitaVisibilidadBotones(true, bt); if (dt.Rows.Count >= 20) { gv.Caption = "Registros: " + dt.Rows.Count + " (Paginados de 20 en 20)"; } else { gv.Caption = "Registros: " + dt.Rows.Count; }//end if } else { ImageButtonControl.HabilitaVisibilidadBotones(false, bt); GridViewControl.LimpiaGridview(gv); LabelControl.LimpiaLabel(lblTitulo); lblMsj.Text = FmkCartera.Generales.Mensaje.DevuelveMsj(2); }//end if } catch (Exception ex) { lblMsj.Text = ex.Message; }//end try }//end void
/// <summary> /// Fill ASP.NET Controls data grid control. /// </summary> public void FillGridViewControl() { if (GridViewControl.RowCount > 0) { GridViewControl.Rows.Clear(); GridViewControl.Refresh(); } foreach (KeyValuePair <string, Scanner.ASPXControlProperties> kvp in Scanner.AspxControlsSorted) { if (!kvp.Value.ControlType.Equals("HeaderTags")) { if ((Resources.UserPreferences.Default.DisplayErrors.Equals(true)) && (kvp.Value.ErrorStatus.Equals(true))) { var index = GridViewControlCommon(kvp); GridViewControl.Rows[index].DefaultCellStyle.BackColor = Color.LightYellow; GridViewControl.Rows[index].Cells["ASPXAlert"].Value = Properties.Resources.Warning24; } if ((Resources.UserPreferences.Default.DisplayNoComplaince.Equals(true)) && (kvp.Value.NoComplainanceStatus.Equals(true))) { var index = GridViewControlCommon(kvp); GridViewControl.Rows[index].DefaultCellStyle.BackColor = Color.LightGray; } if ((Resources.UserPreferences.Default.DisplayNoErrors.Equals(true)) && (kvp.Value.ErrorStatus.Equals(false))) { var index = GridViewControlCommon(kvp); } if (Resources.UserPreferences.Default.DisplayAll.Equals(true)) { var index = GridViewControlCommon(kvp); if (kvp.Value.ErrorStatus.Equals(true)) { GridViewControl.Rows[index].DefaultCellStyle.BackColor = Color.LightYellow; GridViewControl.Rows[index].Cells["ASPXAlert"].Value = Properties.Resources.Warning24; } if (kvp.Value.NoComplainanceStatus.Equals(true)) { GridViewControl.Rows[index].DefaultCellStyle.BackColor = Color.LightGray; } } } } }
}//end void public static void LlenaGridViewDataTable(System.Data.DataTable dataTable, GridView gv) { try { if (dataTable.Rows.Count>0) { gv.DataSource = dataTable; gv.DataBind(); gv.Caption = gv.Rows.Count + " registros "; } else { GridViewControl.LimpiaGridview(gv); }//end if } catch (Exception ex) { throw ex; } }//end void
protected void Page_Load(object sender, EventArgs e) { yearMonth = DecodedQueryString[PersonBaseFeeMonthInfoConst.YearMonth]; personID = DecodedQueryString[PersonInfoConst.PersonID]; departId = DecodedQueryString[PersonInfoConst.DepartmentID]; parentID = DecodedQueryString[PersonInfoConst.ParentID]; action = EnumHelper.Parse <ActionType>(DecodedQueryString[SalaryConst.QueryAction]); if (!IsPostBack) { this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvCommonList); GridViewControl.ResetGridView(this.gvPositionList); GridViewControl.ResetGridView(this.gvFloatList); GridViewControl.ResetGridView(this.gvCooperateList); GridViewControl.ResetGridView(this.gvVirtualList); GridViewControl.ResetGridView(this.gvServiceList); //GridViewControl.ResetGridView(this.gvDepartProjectList); } }
} //void public static void LlenaGridViewDataReader(System.Data.SqlClient.SqlDataReader sqldr, GridView gv) { try { if (sqldr.HasRows) { gv.DataSource = sqldr; gv.DataBind(); gv.Caption = gv.Rows.Count + " registros "; } else { GridViewControl.LimpiaGridview(gv); }//end if } catch (Exception ex) { throw ex; } }//end void
private void TaxGridViewDataBind(bool addNew) { List <TaxInfo> taxInfoList = null; WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder(); builder.AppendItem(TaxInfoDBConst.FeeID, feeID); taxInfoList = TaxInfoAdapter.Instance.GetTaxInfoList(yearMonth, builder); if (addNew) { TaxInfo taxInfo = String.IsNullOrEmpty(yearMonth) ? new TaxInfo() : new TaxMonthInfo(yearMonth); taxInfo.TaxID = ""; taxInfo.FeeID = feeID; taxInfoList.Insert(0, taxInfo); this.gvTaxList.EditIndex = 0; } GridViewControl.GridViewDataBind <TaxInfo>(this.gvTaxList, taxInfoList); if (action == ActionType.Add) {//ImageButton ibtnAdd = this.gvTaxList.HeaderRow.FindControl("ibtnAdd") as ImageButton; //ibtnAdd.Enabled = false; this.gvTaxList.Enabled = false; } }
private void GridViewDataBind(bool addNew) { WhereSqlClauseBuilder builer = new WhereSqlClauseBuilder(); if (this.ddlYears.SelectedIndex > 0) { builer.AppendItem(PayMonthInfoDBConst.YearMonth, this.ddlYears.SelectedValue + "%", " LIKE "); } DataTable dt = PayMonthInfoAdapter.Instance.GetPayMonthListDT(builer); if (addNew) { DataRow dr = dt.NewRow(); dt.Rows.InsertAt(dr, 0); this.gvList.EditIndex = 0; GridViewControl.GridViewDataBind(this.gvList, dt); this.CurRowEdit(0); } else { GridViewControl.GridViewDataBind(this.gvList, dt); } }
protected void Page_Load(object sender, EventArgs e) {//action = EnumHelper.Parse<ActionType>(DecodedQueryString[SalaryConst.QueryAction]); yearMonth = DecodedQueryString[FeeMonthInfoConst.YearMonth]; String feeType = DecodedQueryString[FeeInfoConst.FeeType]; CommonFeeType = DecodedQueryString[FeeInfoConst.CommonFeeType]; if (!String.IsNullOrEmpty(feeType)) { this.enumFeeType = EnumHelper.Parse <FeeType>(feeType); } //if (!String.IsNullOrEmpty(commonFeeType)) //{ // this.enumCommonFeeType = EnumHelper.Parse<CommonFeeType>(commonFeeType); //} if (!IsPostBack) { this.InitializeControl(); } else { GridViewControl.ResetGridView(this.gvList); } }
}//void public static decimal ObtenSumaUltimaColumna(GridView gv, Int32? ultimaColumna, string nombreColumna) { decimal sumaTotales = 0.0M; decimal total = 0.0M; for (int r = 0; (r <= (GridViewControl.ObtenCantidadFilas(gv) - 1)); r++) { for (int c = 0; c <= ultimaColumna; c++) { if ((c == ultimaColumna)) { total = GridViewControl.ExtraeValorNumericoDecimalCelda(DataTypeCode.ConvertirAInt32(ultimaColumna.ToString()), nombreColumna, r, gv); sumaTotales = (sumaTotales + ((Decimal)(total))); }//if }//for }//for return sumaTotales; }//void
public FileManager(MainScreenManager manager, GridViewControl gridViewControl) { _parentManager = manager; _gridControl = gridViewControl; }