ZZZ.BL.ReportsBL reportBl = newZZZ.BL.ReportsBL(); protected void Page_Init(object source, System.EventArgs e) { RadGrid1.MasterTableView.Columns.Clear(); BuildGridColumns(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { drpBillingCycles.DataSource = reportBl.GetBillingCycles(37); drpBillingCycles.DataBind(); } } protected void drpBillingCycles_SelectedIndexChanged(object sender, EventArgs e) { int PageCount = 0; System.Data.DataTable cd = new System.Data.DataTable(); RadGrid1.VirtualItemCount = PageCount; RadGrid1.DataSource = reportBl.GetReportData("325012", 37, RadGrid1.CurrentPageIndex, RadGrid1.PageSize, out PageCount); RadGrid1.DataBind(); } protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { int PageCount = 0; RadGrid1.VirtualItemCount = PageCount; RadGrid1.DataSource = reportBl.("325012", 37, RadGrid1.CurrentPageIndex, RadGrid1.PageSize, out PageCount); //RadGrid1.DataBind(); } private void BuildGridColumns() { RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("PhoneNumber","Phone Number")); RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("UserName", "Phone User Name")); RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("EmpId", "Employee Id")); RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("Department", "Radio Number")); } private GridBoundColumn GetGridBoundColumn(string DataField,string HeaderText) { GridBoundColumn boundColumn1 = new GridBoundColumn(); boundColumn1.DataField = DataField; boundColumn1.UniqueName = DataField; boundColumn1.SortExpression = DataField; boundColumn1.HeaderText = HeaderText; return boundColumn1; }For Each item As GridGroupHeaderItem In gridTelerik.MasterTableView.GetItems(GridItemType.GroupHeader)
item.Expanded = False
Dim groupDataRow As DataRowView = CType(item.DataItem, DataRowView)
If item.DataCell.Text.IndexOf("Partita:") > -1 Then
item.DataCell.Text = item.DataCell.Text.Replace(item.DataCell.Text.Substring(9, 8), "")
Dim StrdtReverse As String = item.DataCell.Text.Substring(item.DataCell.Text.Length - 10, 10)
Dim StrdtReverseConcat As String = String.Concat(StrdtReverse.Substring(6, 4), StrdtReverse.Substring(3, 2), StrdtReverse.Substring(0, 2))
Dim dtRowPartita() As DataRow = dataTableEstrattoConto.Select(String.Concat("Partita='", StrdtReverseConcat, item.DataCell.Text.Replace("Partita: ", ""), "'"))
For ik As Integer = 0 To dtRowPartita.Length - 1
totaleNettoPartita += Convert.ToDecimal(dtRowPartita(ik).Item("Importonetto"))
Next
item.DataCell.Text = String.Concat("Saldo partita: <b>", String.Format("{0:n2}", totaleNettoPartita), "</b>")
totaleNettoPartita = 0
End If
'item.DataCell.Text = "$" + groupDataRow("Cliente").ToString() + " (" + groupDataRow("Importonetto").ToString() + ")"
If item.DataCell.Text.IndexOf("Cliente:") > -1 Then
Dim dtRowCliente() As DataRow = dataTableEstrattoConto.Select(String.Concat("Cliente='", item.DataCell.Text.Replace("Cliente: ", ""), "'"))
For ik As Integer = 0 To dtRowCliente.Length - 1
totaleNetto += Convert.ToDecimal(dtRowCliente(ik).Item("Importonetto"))
totaleRitenuta += Convert.ToDecimal(dtRowCliente(ik).Item("Importoritenuta"))
totaleLordo += Convert.ToDecimal(dtRowCliente(ik).Item("Importolordo"))
totaleImponibileRitenuta += Convert.ToDecimal(dtRowCliente(ik).Item("Imponibileritenutaacconto"))
Next
item.DataCell.Text = String.Concat(groupDataRow("Cliente").ToString().TrimStart, "<br> <b>TOTALI: Importo lordo:</b> ", String.Format("{0:n2}", totaleLordo), _
" - <b>Imponibile ritenuta acconto:</b> ", String.Format("{0:n2}", totaleImponibileRitenuta), _
" - <b>Importo ritenuta:</b> ", String.Format("{0:n2}", totaleRitenuta), " - <b>Importo netto:</b> ", String.Format("{0:n2}", totaleNetto))
If totaleLordo = 0 Then
If (Request.QueryString("st") Is Nothing) Or _
(Not Request.QueryString("st") Is Nothing AndAlso Request.QueryString("St").ToString <> "1") Then
'se le partite si pareggiano tra di loro, perch ad es. c' una nota di credito in un altra partita
'non rendo visibile il tab
item.Visible = False
item.Display = False
item.Expanded = False
End If
End If
totaleGenerale += totaleNetto
totaleLordo = 0
totaleNetto = 0
totaleRitenuta = 0
totaleImponibileRitenuta = 0
End If
Next
function SelectDependentRoles(checked, readerCheckbox, dropboxCheckbox) { if (checked) { readerCheckbox.checked = checked; readerCheckbox.disabled = true; dropboxCheckbox.checked = checked; dropboxCheckbox.disabled = true; } else { readerCheckbox.checked = checked; readerCheckbox.disabled = false; dropboxCheckbox.checked = checked; dropboxCheckbox.disabled = false; } }private void EnableCheckboxes() { foreach (GridDataItem row in dgLoginRequest.MasterTableView.Items) { var chbxReader = (CheckBox)row.FindControl("chbxReader"); var chbxRKDropbox = (CheckBox)row.FindControl("chbxRKDropbox"); var chbxShare = (CheckBox)row.FindControl("chbxShare"); chbxReader.Enabled = !chbxShare.Checked; chbxRKDropbox.Enabled = !chbxShare.Checked; } }.RadCalendar{ z-index: 2147483647; background-color: Aqua;}.rcTimePopup { z-index: 2147483647;}.rcHover { z-index: 2147483647; background-color: Aqua;}