protected void MemberAuthorizationHistoryGrid_OnItemCommand(Object sender, Telerik.Web.UI.GridCommandEventArgs eventArgs)
        {
            if (MercuryApplication == null)
            {
                return;
            }

            System.Data.DataTable authorizationLineTable = MemberAuthorizationHistoryGrid_AuthorizationLineTable;


            if ((eventArgs.CommandName == "ExpandCollapse"))
            {
                Telerik.Web.UI.GridDataItem gridItem = (Telerik.Web.UI.GridDataItem)eventArgs.Item;

                Int64 authorizationId;


                if (Int64.TryParse(gridItem["AuthorizationId"].Text, out authorizationId))
                {
                    authorizationLineTable.Rows.Clear();

                    List <Mercury.Server.Application.AuthorizationLine> authorizationLines;

                    authorizationLines = MercuryApplication.AuthorizationLinesGet(authorizationId);

                    foreach (Mercury.Server.Application.AuthorizationLine currentDetail in authorizationLines)
                    {
                        String revenueInformation = "<span title=\"" + currentDetail.RevenueDescription + "\">" + currentDetail.RevenueCode + "</span>";

                        String serviceInformation = "<span title=\"" + currentDetail.ServiceDescription + "\">" + currentDetail.ServiceCode + "</span>";

                        authorizationLineTable.Rows.Add(

                            currentDetail.AuthorizationId.ToString(),

                            currentDetail.LineNumber.ToString(),

                            currentDetail.Status,

                            currentDetail.ServiceDate.ToString("MM/dd/yyyy"),

                            (currentDetail.AdmissionDate.HasValue) ? currentDetail.AdmissionDate.Value.ToString("MM/dd/yyyy") : "&nbsp",

                            (currentDetail.DischargeDate.HasValue) ? currentDetail.DischargeDate.Value.ToString("MM/dd/yyyy") : "&nbsp",

                            (!String.IsNullOrEmpty(currentDetail.RevenueCode)) ? revenueInformation : "&nbsp",

                            currentDetail.RevenueDescription,

                            (!String.IsNullOrEmpty(currentDetail.ServiceCode)) ? serviceInformation : "&nbsp",

                            currentDetail.ServiceDescription,

                            currentDetail.ModifierCode1,

                            currentDetail.UtilizedUnits,

                            currentDetail.Units

                            );
                    }


                    MemberAuthorizationHistoryGrid_AuthorizationLineTable = authorizationLineTable;

                    MemberAuthorizationHistoryGrid.MasterTableView.DetailTables[0].DataSource = authorizationLineTable;
                }
            }

            return;
        }