Dock not refreshed

3 posts, 0 answers
  1. Golu
    Golu avatar
    41 posts
    Member since:
    Dec 2008

    Posted 02 Jul 2009 Link to this post

    1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ZZ_DashBoard.aspx.cs" Inherits="ZZ_DashBoard" 
    2     EnableViewState="false" %> 
    3  
    4 <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
    5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    6 <html xmlns="http://www.w3.org/1999/xhtml">  
    7 <head id="Head1" runat="server">  
    8     <title>DashBoard</title> 
    9     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
    10  
    11         <script type="text/javascript">  
    12             var currentLoadingPanel = null;  
    13             var currentUpdatedControl = null;  
    14  
    15             function RequestStart(sender, args) {  
    16                 currentLoadingPanel = $find("RadAjaxLoadingPanel1");  
    17                 currentUpdatedControl = "TableLayout";  
    18                 currentLoadingPanel.show(currentUpdatedControl);  
    19             }  
    20             function ResponseEnd() {  
    21                 //hide the loading panel and clean up the global variables    
    22                 if (currentLoadingPanel != null)  
    23                     currentLoadingPanel.hide(currentUpdatedControl);  
    24                 currentUpdatedControl = null;  
    25                 currentLoadingPanel = null;  
    26             }  
    27             function OnDateClick(sender, args) {  
    28                 //--when load calender dashlet  
    29                 args.get_domEvent().stopPropagation();  
    30             }  
    31  
    32             function CustomCommand(dock, args) {  
    33                 alert('11');  
    34                 args.set_cancel(true);  
    35  
    36             }  
    37             function btnAddZone_OnClientClick() {  
    38                 try {  
    39                     ctl = $find("<%= cmbTableLayouts.ClientID%>");  
    40                     if (ctl.get_value() == "") {  
    41                         alert("Select Table Layout !");  
    42                         ctl.get_inputDomElement().focus();  
    43                         return false;  
    44                     }  
    45                 }  
    46                 catch (e) {  
    47                     alert("Error:- Page: ZZ_DashBoard.aspx; Method: \"btnAddZone_OnClientClick\" \n Description:- \n" + e.description);  
    48                     return false;  
    49                 }  
    50             }  
    51             function btnAddDock_OnClientClick() {  
    52                 try {  
    53                     ctl = $find("<%= cmbDashlets.ClientID%>");  
    54                     if (ctl.get_value() == "") {  
    55                         alert("Select Dashlet !");  
    56                         ctl.get_inputDomElement().focus();  
    57                         return false;  
    58                     }  
    59                     ctl = $find("<%= cmbZone.ClientID%>");  
    60                     if (ctl.get_value() == "") {  
    61                         alert("Select Zone !");  
    62                         ctl.get_inputDomElement().focus();  
    63                         return false;  
    64                     }  
    65                 }  
    66                 catch (e) {  
    67                     alert("Error:- Page: ZZ_DashBoard.aspx; Method: \"btnAddDock_OnClientClick\" \n Description:- \n" + e.description);  
    68                     return false;  
    69                 }  
    70             }  
    71         </script> 
    72  
    73     </telerik:RadCodeBlock> 
    74 </head> 
    75 <body> 
    76     <form id="form1" runat="server">  
    77     <asp:ScriptManager ID="scriptmanager1" runat="server">  
    78     </asp:ScriptManager> 
    79     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    80         <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" /> 
    81         <AjaxSettings> 
    82             <telerik:AjaxSetting AjaxControlID="btnAddZone">  
    83                 <UpdatedControls> 
    84                     <telerik:AjaxUpdatedControl ControlID="lblMessage" /> 
    85                     <telerik:AjaxUpdatedControl ControlID="RadDockZone1" /> 
    86                     <telerik:AjaxUpdatedControl ControlID="RadDockZone2" /> 
    87                     <telerik:AjaxUpdatedControl ControlID="RadDockZone3" /> 
    88                     <telerik:AjaxUpdatedControl ControlID="cmbTableLayout" /> 
    89                 </UpdatedControls> 
    90             </telerik:AjaxSetting> 
    91             <telerik:AjaxSetting AjaxControlID="btnAddDock">  
    92                 <UpdatedControls> 
    93                     <telerik:AjaxUpdatedControl ControlID="lblMessage" /> 
    94                     <telerik:AjaxUpdatedControl ControlID="RadDockZone1" /> 
    95                     <telerik:AjaxUpdatedControl ControlID="RadDockZone2" /> 
    96                     <telerik:AjaxUpdatedControl ControlID="RadDockZone3" /> 
    97                 </UpdatedControls> 
    98             </telerik:AjaxSetting> 
    99             <telerik:AjaxSetting AjaxControlID="btnSaveDock">  
    100                 <UpdatedControls> 
    101                     <telerik:AjaxUpdatedControl ControlID="lblMessage" /> 
    102                     <telerik:AjaxUpdatedControl ControlID="RadDockZone1" /> 
    103                     <telerik:AjaxUpdatedControl ControlID="RadDockZone2" /> 
    104                     <telerik:AjaxUpdatedControl ControlID="RadDockZone3" /> 
    105                 </UpdatedControls> 
    106             </telerik:AjaxSetting> 
    107         </AjaxSettings> 
    108     </telerik:RadAjaxManager> 
    109     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="200px" 
    110         Width="250px" Transparency="50">  
    111         <img alt="Loading..." src='Images/LoadingProgressBar.gif' style="border: 0;" /> 
    112     </telerik:RadAjaxLoadingPanel> 
    113     <table id="Table1" width="100%" runat="server" cellspacing="0">  
    114         <tr> 
    115             <th class="tdMainHeader1" style="width: 10%;">  
    116                 <img alt="Customer" src="Images/dashboard.gif" /> 
    117                 Dashboard  
    118             </th> 
    119             <th style="text-align: right;" class="tdMainHeader1">  
    120                 <asp:Button ID="btnSaveDock" runat="server" Text="Save My Dashboard" OnClick="btnSaveDock_Click" /> 
    121                 <asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="100px" /> 
    122             </th> 
    123         </tr> 
    124         <tr id="trZoneLayout" runat="server">  
    125             <td style="width: 7%;" align="left">  
    126                 Zone Layout  
    127             </td> 
    128             <td align="left">  
    129                 <telerik:RadComboBox ID="cmbTableLayouts" runat="server">  
    130                 </telerik:RadComboBox> 
    131                 &nbsp;&nbsp;  
    132                 <asp:Button ID="btnAddZone" runat="server" Text="Add Zone" OnClick="btnAddZone_Click" 
    133                     Width="100px" /> 
    134                 <%--OnClientClick="javascript:return btnAddZone_OnClientClick();"--%> 
    135             </td> 
    136         </tr> 
    137         <tr> 
    138             <td> 
    139                 Dashlets  
    140             </td> 
    141             <td> 
    142                 <telerik:RadComboBox ID="cmbDashlets" runat="server" Skin="Office2007">  
    143                 </telerik:RadComboBox> 
    144                 &nbsp;&nbsp;  
    145                 <telerik:RadComboBox ID="cmbZone" runat="server" Skin="Office2007" DataSource="<%#GetZones() %>" 
    146                     DataTextField="ID" DataValueField="ClientID">  
    147                 </telerik:RadComboBox> 
    148                 &nbsp;&nbsp;  
    149                 <asp:Button ID="btnAddDock" runat="server" Text="Add Dock" Width="100px" OnClick="btnAddDock_Click" /> 
    150                 <%--OnClientClick="javascript:return btnAddDock_OnClientClick();"--%> 
    151             </td> 
    152         </tr> 
    153         <tr> 
    154             <td colspan="2">  
    155                 <telerik:RadDockLayout runat="server" ID="rdDockLayout" OnSaveDockLayout="rdDockLayout_SaveDockLayout" 
    156                     Skin="Office2007" OnLoadDockLayout="rdDockLayout_LoadDockLayout">  
    157                     <table width="100%" id="TableLayout" cellpadding="2" cellspacing="2">  
    158                         <tr id="trOneZone" runat="server">  
    159                             <td colspan="2">  
    160                                 <asp:Label ID="lblZone3" runat="server" Visible="false" Text="Zone3"></asp:Label> 
    161                                 <telerik:RadDockZone runat="server" ID="RadDockZone3" Width="99%" MinHeight="100" 
    162                                     Style="background: #f5f4e8; float: left;" Orientation="Vertical" FitDocks="true" 
    163                                     Visible="false" BorderStyle="None">  
    164                                 </telerik:RadDockZone> 
    165                             </td> 
    166                         </tr> 
    167                         <tr id="trTwoZone" runat="server">  
    168                             <td style="width: 50%;" align="left" valign="top">  
    169                                 <table width="100%">  
    170                                     <tr> 
    171                                         <td> 
    172                                             <asp:Label ID="lblZone1" runat="server" Visible="false" Text="Zone1"></asp:Label> 
    173                                             <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="99%" MinHeight="100" 
    174                                                 Style="background: #f5f4e8; float: left;" Orientation="Vertical" FitDocks="true" 
    175                                                 Visible="false" BorderStyle="None">  
    176                                             </telerik:RadDockZone> 
    177                                         </td> 
    178                                     </tr> 
    179                                 </table> 
    180                             </td> 
    181                             <td style="width: 50%;" align="left" valign="top">  
    182                                 <table width="100%">  
    183                                     <tr> 
    184                                         <td> 
    185                                             <asp:Label ID="lblZone2" runat="server" Visible="false" Text="Zone2"></asp:Label> 
    186                                             <telerik:RadDockZone runat="server" ID="RadDockZone2" Width="99%" MinHeight="100" 
    187                                                 Style="background: #d5f0fa; float: left;" Orientation="Vertical" FitDocks="true" 
    188                                                 Visible="false" BorderStyle="None">  
    189                                             </telerik:RadDockZone> 
    190                                         </td> 
    191                                     </tr> 
    192                                 </table> 
    193                             </td> 
    194                         </tr> 
    195                     </table> 
    196                 </telerik:RadDockLayout> 
    197             </td> 
    198         </tr> 
    199         <tr> 
    200             <td colspan="2">  
    201                 <asp:Label ID="lblMessage" runat="server"></asp:Label> 
    202             </td> 
    203         </tr> 
    204     </table> 
    205     </form> 
    206 </body> 
    207 </html> 
    208  
    209  
    210  int i = 0;  
    211     string dockState = "";  
    212     string strRegisteredZones = string.Empty;  
    213     string strDockTag = string.Empty;  
    214     string strZone = string.Empty;  
    215     string strZoneName = string.Empty;  
    216     string strDockTagName = string.Empty;  
    217     string strResult = string.Empty;  
    218     string strZoneControlID = string.Empty;  
    219     int nLoggedInUserId = 1;  
    220     int nPageId = 1;  
    221  
    222     DockStateWS objDockStateWS;  
    223     DataSet dsDataSet;  
    224     List<DockState> stateList;  
    225     StringBuilder serializedList = new StringBuilder();  
    226     ArrayList zones = new ArrayList();  
    227  
    228  
    229     protected void Page_InIt(object sender, EventArgs e)  
    230     {  
    231         try  
    232         {  
    233             cmbZone.DataBind();  
    234             BindDockZoneTableLayouts();  
    235             BindDashlets();  
    236             LoadDockState();  
    237             cmbZone.Enabled = true;  
    238             cmbDashlets.Enabled = true;  
    239         }  
    240         catch (Exception ex)  
    241         {  
    242             LogMessage(ex, 1, "Page_InIt");  
    243         }  
    244     }  
    245  
    246     protected void Page_Load(object sender, EventArgs e)  
    247     {  
    248         //LoadDockState();  
    249     }  
    250  
    251     protected void btnSaveDock_Click(object sender, EventArgs e)  
    252     {  
    253         try  
    254         {  
    255             //--Save Dock states in Database  
    256             System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();  
    257             stateList = rdDockLayout.GetRegisteredDocksState();  
    258  
    259  
    260             while (i < stateList.Count)  
    261             {  
    262                 serializedList.Append(serializer.Serialize(stateList[i]));  
    263                 serializedList.Append("|");  
    264                 i++;  
    265             }  
    266             dockState = serializedList.ToString();  
    267             if (dockState.Trim() != String.Empty)  
    268             {  
    269                 objDockStateWS = new DockStateWS();  
    270                 dsDataSet = new DataSet();  
    271                 dsDataSet = objDockStateWS.Insert_DashBoardState(0, nLoggedInUserId, dockState, nPageId);  
    272             }  
    273             //LoadDockState();  
    274         }  
    275         catch (Exception ex)  
    276         {  
    277             LogMessage(ex, 1, "btnSaveDock_Click");  
    278         }  
    279     }  
    280  
    281     protected void rdDockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e)  
    282     {  
    283         bool bDocStateCreate = false;  
    284  
    285         //--from database  
    286         DataTable dt = new DataTable();  
    287  
    288         try  
    289         {  
    290             System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();  
    291             //--use session  
    292             foreach (DockState state in CurrentDockStates)  
    293             {  
    294                 bDocStateCreate = true;  
    295                 e.Positions[state.UniqueName] = state.DockZoneID;  
    296                 e.Indices[state.UniqueName] = state.Index;  
    297             }  
    298             if (bDocStateCreate == false)  
    299             {  
    300                 objDockStateWS = new DockStateWS();  
    301                 dsDataSet = new DataSet();  
    302                 dsDataSet = objDockStateWS.Fetch_DashBoardState(0, nLoggedInUserId, nPageId);  
    303  
    304                 if (dsDataSet.Tables["DockState"].Rows.Count > 0)  
    305                 {  
    306                     dockState = Convert.ToString(dsDataSet.Tables["DockState"].Rows[0]["dock_dashboard_state"]);  
    307                     string[] currentDockStates = dockState.Split('|');  
    308                     foreach (string stringState in currentDockStates)  
    309                     {  
    310                         if (stringState.Trim() != string.Empty)  
    311                         {  
    312                             serializer = new System.Web.Script.Serialization.JavaScriptSerializer();  
    313                             DockState state = serializer.Deserialize<DockState>(stringState);  
    314                             RadDock dock = CreateRadDockFromState(state);  
    315                             rdDockLayout.Controls.Add(dock);  
    316                             LoadWidget(dock);  
    317                         }  
    318                     }  
    319                 }  
    320             }  
    321             //-- Get zones from Database  
    322             objDockStateWS = new DockStateWS();  
    323             dsDataSet = new DataSet();  
    324             dsDataSet = objDockStateWS.Fetch_UserZoneSettings(0, nLoggedInUserId, nPageId);  
    325  
    326             if (dsDataSet.Tables["Response"].Rows[0]["ResultCode"].ToString() != "0")  
    327             {  
    328                 strResult = dsDataSet.Tables["Response"].Rows[0]["ResultString"].ToString();  
    329                 LogMessage(new Exception(strResult), 1, "rdDockLayout_LoadDockLayout");  
    330                 return;  
    331             }  
    332             else  
    333             {  
    334                 if (dsDataSet.Tables["DockZoneSettings"].Rows.Count > 0)  
    335                 {  
    336                     for (int i = 0; i < dsDataSet.Tables["DockZoneSettings"].Rows.Count; i++)  
    337                     {  
    338                         string strDockZoneID = Convert.ToString(dsDataSet.Tables["DockZoneSettings"].Rows[i]["zone_setting_zones_name"]);  
    339                         int dockZoneDesignCode = Convert.ToInt32(dsDataSet.Tables["DockZoneSettings"].Rows[i]["zone_setting_table_layout_id"]);  
    340  
    341                         //-- Visible already registered Zones  
    342                         string[] strZones = strDockZoneID.Split(',');  
    343                         for (int j = 0; j < strZones.Length; j++)  
    344                         {  
    345                             RadDockZone dz = (RadDockZone)rdDockLayout.FindControl(strZones[j]);  
    346                             if (dz != null)  
    347                             {  
    348                                 dz.Visible = true;  
    349                             }  
    350                         }  
    351                         //-- Disable registered zone design layput from cmbZoneLayouts                              
    352                         cmbTableLayouts.FindItemByValue(Convert.ToString(dockZoneDesignCode)).Remove();  
    353                     }  
    354                 }  
    355             }  
    356             cmbZone.Enabled = true;  
    357             cmbDashlets.Enabled = true;  
    358             if (cmbTableLayouts.Items.Count == 0)  
    359             {  
    360                 trZoneLayout.Visible = false;  
    361             }  
    362             //  }  
    363         }  
    364         catch (Exception ex)  
    365         {  
    366             LogMessage(ex, 1, "rdDockLayout_LoadDockLayout");  
    367         }  
    368     }  
    369  
    370     protected void rdDockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e)  
    371     {  
    372         CurrentDockStates = rdDockLayout.GetRegisteredDocksState();  
    373     }  
    374  
    375     protected void btnAddDock_Click(object sender, EventArgs e)  
    376     {  
    377         try  
    378         {  
    379             UserControl uclDashlets = (UserControl)Page.LoadControl(Convert.ToString(cmbDashlets.SelectedValue));  
    380             strDockTag = Convert.ToString(cmbDashlets.SelectedValue);  
    381  
    382             RadDock dock = CreateRadDock();  
    383             RadDockZone dz = (RadDockZone)rdDockLayout.FindControl(Convert.ToString(cmbZone.SelectedValue));  
    384  
    385             dz.Controls.Add(dock);  
    386             dock.Tag = strDockTag;  
    387             LoadWidget(dock);  
    388         }  
    389         catch (Exception ex)  
    390         {  
    391             LogMessage(ex, 1, "btnAddDock_Click");  
    392         }  
    393     }  
    394  
    395     protected void btnAddZone_Click(object sender, EventArgs e)  
    396     {  
    397         try  
    398         {  
    399             if (cmbTableLayouts.SelectedValue == "1") //-- 1 Row 1 Column  
    400             {  
    401                 RadDockZone3.Visible = true;  
    402                 lblZone3.Visible = true;  
    403                 strRegisteredZones = RadDockZone3.ID;  
    404             }  
    405             else //-- 1 Row 2 Column  
    406             {  
    407                 RadDockZone1.Visible = true;  
    408                 RadDockZone2.Visible = true;  
    409                 lblZone1.Visible = true;  
    410                 lblZone2.Visible = true;  
    411                 strRegisteredZones = RadDockZone1.ID + "," + RadDockZone2.ID;  
    412             }  
    413  
    414             //--Save ZoneID and ZoneLayout in Database and remove selected item from cmbTableLayouts       
    415             objDockStateWS = new DockStateWS();  
    416             dsDataSet = new DataSet();  
    417             dsDataSet = objDockStateWS.Insert_UserZoneSettings(0, Convert.ToInt32(cmbTableLayouts.SelectedValue), strRegisteredZones, nLoggedInUserId, nPageId, nLoggedInUserId);  
    418  
    419             if (dsDataSet.Tables["Response"].Rows[0]["ResultCode"].ToString() != "0")  
    420             {  
    421                 strResult = dsDataSet.Tables["Response"].Rows[0]["ResultString"].ToString();  
    422                 LogMessage(new Exception(strResult), 1, "btnSaveDock_Click");  
    423                 return;  
    424             }  
    425             cmbTableLayouts.SelectedItem.Remove();  
    426             cmbZone.Enabled = true;  
    427             //cmbSelectDock.Enabled = true;  
    428             cmbDashlets.Enabled = true;  
    429  
    430             if (cmbTableLayouts.Items.Count == 0)  
    431             {  
    432                 trZoneLayout.Visible = false;  
    433             }  
    434         }  
    435         catch (Exception ex)  
    436         {  
    437             LogMessage(ex, 1, "btnAddZone_Click");  
    438         }  
    439     }  
    440  
    441     public ArrayList GetZones()  
    442     {  
    443         ArrayList zones = new ArrayList();  
    444  
    445         zones.Add(RadDockZone1);  
    446         zones.Add(RadDockZone2);  
    447         zones.Add(RadDockZone3);  
    448  
    449         return zones;  
    450     }  
    451  
    452     private List<DockState> CurrentDockStates  
    453     {  
    454         get  
    455         {  
    456             List<DockState> _currentDockStates = (List<DockState>)Session["CurrentDockStatesMyPortal"];  
    457             if (Object.Equals(_currentDockStates, null))  
    458             {  
    459                 _currentDockStates = new List<DockState>();  
    460                 Session["CurrentDockStatesMyPortal"] = _currentDockStates;  
    461             }  
    462             return _currentDockStates;  
    463         }  
    464         set  
    465         {  
    466             Session["CurrentDockStatesMyPortal"] = value;  
    467         }  
    468     }  
    469  
    470     private RadDock CreateRadDockFromState(DockState state)  
    471     {  
    472         RadDock dock = new RadDock();  
    473         dock.ID = string.Format("RadDock{0}", state.UniqueName);  
    474         dock.ApplyState(state);  
    475         dock.Command += new DockCommandEventHandler(dock_Command);  
    476         dock.Commands.Add(new DockCloseCommand());  
    477         dock.CommandsAutoPostBack = true;   //  rt now commented     
    478         return dock;  
    479     }  
    480  
    481     private RadDock CreateRadDock()  
    482     {  
    483         int docksCount = CurrentDockStates.Count;  
    484         string strCount = System.DateTime.Now.Millisecond.ToString();  
    485         RadDock dock = new RadDock();  
    486         dock.AutoPostBack = true;  
    487         //dock.Title = cmbSelectDock.SelectedItem.Text;  
    488         dock.Title = Convert.ToString(cmbDashlets.SelectedItem.Text);  
    489         dock.Text = string.Format("Added at {0}", DateTime.Now);  
    490         dock.ID = string.Format("RadDock{0}", strCount);  
    491         dock.UniqueName = string.Format("Dock {0}", strCount);  
    492  
    493         //rt now added  
    494         dock.Commands.Add(new DockCloseCommand());  
    495         dock.Commands.Add(new DockExpandCollapseCommand());  
    496         dock.Command += new DockCommandEventHandler(dock_Command);  
    497  
    498         return dock;  
    499     }  
    500  
    501     private void BindDockZoneTableLayouts()  
    502     {  
    503         try  
    504         {  
    505             objDockStateWS = new DockStateWS();  
    506             dsDataSet = new DataSet();  
    507             dsDataSet = objDockStateWS.Fetch_DockZoneTableLayouts(0);  
    508             cmbTableLayouts.DataSource = dsDataSet;  
    509             cmbTableLayouts.DataTextField = "dock_zone_layout";  
    510             cmbTableLayouts.DataValueField = "dock_zone_layout_id";  
    511             cmbTableLayouts.DataBind();  
    512             cmbTableLayouts.Items.Insert(0, new RadComboBoxItem("Select", ""));  
    513         }  
    514         catch (Exception ex)  
    515         {  
    516             LogMessage(ex, 1, "BindDockZoneTableLayouts");  
    517         }  
    518     }  
    519  
    520     private void BindDashlets()  
    521     {  
    522         try  
    523         {  
    524             objDockStateWS = new DockStateWS();  
    525             dsDataSet = new DataSet();  
    526             dsDataSet = objDockStateWS.Fetch_Dashlest(0);  
    527  
    528             cmbDashlets.DataSource = dsDataSet;  
    529             cmbDashlets.DataTextField = "dock_dashlets_name";  
    530             cmbDashlets.DataValueField = "dock_dashlects_value";  
    531             cmbDashlets.DataBind();  
    532             cmbDashlets.Items.Insert(0, new RadComboBoxItem("Select", ""));  
    533         }  
    534         catch (Exception ex)  
    535         {  
    536             LogMessage(ex, 1, "BindDashlets");  
    537         }  
    538     }  
    539  
    540     private void LoadWidget(RadDock dock)  
    541     {  
    542         try  
    543         {  
    544             if (string.IsNullOrEmpty(dock.Tag))  
    545             {  
    546                 return;  
    547             }  
    548             else  
    549             {  
    550                 Control widget = LoadControl(dock.Tag);  
    551                 dock.ContentContainer.Controls.Add(widget);  
    552             }  
    553         }  
    554         catch (Exception ex)  
    555         {  
    556             LogMessage(ex, 1, "LoadWidget");  
    557         }  
    558     }  
    559  
    560     private void LoadDockState()  
    561     {  
    562         for (int i = 0; i < CurrentDockStates.Count; i++)  
    563         {  
    564             if (CurrentDockStates[i].Closed == false)  
    565             {  
    566                 RadDock dock = CreateRadDockFromState(CurrentDockStates[i]);  
    567                 rdDockLayout.Controls.Add(dock);  
    568                 RadDockZone dz = (RadDockZone)rdDockLayout.FindControl(Convert.ToString(dock.DockZoneID));  
    569                 if (dz != null)  
    570                 {  
    571                     dz.Visible = true;  
    572                 }  
    573                 LoadWidget(dock);  
    574             }  
    575         }  
    576     }  
    577  
    578     void dock_Command(object sender, DockCommandEventArgs e)  
    579     {  
    580         try  
    581         {  
    582             if (e.Command.Name == "Close")  
    583             {  
    584                 (((RadDock)sender)).Closed = true;  
    585             }  
    586         }  
    587         catch (Exception ex)  
    588         {  
    589             LogMessage(ex, 1, "dock_Command");  
    590         }  
    591     }  
    592  
    593     void LogMessage(Exception e, Int32 param, string strMethodName)  
    594     {  
    595         if (param == 1)  
    596         {  
    597             lblMessage.Text = e.Message + "  Method:- " + strMethodName;  
    598             lblMessage.CssClass = "error";  
    599         }  
    600         else  
    601         {  
    602             lblMessage.Text = e.Message;  
    603             lblMessage.CssClass = "success";  
    604         }  
    605     }  
    606 }  
    607  
    608 WebMethods  
    609  
    610   [WebMethod]  
    611     public DataSet Fetch_DockZoneTableLayouts(long nSessionId)  
    612     {  
    613         int nResultCode = -1;  
    614         string strResult = "Fail - ";  
    615         SqlDataAdapter m_SqlDataAdapter = null;  
    616         DataTable m_DataTable = new DataTable("DockZoneTableLayouts");  
    617         string szColumns = string.Empty;  
    618         string szTemp = string.Empty;  
    619         string szFilter = string.Empty;  
    620         m_DataSet = new DataSet();  
    621         strParameters = Convert.ToString(nSessionId);  
    622  
    623         try  
    624         {  
    625             int nState = 1;  
    626             if (nSessionId > 0)  
    627                 nState = GetSessionState(nSessionId);  
    628             if (nState == 0)  
    629             {  
    630                 nResultCode = -1;  
    631                 strResult = "Your session has been expired, Please relogin again.\n " +  
    632                             "Method : Fetch_DockZoneTableLayouts \n" +  
    633                             "SessionID: " + nSessionId;  
    634                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    635                 return m_DataSet;  
    636             }  
    637             else if (nState == 2)  
    638             {  
    639                 nResultCode = -1;  
    640                 strResult = "Unable to get session state.\n " +  
    641                             "Method : Fetch_DockZoneTableLayouts \n" +  
    642                             "SessionID: " + nSessionId;  
    643                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    644                 return m_DataSet;  
    645             }  
    646         }  
    647         catch (SqlException ex)  
    648         {  
    649             nResultCode = ex.Number;  
    650             strResult = ex.Message;  
    651             LogMessage(strTemp + strResult, "Fetch_DockZoneTableLayouts", strParameters);  
    652             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    653             return m_DataSet;  
    654         }  
    655         catch (Exception ex)  
    656         {  
    657             nResultCode = -1;  
    658             strResult = ex.Message;  
    659             LogMessage(strTemp + strResult, "Fetch_DockZoneTableLayouts", strParameters);  
    660             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    661             return m_DataSet;  
    662         }  
    663  
    664         try  
    665         {  
    666             m_Connection.Openconnection();  
    667  
    668             strTemp = "SELECT dock_zone_layout_id,dock_zone_layout FROM CRM_DOCK_Zone_Table_Layouts";  
    669  
    670             m_SqlDataAdapter = new SqlDataAdapter(strTemp, m_Connection.oCon);  
    671             m_SqlDataAdapter.Fill(m_DataTable);  
    672             m_DataSet.Tables.Add(m_DataTable);  
    673  
    674             nResultCode = 0;  
    675             strResult = "Pass";  
    676         }  
    677         catch (SqlException ex)  
    678         {  
    679             nResultCode = ex.Number;  
    680             strResult = ex.Message;  
    681             LogMessage(strTemp + strResult + strResult, "Fetch_DockZoneTableLayouts", strParameters);  
    682         }  
    683         catch (Exception ex)  
    684         {  
    685             nResultCode = -1;  
    686             strResult = ex.Message;  
    687             LogMessage(strTemp + strResult, "Fetch_DockZoneTableLayouts", strParameters);  
    688         }  
    689         finally  
    690         {  
    691             m_Connection.Closeconnection();  
    692         }  
    693         m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    694         return m_DataSet;  
    695     }  
    696  
    697     [WebMethod]  
    698     public DataSet Fetch_Dashlest(long nSessionId)  
    699     {  
    700         int nResultCode = -1;  
    701         string strResult = "Fail - ";  
    702         SqlDataAdapter m_SqlDataAdapter = null;  
    703         DataTable m_DataTable = new DataTable("Dashlets");  
    704         string szColumns = string.Empty;  
    705         string szTemp = string.Empty;  
    706         string szFilter = string.Empty;  
    707         m_DataSet = new DataSet();  
    708         strParameters = Convert.ToString(nSessionId);  
    709  
    710         try  
    711         {  
    712             int nState = 1;  
    713             if (nSessionId > 0)  
    714                 nState = GetSessionState(nSessionId);  
    715             if (nState == 0)  
    716             {  
    717                 nResultCode = -1;  
    718                 strResult = "Your session has been expired, Please relogin again.\n " +  
    719                             "Method : Fetch_Dashlest \n" +  
    720                             "SessionID: " + nSessionId;  
    721                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    722                 return m_DataSet;  
    723             }  
    724             else if (nState == 2)  
    725             {  
    726                 nResultCode = -1;  
    727                 strResult = "Unable to get session state.\n " +  
    728                             "Method : Fetch_Dashlest \n" +  
    729                             "SessionID: " + nSessionId;  
    730                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    731                 return m_DataSet;  
    732             }  
    733         }  
    734         catch (SqlException ex)  
    735         {  
    736             nResultCode = ex.Number;  
    737             strResult = ex.Message;  
    738             LogMessage(strTemp + strResult, "Fetch_Dashlest", strParameters);  
    739             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    740             return m_DataSet;  
    741         }  
    742         catch (Exception ex)  
    743         {  
    744             nResultCode = -1;  
    745             strResult = ex.Message;  
    746             LogMessage(strTemp + strResult, "Fetch_Dashlest", strParameters);  
    747             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    748             return m_DataSet;  
    749         }  
    750  
    751         try  
    752         {  
    753             m_Connection.Openconnection();  
    754  
    755             strTemp = "SELECT dock_dashlects_value,dock_dashlets_name FROM CRM_DOCK_Dashlets";  
    756  
    757             m_SqlDataAdapter = new SqlDataAdapter(strTemp, m_Connection.oCon);  
    758             m_SqlDataAdapter.Fill(m_DataTable);  
    759             m_DataSet.Tables.Add(m_DataTable);  
    760  
    761             nResultCode = 0;  
    762             strResult = "Pass";  
    763         }  
    764         catch (SqlException ex)  
    765         {  
    766             nResultCode = ex.Number;  
    767             strResult = ex.Message;  
    768             LogMessage(strTemp + strResult + strResult, "Fetch_Dashlest", strParameters);  
    769         }  
    770         catch (Exception ex)  
    771         {  
    772             nResultCode = -1;  
    773             strResult = ex.Message;  
    774             LogMessage(strTemp + strResult, "Fetch_Dashlest", strParameters);  
    775         }  
    776         finally  
    777         {  
    778             m_Connection.Closeconnection();  
    779         }  
    780         m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    781         return m_DataSet;  
    782     }  
    783  
    784     [WebMethod]  
    785     public DataSet Insert_UserZoneSettings(long nSessionId, int nTableLayoutId, string strZonesName, int nUserId, int nPageId, int nLoggedInUserId)  
    786     {  
    787         long nResultCode = -1;  
    788         string strResult = "Fail - ";  
    789  
    790         m_DataSet = new DataSet();  
    791         m_SqlCommand = new SqlCommand();  
    792  
    793         strParameters = nSessionId + "," + nTableLayoutId + "," + strZonesName + "," + nUserId + "," + nPageId + "," + nLoggedInUserId + "," + strIPAddress;  
    794         try  
    795         {  
    796             int nState = 1;  
    797             if (nSessionId > 0)  
    798                 nState = GetSessionState(nSessionId);  
    799             if (nState == 0)  
    800             {  
    801                 nResultCode = -1;  
    802                 strResult = "Your session has been expired, Please relogin again.\n " +  
    803                             "Method : Insert_UserZoneSettings \n" +  
    804                             "SessionID: " + nSessionId;  
    805                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    806                 return m_DataSet;  
    807             }  
    808             else if (nState == 2)  
    809             {  
    810                 nResultCode = -1;  
    811                 strResult = "Unable to get session state.\n " +  
    812                             "Method : Insert_UserZoneSettings \n" +  
    813                             "SessionID: " + nSessionId;  
    814                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    815                 return m_DataSet;  
    816             }  
    817  
    818         }  
    819         catch (SqlException ex)  
    820         {  
    821             nResultCode = ex.Number;  
    822             strResult = ex.Message;  
    823             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    824             return m_DataSet;  
    825         }  
    826         catch (Exception ex)  
    827         {  
    828             nResultCode = -1;  
    829             strResult = ex.Message;  
    830             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    831             return m_DataSet;  
    832         }  
    833  
    834         try  
    835         {  
    836             m_Connection.Openconnection();  
    837  
    838             string strTemp = "INSERT INTO CRM_DOCK_User_Zone_Settings " +  
    839                              "(zone_setting_table_layout_id,zone_setting_zones_name,zone_setting_user_id, " +  
    840                              "zone_setting_page_id,zone_setting_created_by,zone_setting_created_date, " +  
    841                              "zone_setting_created_ip) " +  
    842                              "VALUES (" + nTableLayoutId + ",@strZonesName," + nUserId + "," + nPageId + "," + nLoggedInUserId + ",GetDate(),@strIPAddress) ";  
    843  
    844             m_SqlCommand = new SqlCommand(strTemp, m_Connection.oCon);  
    845             m_SqlCommand.Parameters.Add("@strZonesName", SqlDbType.VarChar).Value = strZonesName;  
    846             m_SqlCommand.Parameters.Add("@strIPAddress", SqlDbType.VarChar).Value = strIPAddress;  
    847  
    848             m_SqlCommand.ExecuteNonQuery();  
    849             nResultCode = 0;  
    850             strResult = "Pass - ";  
    851         }  
    852         catch (SqlException ex)  
    853         {  
    854             nResultCode = ex.Number;  
    855             strResult = ex.Message;  
    856             LogMessage(strTemp + strResult, "Insert_UserZoneSettings", strParameters);  
    857         }  
    858         catch (Exception ex)  
    859         {  
    860             nResultCode = -1;  
    861             strResult = ex.Message;  
    862             LogMessage(strTemp + strResult, "Insert_UserZoneSettings", strParameters);  
    863         }  
    864         finally  
    865         {  
    866             m_Connection.Closeconnection();  
    867         }  
    868         m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    869         return m_DataSet;  
    870     }  
    871  
    872     [WebMethod]  
    873     public DataSet Insert_DashBoardState(long nSessionId, int nLoggedInUserId, string strDockState, int nPageId)  
    874     {  
    875         long nResultCode = -1;  
    876         string strResult = "Fail - ";  
    877         int value = 0;  
    878         string strTemp = "";  
    879  
    880         m_DataSet = new DataSet();  
    881         m_SqlCommand = new SqlCommand();  
    882  
    883         strParameters = nSessionId + "," + nLoggedInUserId;  
    884         try  
    885         {  
    886             int nState = 1;  
    887             if (nSessionId > 0)  
    888                 nState = GetSessionState(nSessionId);  
    889             if (nState == 0)  
    890             {  
    891                 nResultCode = -1;  
    892                 strResult = "Your session has been expired, Please relogin again.\n " +  
    893                             "Method : Insert_DashBoardState \n" +  
    894                             "SessionID: " + nSessionId;  
    895                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    896                 return m_DataSet;  
    897             }  
    898             else if (nState == 2)  
    899             {  
    900                 nResultCode = -1;  
    901                 strResult = "Unable to get session state.\n " +  
    902                             "Method : Insert_DashBoardState \n" +  
    903                             "SessionID: " + nSessionId;  
    904                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    905                 return m_DataSet;  
    906             }  
    907  
    908         }  
    909         catch (SqlException ex)  
    910         {  
    911             nResultCode = ex.Number;  
    912             strResult = ex.Message;  
    913             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    914             return m_DataSet;  
    915         }  
    916         catch (Exception ex)  
    917         {  
    918             nResultCode = -1;  
    919             strResult = ex.Message;  
    920             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    921             return m_DataSet;  
    922         }  
    923  
    924         try  
    925         {  
    926             m_Connection.Openconnection();  
    927             //--Delete Exist DashBoard State  
    928             strTemp = "DELETE FROM CRM_DOCK_DashBoard_State WHERE dock_dashboard_state_user_id =" + nLoggedInUserId + " AND dock_dashboard_state_page_id = " + nPageId;  
    929             m_SqlCommand = new SqlCommand(strTemp, m_Connection.oCon);  
    930             m_SqlCommand.ExecuteNonQuery();  
    931  
    932             //--Insert DashBoard State  
    933             strTemp = "INSERT INTO CRM_DOCK_DashBoard_State " +  
    934                       "(dock_dashboard_state,dock_dashboard_state_user_id, dock_dashboard_state_page_id ," +  
    935                       "dock_dashboard_state_created_by,dock_dashboard_state_created_date,dock_dashboard_state_created_ip) " +  
    936                       "VALUES (@strDockState," + nLoggedInUserId + "," + nPageId + "," + nLoggedInUserId + ",GetDate(),@strIPAddress) ";  
    937  
    938             m_SqlCommand = new SqlCommand(strTemp, m_Connection.oCon);  
    939             m_SqlCommand.Parameters.Add("@strDockState", SqlDbType.VarChar).Value = strDockState;  
    940             m_SqlCommand.Parameters.Add("@strIPAddress", SqlDbType.VarChar).Value = strIPAddress;  
    941  
    942             value = Convert.ToInt32(m_SqlCommand.ExecuteScalar());  
    943             if (value > 0)  
    944             {  
    945                 nResultCode = 0;  
    946                 strResult = "Pass - ";  
    947             }  
    948         }  
    949         catch (SqlException ex)  
    950         {  
    951             nResultCode = ex.Number;  
    952             strResult = ex.Message;  
    953             LogMessage(strTemp + strResult, "Insert_DashBoardState", strParameters);  
    954         }  
    955         catch (Exception ex)  
    956         {  
    957             nResultCode = -1;  
    958             strResult = ex.Message;  
    959             LogMessage(strTemp + strResult, "Insert_DashBoardState", strParameters);  
    960         }  
    961         finally  
    962         {  
    963             m_Connection.Closeconnection();  
    964         }  
    965         m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    966         return m_DataSet;  
    967     }  
    968  
    969     [WebMethod]  
    970     public DataSet Fetch_DashBoardState(long nSessionId, int nLoggedInUserId, int nPageId)  
    971     {  
    972         int nResultCode = -1;  
    973         string strResult = "Fail - ";  
    974         SqlDataAdapter m_SqlDataAdapter = null;  
    975         DataTable m_DataTable = new DataTable("DockState");  
    976         string szColumns = string.Empty;  
    977         string szTemp = string.Empty;  
    978         string szFilter = string.Empty;  
    979         m_DataSet = new DataSet();  
    980         strParameters = nSessionId + "," + nLoggedInUserId + "," + nPageId;  
    981  
    982         try  
    983         {  
    984             int nState = 1;  
    985             if (nSessionId > 0)  
    986                 nState = GetSessionState(nSessionId);  
    987             if (nState == 0)  
    988             {  
    989                 nResultCode = -1;  
    990                 strResult = "Your session has been expired, Please relogin again.\n " +  
    991                             "Method : Fetch_DashBoardState \n" +  
    992                             "SessionID: " + nSessionId;  
    993                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    994                 return m_DataSet;  
    995             }  
    996             else if (nState == 2)  
    997             {  
    998                 nResultCode = -1;  
    999                 strResult = "Unable to get session state.\n " +  
    1000                             "Method : Fetch_DashBoardState \n" +  
    1001                             "SessionID: " + nSessionId;  
    1002                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1003                 return m_DataSet;  
    1004             }  
    1005         }  
    1006         catch (SqlException ex)  
    1007         {  
    1008             nResultCode = ex.Number;  
    1009             strResult = ex.Message;  
    1010             LogMessage(strTemp + strResult, "Fetch_DashBoardState", strParameters);  
    1011             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1012             return m_DataSet;  
    1013         }  
    1014         catch (Exception ex)  
    1015         {  
    1016             nResultCode = -1;  
    1017             strResult = ex.Message;  
    1018             LogMessage(strTemp + strResult, "Fetch_DashBoardState", strParameters);  
    1019             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1020             return m_DataSet;  
    1021         }  
    1022  
    1023         try  
    1024         {  
    1025             m_Connection.Openconnection();  
    1026  
    1027             strTemp = "SELECT dock_dashboard_state, dock_dashboard_state_user_id, " +  
    1028                       "dock_dashboard_state_created_by, dock_dashboard_state_created_date, " +  
    1029                       "dock_dashboard_state_created_ip,dock_dashboard_state_page_id " +  
    1030                       "FROM CRM_DOCK_DashBoard_State " +  
    1031                       "WHERE  dock_dashboard_state_user_id = " + nLoggedInUserId + " AND dock_dashboard_state_page_id =" + nPageId;  
    1032  
    1033             m_SqlDataAdapter = new SqlDataAdapter(strTemp, m_Connection.oCon);  
    1034             m_SqlDataAdapter.Fill(m_DataTable);  
    1035             m_DataSet.Tables.Add(m_DataTable);  
    1036  
    1037             nResultCode = 0;  
    1038             strResult = "Pass";  
    1039         }  
    1040         catch (SqlException ex)  
    1041         {  
    1042             nResultCode = ex.Number;  
    1043             strResult = ex.Message;  
    1044             LogMessage(strTemp + strResult + strResult, "Fetch_DashBoardState", strParameters);  
    1045         }  
    1046         catch (Exception ex)  
    1047         {  
    1048             nResultCode = -1;  
    1049             strResult = ex.Message;  
    1050             LogMessage(strTemp + strResult, "Fetch_DashBoardState", strParameters);  
    1051         }  
    1052         finally  
    1053         {  
    1054             m_Connection.Closeconnection();  
    1055         }  
    1056         m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1057         return m_DataSet;  
    1058     }  
    1059  
    1060     [WebMethod]  
    1061     public DataSet Fetch_UserZoneSettings(long nSessionId, int nLoggedInUserID, int nPageId)  
    1062     {  
    1063         int nResultCode = -1;  
    1064         string strResult = "Fail - ";  
    1065         SqlDataAdapter m_SqlDataAdapter = null;  
    1066         DataTable m_DataTable = new DataTable("DockZoneSettings");  
    1067         string szColumns = string.Empty;  
    1068         string szTemp = string.Empty;  
    1069         string szFilter = string.Empty;  
    1070         m_DataSet = new DataSet();  
    1071         strParameters = nSessionId + "," + nLoggedInUserID + "," + nPageId;  
    1072  
    1073         try  
    1074         {  
    1075             int nState = 1;  
    1076             if (nSessionId > 0)  
    1077                 nState = GetSessionState(nSessionId);  
    1078             if (nState == 0)  
    1079             {  
    1080                 nResultCode = -1;  
    1081                 strResult = "Your session has been expired, Please relogin again.\n " +  
    1082                             "Method : Fetch_UserZoneSettings \n" +  
    1083                             "SessionID: " + nSessionId;  
    1084                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1085                 return m_DataSet;  
    1086             }  
    1087             else if (nState == 2)  
    1088             {  
    1089                 nResultCode = -1;  
    1090                 strResult = "Unable to get session state.\n " +  
    1091                             "Method : Fetch_UserZoneSettings \n" +  
    1092                             "SessionID: " + nSessionId;  
    1093                 m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1094                 return m_DataSet;  
    1095             }  
    1096         }  
    1097         catch (SqlException ex)  
    1098         {  
    1099             nResultCode = ex.Number;  
    1100             strResult = ex.Message;  
    1101             LogMessage(strTemp + strResult, "Fetch_UserZoneSettings", strParameters);  
    1102             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1103             return m_DataSet;  
    1104         }  
    1105         catch (Exception ex)  
    1106         {  
    1107             nResultCode = -1;  
    1108             strResult = ex.Message;  
    1109             LogMessage(strTemp + strResult, "Fetch_UserZoneSettings", strParameters);  
    1110             m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1111             return m_DataSet;  
    1112         }  
    1113  
    1114         try  
    1115         {  
    1116  
    1117             m_Connection.Openconnection();  
    1118  
    1119             strTemp = "SELECT zone_setting_table_layout_id,zone_setting_zones_name,zone_setting_user_id, " +  
    1120                      "zone_setting_page_id,zone_setting_created_by,zone_setting_created_date,zone_setting_created_ip " +  
    1121                      "FROM CRM_DOCK_User_Zone_Settings " +  
    1122                      "WHERE zone_setting_user_id =" + nLoggedInUserID + " AND zone_setting_page_id=" + nPageId;  
    1123  
    1124             m_SqlDataAdapter = new SqlDataAdapter(strTemp, m_Connection.oCon);  
    1125             m_SqlDataAdapter.Fill(m_DataTable);  
    1126             m_DataSet.Tables.Add(m_DataTable);  
    1127  
    1128             nResultCode = 0;  
    1129             strResult = "Pass";  
    1130         }  
    1131         catch (SqlException ex)  
    1132         {  
    1133             nResultCode = ex.Number;  
    1134             strResult = ex.Message;  
    1135             LogMessage(strTemp + strResult + strResult, "Fetch_UserZoneSettings", strParameters);  
    1136         }  
    1137         catch (Exception ex)  
    1138         {  
    1139             nResultCode = -1;  
    1140             strResult = ex.Message;  
    1141             LogMessage(strTemp + strResult, "Fetch_Zones_Settings", strParameters);  
    1142         }  
    1143         finally  
    1144         {  
    1145             m_Connection.Closeconnection();  
    1146         }  
    1147         m_DataSet.Tables.Add(GetResponseTable(nResultCode, strResult));  
    1148         return m_DataSet;  
    1149     }  
    1150 }  
    1151  
    1152  

    Dear sir,

    I am creating a DashBoard, and its fully customizes.In that Im not using any update panel.
    the problem is when I closed any dock its closed, but continously closed next dock its not possible.
    before that I have to refrsh page then it works.same with save button . once save the state then after refreshing a page then we move / close dock.

    I mean on any activity  i m refreshing a page then its works..

    I am sending you my code.plz help me [sry 4 poor english]

    and plz answere in without using update panel


    thanks with regards

     

  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 06 Jul 2009 Link to this post

    Hi Golu,

    A page post back is needed for the dock state to be saved. So when the close command is pressed a post back should occur. As I can see from the source code that you sent you never set the CommandsAutoPostBack property of the RadDock to true in the CreateRadDock() method. Try setting it there and let me know if this solves your problem.



    All the best,
    Pero
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Golu
    Golu avatar
    41 posts
    Member since:
    Dec 2008

    Posted 09 Jul 2009 Link to this post

    Yes ! now its working perfect

    Thank you with Regards


Back to Top