public List <DissabilityManagerDashboard> GetDissabilityManagerDashboard(ref DisabilityCumulative DisabilityCumulative, ref int yakkrcount, ref int appointment, string Agencyid, string userid) { List <DissabilityManagerDashboard> centerList = new List <DissabilityManagerDashboard>(); List <HrCenterInfo> centerList1 = new List <HrCenterInfo>(); try { command.Parameters.Add(new SqlParameter("@Agencyid", Agencyid)); command.Parameters.Add(new SqlParameter("@userid", userid)); command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "[SP_DissabilityManagerDashboard]"; DataAdapter = new SqlDataAdapter(command); _dataset = new DataSet(); DataAdapter.Fill(_dataset); if (_dataset.Tables[0] != null) { if (_dataset.Tables[0].Rows.Count > 0) { foreach (DataRow dr in _dataset.Tables[0].Rows) { DissabilityManagerDashboard info = new DissabilityManagerDashboard(); info.CenterId = EncryptDecrypt.Encrypt64(dr["center"].ToString()); info.Name = dr["centername"].ToString(); info.TotalChildren = dr["totalchildren"].ToString(); info.DisabilityPercentage = dr["TotalDisablePercentage"].ToString(); info.Indicated = dr["Indicated"].ToString(); info.Pending = (Convert.ToString(dr["pending"].ToString())); // + Convert.ToInt32(dr["WithdrawnPending"].ToString())).ToString(); info.Indicated = (Convert.ToString(dr["Indicated"].ToString())); // + Convert.ToInt32(dr["WithdrawnIndicated"].ToString())).ToString(); info.Qualified = dr["Qualified"].ToString(); info.Released = dr["Released"].ToString(); info.Completed = dr["Completed"].ToString(); centerList.Add(info); } } if (_dataset.Tables[1] != null && _dataset.Tables[1].Rows.Count > 0) { DisabilityCumulative.TotalAcivePercent = Convert.ToDouble(_dataset.Tables[1].Rows[0]["ActivePercent"]); DisabilityCumulative.TotalActiveClient = Convert.ToInt32(_dataset.Tables[1].Rows[0]["TotalActive"]); DisabilityCumulative.TotalCumulativeClient = Convert.ToInt32(_dataset.Tables[1].Rows[0]["TotalCumulative"]); DisabilityCumulative.TotalCumulativePercent = Convert.ToDouble(_dataset.Tables[1].Rows[0]["cumulativePercent"]); } } DataAdapter.Dispose(); command.Dispose(); } catch (Exception ex) { clsError.WriteException(ex); } finally { DataAdapter.Dispose(); command.Dispose(); } return(centerList); }
//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); }
public DissabilityManagerDashboard getDisableDocument(string Clientid) { DissabilityManagerDashboard obj = new DissabilityManagerDashboard(); //obj.income1 = new FamilyHousehold.calculateincome(); try { command.Parameters.Add(new SqlParameter("@DisableNotesId", Clientid)); command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "[getDisableDocument]"; DataAdapter = new SqlDataAdapter(command); //Due to Phone Type _dataset = new DataSet(); DataAdapter.Fill(_dataset); if (_dataset != null && _dataset.Tables.Count > 0) { obj.EImageByte = (byte[])_dataset.Tables[0].Rows[0]["DisableDocument"]; obj.EFileExtension = _dataset.Tables[0].Rows[0]["DisableDocumentName"].ToString(); obj.EFileName = _dataset.Tables[0].Rows[0]["DisableDocumentName"].ToString(); } DataAdapter.Dispose(); command.Dispose(); return(obj); } catch (Exception ex) { clsError.WriteException(ex); return(obj); } finally { DataAdapter.Dispose(); command.Dispose(); } }
public List <DissabilityManagerDashboard> GetDissabilityStaffDashboard(ref int yakkrcount, ref int appointment, string Agencyid, string userid) { List <DissabilityManagerDashboard> centerList = new List <DissabilityManagerDashboard>(); List <HrCenterInfo> centerList1 = new List <HrCenterInfo>(); try { command.Parameters.Add(new SqlParameter("@Agencyid", Agencyid)); command.Parameters.Add(new SqlParameter("@userid", userid)); command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "[SP_DissabilityStaffDashboard]"; DataAdapter = new SqlDataAdapter(command); _dataset = new DataSet(); DataAdapter.Fill(_dataset); if (_dataset.Tables[0] != null) { if (_dataset.Tables[0].Rows.Count > 0) { foreach (DataRow dr in _dataset.Tables[0].Rows) { DissabilityManagerDashboard info = new DissabilityManagerDashboard(); info.CenterId = EncryptDecrypt.Encrypt64(dr["center"].ToString()); info.Name = dr["centername"].ToString(); info.TotalChildren = dr["totalchildren"].ToString(); info.DisabilityPercentage = dr["TotalDisablePercentage"].ToString(); info.Indicated = dr["Indicated"].ToString(); info.Pending = dr["pending"].ToString(); info.Qualified = dr["Qualified"].ToString(); info.Released = dr["Released"].ToString(); centerList.Add(info); } } //if (_dataset.Tables[1].Rows.Count > 0) //{ // foreach (DataRow dr in _dataset.Tables[1].Rows) // { // HrCenterInfo info = new HrCenterInfo(); // info.CenterId = dr["center"].ToString(); // info.Name = dr["centername"].ToString(); // info.Address = dr["address"].ToString(); // info.Zip = dr["Zip"].ToString(); // info.SeatsAvailable = dr["AvailSeats"].ToString(); // centerList1.Add(info); // } // if (centerList.Count > 0 && centerList1.Count > 0) // { // centerList.FirstOrDefault().AllCentersList = centerList1; // } //} } DataAdapter.Dispose(); command.Dispose(); } catch (Exception ex) { clsError.WriteException(ex); } finally { DataAdapter.Dispose(); command.Dispose(); } return(centerList); }