Esempio n. 1
0
        public List <CrmsData> GetFeeType()
        {
            List <CrmsData> crmsDatas = new List <CrmsData>();
            string          sqlSelect = "select Type_Code, Type_Name from fees";

            using (SqlConnection con = new SqlConnection(_databaseCs))
            {
                try
                {
                    SqlCommand cmd = new SqlCommand(sqlSelect, con);
                    con.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        var crmsData = new CrmsData()
                        {
                            FeeTypeCode = (rdr["Type_Code"].ToString()),
                            FeeType     = (rdr["Type_Name"].ToString())
                        };

                        crmsDatas.Add(crmsData);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                }
                finally
                {
                    con.Close();
                }
            }

            return(crmsDatas);
        }
Esempio n. 2
0
        public List <CrmsData> GetGovernmentCodes()
        {
            List <CrmsData> crmsDatas = new List <CrmsData>();
            string          sqlSelect = "SELECT Crms_Code, Name from Govt_Codes";

            using (SqlConnection con = new SqlConnection(_databaseCs))
            {
                try
                {
                    SqlCommand cmd = new SqlCommand(sqlSelect, con);
                    con.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        var crmsData = new CrmsData()
                        {
                            GovernmentCode  = (rdr["Crms_Code"].ToString()),
                            GovernmentState = (rdr["Name"].ToString())
                        };

                        crmsDatas.Add(crmsData);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                }
                finally
                {
                    con.Close();
                }
            }

            return(crmsDatas);
        }
Esempio n. 3
0
        public List <CrmsData> GetLocationOfBeneficiary()
        {
            List <CrmsData> crmsDatas = new List <CrmsData>();
            string          sqlSelect = "select City_code, City_Name, State from LOCATION_OF_BENEFICIARY order by State ASC";

            using (SqlConnection con = new SqlConnection(_databaseCs))
            {
                try
                {
                    SqlCommand cmd = new SqlCommand(sqlSelect, con);
                    con.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        var crmsData = new CrmsData()
                        {
                            CityCode = (rdr["City_code"].ToString()),
                            CityName = (rdr["City_Name"].ToString()),
                            State    = (rdr["State"].ToString())
                        };

                        crmsDatas.Add(crmsData);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                }
                finally
                {
                    con.Close();
                }
            }

            return(crmsDatas);
        }
Esempio n. 4
0
        public List <CrmsData> GetBusinessLinesSubSector()
        {
            List <CrmsData> crmsDatas = new List <CrmsData>();
            string          sqlSelect = "select crms_code, Associated_Business_Line, Business_Type from business_lines_subsectors";

            using (SqlConnection con = new SqlConnection(_databaseCs))
            {
                try
                {
                    SqlCommand cmd = new SqlCommand(sqlSelect, con);
                    con.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        var crmsData = new CrmsData()
                        {
                            AssociatedBusinessLine     = (rdr["Associated_Business_Line"].ToString()),
                            BusinessLinesSubsectorCode = (rdr["Crms_Code"].ToString()),
                            BusinessLinesSubsector     = (rdr["Business_Type"].ToString())
                        };

                        crmsDatas.Add(crmsData);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                }
                finally
                {
                    con.Close();
                }
            }

            return(crmsDatas);
        }