public static Church getCurentPastorChurch(Pastor p)
        {
            Church church = new Church();
            string req    = "SELECT * FROM fgm_church WHERE stationCode in( SELECT codeStationTransfer FROM fgm_pastor_transfer WHERE mleTransferedPastor = '" + p.getCode() + "' and statusTransfert = 'Encours')";

            cmd = new MySqlCommand(req, DBConnection.con);
            dr  = cmd.ExecuteReader();
            if (dr.Read())
            {
                church.setCode(dr["stationCode"].ToString());
                church.setName(dr["stationName"].ToString());
                church.setDistrict(getDistrictByCode(dr["districtParentReff"].ToString()));
                church.setSlogang(dr["stationSlogang"].ToString());
                church.setIsDelete(Convert.ToInt32(dr["isBaseArea"]));
            }
            dr.Close();
            return(church);
        }
Exemple #2
0
        public List <Pastor> getPastor()
        {
            req = "SELECT * FROM fgm_pastor WHERE matriculePastor in(SELECT mleTransferedpastor FROM fgm_pastor_transfer WHERE codeStationTransfer ='" + this.churchCode + "', and statusTransfer ='Encours')";
            cmd = new MySqlCommand(req, DBConnection.con);
            MySqlDataReader dr      = cmd.ExecuteReader();
            List <Pastor>   pastors = new List <Pastor>();

            while (dr.Read())
            {
                Pastor pst = new Pastor();
                pst.setMatricule(dr["matriculePastor"].ToString());
                pst.setName(dr["pastorName"].ToString());
                pst.setSurname(dr["pastorSurname"].ToString());
                pst.setDateOfBirth(dr["pastorBirthdayDate"].ToString());
                pst.setPastorPlaceOfBirth(dr["birthdayPlace"].ToString());
                pst.setPastorFotherName(dr["pastorFatherName"].ToString());
                pst.setPastorMotherName(dr["pastorMotherName"].ToString());
                pst.setGender(dr["pastorSexe"].ToString());
                pst.setTels(dr["pastorPhone"].ToString());
                pst.setEmail(dr["pastorEmail"].ToString());
                pst.setConversionDate(dr["dateConversion"].ToString());
                pst.setProfessionBeforeBibleschool(dr["workBeforeBibleSchool"].ToString());
                pst.setRankProbation(dr["rankProbation"].ToString());
                pst.setAreaOfCall(dr["areaOfCalling"].ToString());
                pst.setNumberYearInArea(Convert.ToInt32(dr["nberYearArea"]));
                pst.setNumberYearDistrict(Convert.ToInt32(dr["nbreYearDistrict"]));
                pst.setMartialStatus(dr["martialSituation"].ToString());
                pst.setCountry(dr["nationality"].ToString());
                pst.setPastorAdresse(dr["pastorAdresse"].ToString());
                pst.setPicture(dr["photoProfil"].ToString());
                pst.setRaisonIndisp(dr["raisonIndispoMissionnaire"].ToString());
                pst.setIsActif(Convert.ToInt32(dr["isActif"]));
                pst.setIsDelete(Convert.ToInt32(dr["isDelete"]));
                pst.setId(Convert.ToInt32(dr["id"]));
                pastors.Add(pst);
            }
            dr.Close();
            return(pastors);
        }
        public static Pastor getPastorByCode(string mlePastor)
        {
            string req = "SELECT * FROM fgm_pastor WHERE matriculePastor = '" + mlePastor + "'";

            cmd = new MySqlCommand(req, DBConnection.con);
            dr  = cmd.ExecuteReader();
            Pastor pst = new Pastor();

            while (dr.Read())
            {
                pst.setMatricule(dr["matriculePastor"].ToString());
                pst.setName(dr["pastorName"].ToString());
                pst.setSurname(dr["pastorSurname"].ToString());
                pst.setDateOfBirth(dr["pastorBirthdayDate"].ToString());
                pst.setPastorPlaceOfBirth(dr["birthdayPlace"].ToString());
                pst.setPastorFotherName(dr["pastorFatherName"].ToString());
                pst.setPastorMotherName(dr["pastorMotherName"].ToString());
                pst.setGender(dr["pastorSexe"].ToString());
                pst.setTels(dr["pastorPhone"].ToString());
                pst.setEmail(dr["pastorEmail"].ToString());
                pst.setConversionDate(dr["dateConversion"].ToString());
                pst.setProfessionBeforeBibleschool(dr["workBeforeBibleSchool"].ToString());
                pst.setRankProbation(dr["rankProbation"].ToString());
                pst.setAreaOfCall(dr["areaOfCalling"].ToString());
                pst.setNumberYearInArea(Convert.ToInt32(dr["nberYearArea"]));
                pst.setNumberYearDistrict(Convert.ToInt32(dr["nbreYearDistrict"]));
                pst.setMartialStatus(dr["martialSituation"].ToString());
                pst.setCountry(dr["nationality"].ToString());
                pst.setPastorAdresse(dr["pastorAdresse"].ToString());
                pst.setPicture(dr["photoProfil"].ToString());
                pst.setRaisonIndisp(dr["raisonIndispoMissionnaire"].ToString());
                pst.setIsActif(Convert.ToInt32(dr["isActif"]));
                pst.setIsDelete(Convert.ToInt32(dr["isDelete"]));
                pst.setId(Convert.ToInt32(dr["id"]));
            }
            dr.Close();
            return(pst);
        }
Exemple #4
0
 public void setPastor(Pastor pastor)
 {
     this.pastor = pastor;
 }
 public static bool transfert(Pastor pastor, Church churTo, string startDate, string transferDate, string OccupationPosition, string statusTransfer)
 {
     return(false);
 }
 public void setPastorConcern(Pastor pastorConcern)
 {
     this.pastorConcern = pastorConcern;
 }