<
table
id
=
"NotesAndCommentsTable"
border
=
"1"
style
=
"border-collapse:collapse;border-color:Black;display:block;background-color:White"
width
=
"100%"
cellpadding
=
"0"
cellspacing
=
"0"
>
<
tr
>
<
td
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
EnableAJAX
=
"true"
>
<
telerik:RadGrid
ID
=
"grdNotes"
runat
=
"server"
Skin
=
"WebBlue"
CssClass
=
"RadGrid"
GridLines
=
"None"
AllowPaging
=
"True"
PageSize
=
"20"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
ShowStatusBar
=
"true"
HorizontalAlign
=
"NotSet"
OnNeedDataSource
=
"grdNotes_NeedDataSource"
OnInsertCommand
=
"grdNotes_InsertCommand"
>
<
MasterTableView
CommandItemDisplay
=
"Bottom"
DataKeyNames
=
"ClaimUserNotes_IDX"
EditMode
=
"PopUp"
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"DateCreated"
HeaderText
=
"Date"
DataField
=
"DateCreated"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"UserCreated"
HeaderText
=
"User"
DataField
=
"UserCreated"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Notes"
HeaderText
=
"Notes/Comments"
DataField
=
"Notes"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
CaptionFormatString
=
"Edit :"
CaptionDataField
=
"Claim_Idx"
EditFormType
=
"Template"
>
<
FormTemplate
>
<
table
id
=
"Table1"
style
=
"border-collapse:collapse;border-color:Black;display:block;background-color:White"
cellspacing
=
"1"
cellpadding
=
"1"
width
=
"100%"
border
=
"0"
>
<
tr
>
<
td
>
</
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
>
Notes/Comments:
</
td
>
<
td
>
<
asp:TextBox
ID
=
"TextBox10"
TextMode
=
"MultiLine"
width
=
"300"
Text='<%# Bind( "Notes") %>' runat="server">
</
asp:TextBox
>
</
td
>
</
tr
>
</
table
>
<
table
style
=
"width: 100%;border-collapse:collapse;border-color:Black;display:block;background-color:White"
>
<
tr
>
<
td
align
=
"right"
colspan
=
"2"
>
<
asp:Button
ID
=
"Button1"
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</
asp:Button
>
<
asp:Button
ID
=
"Button2"
Text
=
"Cancel"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Cancel"
>
</
asp:Button
>
</
td
>
</
tr
>
</
table
>
</
FormTemplate
>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnRowDblClick
=
"RowDblClick"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
/>
</
td
>
</
tr
>
</
table
>
protected void grdNotes_InsertCommand(object sender, GridCommandEventArgs e)
{
GridEditableItem dataItem = e.Item as GridEditableItem;
Hashtable values = new Hashtable();
dataItem.ExtractValues(values);
ClaimUserNotes un = new ClaimUserNotes();
un.Claim_IDX = claimId;
un.Notes = values[
"Notes"].ToString();
un.UserCreated = user.UserName;
un.DateCreated =
DateTime.Now;
entities.AddToClaimUserNotes(un);
entities.SaveChanges();
lstUserNotes = entities.ClaimUserNotes.Where(obj => obj.Claim_IDX == claimId).ToList();
grdNotes.Rebind();
}
public
string
AjaxLoadingSkin
{
get
{
string
s = SkinManager.Skin ??
"Office2007"
;
return
String.Format(
"Telerik.Web.UI.Skins.{0}.Ajax.loading.gif"
, s);
}
}
<telerik:RadAjaxLoadingPanel IsSticky=
"true"
ID=
"LoadingPanel1"
runat=
"Server"
>
<img alt=
"Loading..."
src=
'<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, AjaxLoadingSkin) %>'
style=
"border: 0;"
/>
</telerik:RadAjaxLoadingPanel>
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpenItemsInventory.aspx.cs"
Inherits="Sterling.SNEF.Tax.Web.OpenItemsInventory" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Open Items Inventory</title>
<style type="text/css">
.RadGrid_Web20 .rgCommandRow
{
color: #35467C !important;
}
</style>
</
head>
<
telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
var rad_val;
function pageLoad(sender, eventArgs) {
if (!eventArgs.get_isPartialLoad()) {
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
}
}
function onFutureInventory(sender, args) {
document.getElementById(
'<%= btnFutureInventory.ClientID %>').disabled = true;
GetRadioValue();
var windowURL = "FutureInventoryDialog.aspx?ViewByType=" + rad_val
var oWnd = $find("<%= dlgFutureInventory.ClientID%>");
oWnd.setUrl(windowURL);
oWnd.SetSize(470, 505);
oWnd.show();
oWnd.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.Close);
oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
oWnd.SetModal(
true);
}
function GetRadioValue()
{
message =
"";
surplusMessage =
"";
if (document.getElementById('<%= rdoAssignee.ClientID %>').checked)
{
rad_val =
"Assignee";
}
else
{
rad_val =
"State";
}
}
function onFutureInventoryClose(sender, eventArgs) {
document.getElementById(
'<%= btnFutureInventory.ClientID %>').disabled = false;
}
function onRequestStart(sender, args)
{
if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)
{
args.set_enableAjax(
false);
}
}
</script>
</
telerik:RadCodeBlock>
<
body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="OpenItemsInventoryScriptManager" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<ClientEvents OnRequestStart="onRequestStart" />
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="Panel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="LoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadWindow ID="dlgFutureInventory" runat="server" Skin="Web20" EnableViewState="False"
KeepInScreenBounds="True" ReloadOnShow="True" ShowContentDuringLoad="False" VisibleStatusbar="False"
Behaviors="None" OnClientClose="onFutureInventoryClose" onclientOverlay="True">
</telerik:RadWindow>
<telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Skin="Web20">
</telerik:RadAjaxLoadingPanel>
<asp:Panel ID="Panel1" runat="server">
<asp:Panel ID="Panel2" Visible="false" runat="server">
<asp:Label ID="lblLenders" runat="server" Font-Bold="True" Text="Lenders:" Font-Names="Arial"></asp:Label>
<asp:Label ID="Label3" runat="server" Font-Bold="True" Text="Lenders:" Font-Names="Arial"></asp:Label>
<br />
<asp:Label ID="lblViewBy" runat="server" Font-Bold="True" Text="View By:" Font-Names="Arial"></asp:Label>
<asp:RadioButton ID="rdoAssignee" runat="server" Text="Assignee" GroupName="ViewByGroup"
OnCheckedChanged="ViewByGroup_CheckedChanged" Checked="true" AutoPostBack="true"
Font-Names="Arial" Font-Size="Smaller" />
<asp:RadioButton ID="rdoState" runat="server" Text="State" GroupName="ViewByGroup"
OnCheckedChanged="ViewByGroup_CheckedChanged" AutoPostBack="true" Font-Names="Arial"
Font-Size="Smaller" />
<br />
<br />
<div style="border: thin solid #5177B5; left: 5px; position: relative; left: 5px;
width: 760px;">
<table border="1" width="760px" style="border-collapse: collapse;">
<tr>
<td align="center" style="width: 145px; background-color: #7FA5D7;">
<asp:Label ID="lblhdrAssignee" runat="server" Text="Assignee" Font-Bold="True" Font-Names="Arial"
Font-Size="12px" ForeColor="White"></asp:Label>
</td>
<td align="center" style="width: 100px; background-color: #7FA5D7;">
<asp:Label ID="Label2" runat="server" Text="Jurisdictions" Font-Bold="True" Font-Names="arial,sans-serif"
Font-Size="12px" ForeColor="White"></asp:Label>
</td>
<td align="center" style="width: 100px; background-color: #7FA5D7;">
<asp:Label ID="Label6" runat="server" Text="Prior Open Items" Font-Bold="True" Font-Names="Arial"
Font-Size="12px" ForeColor="White"></asp:Label>
</td>
<td align="center" style="width: 100px; background-color: #7FA5D7;">
<asp:Label ID="Label7" runat="server" Text="Current Open Items" Font-Bold="True"
Font-Names="Arial" Font-Size="12px" ForeColor="White"></asp:Label>
</td>
<td align="center" style="width: 110px; background-color: #7FA5D7;">
<asp:Label ID="Label4" runat="server" Text="Items Left to Pay" Font-Bold="True" Font-Names="Arial"
Font-Size="12px" ForeColor="White"></asp:Label>
</td>
<td align="center" style="width: 100px; background-color: #7FA5D7;">
<asp:Label ID="Label5" runat="server" Text="% Complete" Font-Bold="True" Font-Names="Arial"
Font-Size="12px" ForeColor="White"></asp:Label>
</td>
</tr>
<tr>
<td align="center" style="width: 150px;">
<asp:Label ID="Label1" runat="server" Text="Totals" Font-Bold="True" Font-Names="Arial"
Font-Size="12px"></asp:Label>
</td>
<td align="center" style="width: 100px;">
<asp:Label ID="lblhdrJurisdictions" runat="server" Font-Names="arial,sans-serif"
Font-Size="12px"></asp:Label>
</td>
<td align="center" style="width: 100px;">
<asp:Label ID="lblhdrPrior" runat="server" Font-Names="arial,sans-serif" Font-Size="12px"></asp:Label>
</td>
<td align="center" style="width: 100px;">
<asp:Label ID="lblhdrCurrent" runat="server" Font-Names="arial,sans-serif" Font-Size="12px"></asp:Label>
</td>
<td align="center" style="width: 100px;">
<asp:Label ID="lblhdrItemsLeft" runat="server" Font-Names="arial,sans-serif" Font-Size="12px"></asp:Label>
</td>
<td align="center" style="width: 100px;">
<asp:Label ID="lblhdrPctComplete" runat="server" Font-Names="arial,sans-serif" Font-Size="12px"></asp:Label>
</td>
</tr>
</table>
</div>
<br />
<table>
<tr>
<td>
<asp:Label ID="lblCurrentandPrior" runat="server" Font-Bold="True" Font-Size="Large"
Font-Names="Arial">Current and
Prior Inventory by Assignee
</asp:Label>
</td>
</tr>
</table>
<table>
<tr>
<td colspan="3">
<telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False"
GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="780px" Height="255px"
OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnExcelMLExportRowCreated="grdCurrentandPrior_ExcelMLExportRowCreated">
<ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True"
ExportOnlyData="true" Excel-Format="ExcelML">
</ExportSettings>
<MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false" UseAllDataFields="true">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
ShowRefreshButton="false" />
<Columns>
<telerik:GridTemplateColumn DataField="Assignee" HeaderText="Assignee" UniqueName="Assignee"
SortExpression="Assignee">
<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>
</ItemTemplate>
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="State" HeaderText="State" UniqueName="State"
SortExpression="State" Visible="false">
<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label>
</ItemTemplate>
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="JurisdictionCount" HeaderText="Jurisdictions"
UniqueName="JurisdictionCount" SortExpression="JurisdictionCount">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="OpenItemsCountPrior" HeaderText="Prior Open Items"
UniqueName="OpenItemsCountPrior" SortExpression="OpenItemsCountPrior">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lbPrior" runat="server" Text='<%# Eval("OpenItemsCountPrior", "{0:N0}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="OpenItemsCountCurrent" HeaderText="Current Open Items"
UniqueName="OpenItemsCountCurrent" SortExpression="OpenItemsCountCurrent">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lbCurrent" runat="server" Text='<%# Eval("OpenItemsCountCurrent", "{0:N0}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="TotalRemainingItems" HeaderText="Items Left to Pay"
UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems">
<HeaderStyle Font-Bold="True" Width="105px" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="PercentComplete" HeaderText="% Complete" UniqueName="clmPctComplete"
SortExpression="PercentComplete">
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" Font-Names="Arial" />
<ItemTemplate>
<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:F2}%")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
<FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey"
Visible="False">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<HeaderStyle BorderStyle="Solid" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
</table>
<br />
<table>
<tr>
<td>
<asp:Button ID="btnFutureInventory" runat="server" Text="Future Inventory" SkinID="Web20"
OnClientClick="onFutureInventory(); return false;" Width="164px" UseSubmitBehavior="false" />
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
</form>
</
body>
</
html>
using
System;
using
System.Collections;
using
System.Collections.Generic;
using
System.Configuration;
using
System.Data;
using
System.Linq;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.HtmlControls;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Xml.Linq;
using
Sterling.SNEF.Core;
using
Sterling.SNEF.Tax.Entity;
using
Sterling.SNEF.Tax.Service;
using
Telerik.Web.UI;
using
Telerik.Web.UI.GridExcelBuilder;
namespace
Sterling.SNEF.Tax.Web
{
public partial class OpenItemsInventory : OpenItemsBasePage
{
public OpenItemsInventory()
{ }
protected void Page_Load(object sender, EventArgs e)
{
BaseLogger.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);
RadAjaxManager.GetCurrent(this.Page).AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager1_AjaxRequest);
if (!Page.IsPostBack)
{
GetInventoryHeaderData();
GetCurrentandPriorbyAssigneeData();
ViewByGroup_CheckedChanged(rdoAssignee, e);
}
}
protected void ViewByGroup_CheckedChanged(object sender, EventArgs e)
{
try
{
if (rdoAssignee.Checked == true)
{
lblhdrAssignee.Text =
"Assignee";
lblCurrentandPrior.Text =
"Current and Prior Inventory by Assignee";
GetCurrentandPriorbyAssigneeData();
grdCurrentandPrior.MasterTableView.Columns[0].Visible =
true;
grdCurrentandPrior.MasterTableView.Columns[1].Visible =
false;
}
else
{
lblhdrAssignee.Text =
"State";
lblCurrentandPrior.Text =
"Current and Prior Inventory by State";
GetCurrentandPriorbyStateData();
grdCurrentandPrior.MasterTableView.Columns[0].Visible =
false;
grdCurrentandPrior.MasterTableView.Columns[1].Visible =
true;
}
}
catch (Exception ex)
{
BaseLogger.LogError("OpenItemsInventory.ViewByGroup_CheckedChanged Error : " + ex.Message);
throw;
}
}
//Method retrieves Inventory Header Counts and populates the fields.
protected void GetInventoryHeaderData()
{
try
{
BaseLogger.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);
var invSvc = new InventoryService(Convert.ToInt16(base.CurrentEnvironment.OrganizationId));
var invSvcResult = invSvc.GetInventoryHeader(CurrentEnvironment.EmployeeKey);
if (invSvcResult != null)
{
//lblhdrJurisdictions.Text = Convert.ToString(invSvcResult.JurisdictionCount,);
lblhdrJurisdictions.Text = invSvcResult.JurisdictionCount.ToString(
"N0");
lblhdrPrior.Text = invSvcResult.OpenItemsCountPrior.ToString(
"N0");
lblhdrCurrent.Text = invSvcResult.CurrentItems.ToString(
"N0");
lblhdrItemsLeft.Text = invSvcResult.TotalRemainingItems.ToString(
"N0");
lblhdrPctComplete.Text = invSvcResult.PercentComplete.ToString(
"P2");
}
else
BaseLogger.LogWarn("Inventory header is empty.");
}
catch (Exception ex)
{
BaseLogger.LogError("OpenItemsInventory.GetInventoryHeaderData Error : " + ex.Message);
throw;
}
}
public void GetCurrentandPriorbyAssigneeData()
{
try
{
BaseLogger.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);
InventoryService invSvc = new InventoryService(Convert.ToInt16(CurrentEnvironment.OrganizationId));
List<InventorySummary> InventoryResult;
InventoryResult = invSvc.GetInventorySummaryByAssignee(CurrentEnvironment.EmployeeKey);
if (InventoryResult != null && InventoryResult.Count > 0)
{
grdCurrentandPrior.DataSource = InventoryResult;
grdCurrentandPrior.DataBind();
InventorySessionState.CurrentSessionState.InventorySummaryByAssignee = InventoryResult;
}
else
{
BaseLogger.LogWarn("Inventory summary is empty.");
InventorySessionState.CurrentSessionState.InventorySummaryByAssignee = null;
grdCurrentandPrior.DataSource =
new string[] { };
grdCurrentandPrior.Rebind();
}
}
catch (Exception ex)
{
BaseLogger.LogError("OpenItemsInventory.GetCurrentandPriorbyAssigneeData Error : " + ex.Message);
throw;
}
}
public void GetCurrentandPriorbyStateData()
{
try
{
BaseLogger.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);
InventoryService invSvc = new InventoryService(Convert.ToInt16(CurrentEnvironment.OrganizationId));
List<InventorySummary> InventoryResult;
InventoryResult = invSvc.GetInventorySummaryByState(CurrentEnvironment.EmployeeKey);
if (InventoryResult != null && InventoryResult.Count > 0)
{
grdCurrentandPrior.DataSource = InventoryResult;
grdCurrentandPrior.DataBind();
InventorySessionState.CurrentSessionState.InventorySummaryByState = InventoryResult;
}
else
{
InventorySessionState.CurrentSessionState.InventorySummaryByState = null;
grdCurrentandPrior.DataSource =
new string[] { };
grdCurrentandPrior.Rebind();
}
}
catch (Exception ex)
{
BaseLogger.LogError("OpenItemsInventory.GetCurrentandPriorbyStateData Error : " + ex.Message);
throw;
}
}
protected void grdCurrentandPrior_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
BaseLogger.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);
try
{
if (rdoAssignee.Checked == true)
{
if (InventorySessionState.CurrentSessionState.InventorySummaryByAssignee == null)
{
GetCurrentandPriorbyAssigneeData();
}
else
{
grdCurrentandPrior.DataSource =
InventorySessionState.CurrentSessionState.InventorySummaryByAssignee;
}
}
else
{
if (InventorySessionState.CurrentSessionState.InventorySummaryByState == null)
{
GetCurrentandPriorbyStateData();
}
else
{
grdCurrentandPrior.DataSource =
InventorySessionState.CurrentSessionState.InventorySummaryByState;
}
}
}
catch (Exception ex)
{
BaseLogger.LogError("OpenItemsInventory.grdCurrentandPrior_NeedDataSource Error : " + ex.Message);
throw;
}
}
protected void grdCurrentandPrior_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e)
{
Int32 JurisdictionCount = 0;
Int32 OpenItemsCountPrior = 0;
Int32 OpenItemsCountCurrent = 0;
Int32 TotalRemainingItems = 0;
foreach (GridDataItem item in grdCurrentandPrior.MasterTableView.Items)
{
Label jc = (Label)item.FindControl("lbJurisdiction");
JurisdictionCount +=
Int32.Parse(jc.Text.Replace(",", "").Trim());
Label oipc = (Label)item.FindControl("lbPrior");
OpenItemsCountPrior +=
Int32.Parse(oipc.Text.Replace(",", "").Trim());
Label oicc = (Label)item.FindControl("lbCurrent");
OpenItemsCountCurrent +=
Int32.Parse(oicc.Text.Replace(",", "").Trim());
Label tr = (Label)item.FindControl("lblTotalRemain");
TotalRemainingItems +=
Int32.Parse(tr.Text.Replace(",", "").Trim());
}
if (e.Worksheet.Table.Rows.Count == grdCurrentandPrior.Items.Count + 1)
{
RowElement row = new RowElement();
GridFooterItem footer = (source as RadGrid).MasterTableView.GetItems(GridItemType.Footer)[0] as GridFooterItem;
foreach (GridColumn column in (source as RadGrid).MasterTableView.Columns)
{
CellElement cell = new CellElement();
string cellText = "";
if ((column.UniqueName == "Assignee") && (rdoAssignee.Checked == true))
cellText =
"Totals";
else
{
if ((column.UniqueName == "State") && (rdoState.Checked == true))
cellText =
"Totals";
}
if (column.UniqueName == "JurisdictionCount")
cellText = JurisdictionCount.ToString();
if (column.UniqueName == "OpenItemsCountPrior")
cellText = OpenItemsCountPrior.ToString();
if (column.UniqueName == "OpenItemsCountCurrent")
cellText = OpenItemsCountCurrent.ToString();
if (column.UniqueName == "TotalRemainingItems")
cellText = TotalRemainingItems.ToString();
if (cellText != "")
{
cell.Data.DataItem = cellText ==
" " ? "" : cellText;
row.Cells.Add(cell);
}
}
e.Worksheet.Table.Rows.Add(row);
}
}
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
if (e.Argument == "InitialPageLoad")
{
//simulate longer page load
//System.Threading.Thread.Sleep(2000);
Panel2.Visible =
true;
}
}
}
}
Hello.
In the web application I am developing, RadScheduler is used to display appointments users can join in.
Since users are not allowed to create appointments, property AllowInsert has been set to "False".
I would like to add the following features to the application:
1) If a time slot is double-clicked and there is no appointment associated with it, a message should be displayed stating that only existing appointments can be selected.
2) If a time slot is double-clicked and there is an appointment associated with it, a series of web service calls should be made in order to identify if the user is eligible to join the appointment.
If any of the conditions fails, a message should be displayed stating the reason(s) the user cannot join the appointment.
3) If a time slot is double-clicked, there is an appointment associated with it, and the conditions checked in step #2 are satisfied, the user should be allowed to join the appointment.
In this case, a form should be displayed with read-only fields, like the description and date/time of the appointment.
In addition, input fields should be displayed so that the user can provide additional information associated with the appointment.
After entering all information, the user should join the appointment after clicking Save.
I would appreciate whether some guidelines could be provided in order to implement these features.
Thank you in advance.
Paulo
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestTabStrip.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
asp:FormView
ID
=
"fvSystemConfig"
DefaultMode
=
"Edit"
DataSourceID
=
"odsDS"
RenderOuterTable
=
"false"
runat
=
"server"
>
<
EditItemTemplate
>
<
telerik:RadTabStrip
ID
=
"rts"
runat
=
"server"
MultiPageID
=
"rmp"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Core"
PageViewID
=
"rpv1"
/>
<
telerik:RadTab
Text
=
"UI"
PageViewID
=
"rpv2"
/>
<
telerik:RadTab
Text
=
"Export"
PageViewID
=
"rpv3"
/>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"rmp"
SelectedIndex
=
"0"
CssClass
=
"RadTabStripMultipage"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"rpv1"
runat
=
"server"
>
<
asp:TextBox
ID
=
"tb"
Text='<%# Bind("Name") %>' runat="server" />
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"rpv2"
runat
=
"server"
>
B
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"rpv3"
runat
=
"server"
>
C
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
<
asp:Button
ID
=
"Button1"
CommandName
=
"Update"
Text
=
"Save"
runat
=
"server"
/>
</
EditItemTemplate
>
</
asp:FormView
>
<
asp:ObjectDataSource
ID
=
"odsDS"
runat
=
"server"
SelectMethod
=
"GetData"
TypeName
=
"TestTabStrip.Default"
UpdateMethod
=
"UpdateData"
/>
</
div
>
</
form
>
</
body
>
</
html
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.Web.UI;
using
System.Collections;
namespace
TestTabStrip
{
public
partial
class
Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
protected
override
void
OnPreRender(EventArgs e)
{
((RadTabStrip)fvSystemConfig.Row.FindControl(
"rts"
)).Tabs[1].Visible =
false
;
base
.OnPreRender(e);
}
public
IEnumerable GetData()
{
return
new
List<
object
> {
new
{ Name =
"testing text"
} };
}
public
void
UpdateData(
string
name)
{
}
}
}