//public Roster GetDisableDocumentsList(string agencyid, string ClientId) //{ // List<Roster> RosterList = new List<Roster>(); // Roster _roster = new Roster(); // List<ClassRoom> classList = new List<ClassRoom>(); // List<DisableNotes> disablenotes = new List<DisableNotes>(); // try // { // command.Parameters.Add(new SqlParameter("@agencyid", agencyid)); // command.Parameters.Add(new SqlParameter("@ClientId", EncryptDecrypt.Decrypt64(ClientId))); // command.Connection = Connection; // command.CommandType = CommandType.StoredProcedure; // command.CommandText = "DisableDocumentsList"; // DataAdapter = new SqlDataAdapter(command); // _dataset = new DataSet(); // DataAdapter.Fill(_dataset); // if (_dataset.Tables[0] != null) // { // if (_dataset.Tables[0].Rows.Count > 0) // { // DisableNotes info = null; // foreach (DataRow dr in _dataset.Tables[0].Rows) // { // info = new DisableNotes(); // info.noteid = dr["DisableNotesId"].ToString(); ; // info.Name = dr["Firstname"].ToString(); // info.DisableDocumentName = dr["DisableDocumentName"].ToString(); // info.DocumentDescription = dr["DocumentDescription"].ToString(); // disablenotes.Add(info); // } // _roster.disablenotes = disablenotes;//Changes on 29Dec2016 // } // } // } // catch (Exception ex) // { // clsError.WriteException(ex); // } // finally // { // if (Connection != null) // Connection.Close(); // } // return _roster; //} public DissabilityManagerDashboard BindDisableTypeByClient(string clientid) { DissabilityManagerDashboard _dissabilityManagerDashboard = new DissabilityManagerDashboard(); List <DisablilityType> _DisablilityType = new List <DisablilityType>(); try { command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@ClientId", EncryptDecrypt.Decrypt64(clientid)); command.CommandText = "[SP_DisablitiesTypeByClientId]"; DataAdapter = new SqlDataAdapter(command); _dataset = new DataSet(); DataAdapter.Fill(_dataset); if (_dataset.Tables[0] != null) { if (_dataset.Tables[0].Rows.Count > 0) { DisablilityType info = null; foreach (DataRow dr in _dataset.Tables[0].Rows) { info = new DisablilityType(); info.Id = Convert.ToInt32(dr["ID"]); info.DisabilityType = dr["DisablitiesType"].ToString(); info.IsChecked = Convert.ToBoolean(Convert.ToInt32(dr["ischecked"])); info.PrimaryTypeId = Convert.ToInt32(dr["PrimaryDisability"]); _DisablilityType.Add(info); } _dissabilityManagerDashboard.disabilitytype = _DisablilityType;//Changes on 29Dec2016 } } } catch (Exception ex) { clsError.WriteException(ex); } finally { if (Connection != null) { Connection.Close(); } } return(_dissabilityManagerDashboard); }
//public Roster GetDisableDocumentsList(string agencyid, string ClientId) //{ // List<Roster> RosterList = new List<Roster>(); // Roster _roster = new Roster(); // List<ClassRoom> classList = new List<ClassRoom>(); // List<DisableNotes> disablenotes = new List<DisableNotes>(); // try // { // command.Parameters.Add(new SqlParameter("@agencyid", agencyid)); // command.Parameters.Add(new SqlParameter("@ClientId", EncryptDecrypt.Decrypt64(ClientId))); // command.Connection = Connection; // command.CommandType = CommandType.StoredProcedure; // command.CommandText = "DisableDocumentsList"; // DataAdapter = new SqlDataAdapter(command); // _dataset = new DataSet(); // DataAdapter.Fill(_dataset); // if (_dataset.Tables[0] != null) // { // if (_dataset.Tables[0].Rows.Count > 0) // { // DisableNotes info = null; // foreach (DataRow dr in _dataset.Tables[0].Rows) // { // info = new DisableNotes(); // info.noteid = dr["DisableNotesId"].ToString(); ; // info.Name = dr["Firstname"].ToString(); // info.DisableDocumentName = dr["DisableDocumentName"].ToString(); // info.DocumentDescription = dr["DocumentDescription"].ToString(); // disablenotes.Add(info); // } // _roster.disablenotes = disablenotes;//Changes on 29Dec2016 // } // } // } // catch (Exception ex) // { // clsError.WriteException(ex); // } // finally // { // if (Connection != null) // Connection.Close(); // } // return _roster; //} public DissabilityManagerDashboard BindDisableType() { DissabilityManagerDashboard _dissabilityManagerDashboard = new DissabilityManagerDashboard(); List <DisablilityType> _DisablilityType = new List <DisablilityType>(); try { command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "[SP_DisablitiesTypeDropdownList]"; DataAdapter = new SqlDataAdapter(command); _dataset = new DataSet(); DataAdapter.Fill(_dataset); if (_dataset.Tables[0] != null) { if (_dataset.Tables[0].Rows.Count > 0) { DisablilityType info = null; foreach (DataRow dr in _dataset.Tables[0].Rows) { info = new DisablilityType(); info.Id = Convert.ToInt32(dr["ID"]); info.DisabilityType = dr["DisablitiesType"].ToString(); //info.Notes = dr["Notes"].ToString(); _DisablilityType.Add(info); } _dissabilityManagerDashboard.disabilitytype = _DisablilityType;//Changes on 29Dec2016 } } } catch (Exception ex) { clsError.WriteException(ex); } finally { if (Connection != null) { Connection.Close(); } } return(_dissabilityManagerDashboard); }