private void LoadSystemUsersToGrid(bool bSendMail, int[] iArrCheck) { SystemUserBO oSystemUserBO = new SystemUserBO(); Result oResult = new Result(); List<SystemUser> oListSystemUser = new List<SystemUser>(); try { oResult = oSystemUserBO.ShowAllSystemUsers(); if (oResult.ResultIsSuccess) { oListSystemUser = (List<SystemUser>)oResult.ResultObject; //Utils.SetSession(SessionManager.csStoreGridView, oListSystemUser); this.ViewState.Add(SessionManager.csStoreGridView, oListSystemUser); Grid_SystemUsers.DataSource = oListSystemUser; Grid_SystemUsers.DataBind(); if (bSendMail && iArrCheck!=null) { SendMailToSystemUserForUpdateNotifiaction(oListSystemUser, iArrCheck); } } else { lbl_error.ForeColor = Color.Red; lbl_error.Text = oResult.ResultMessage; } } catch (Exception oEx) { lbl_error.ForeColor = Color.Red; lbl_error.Text = "Grid Load Exception."; } }