コード例 #1
0
        /// <summary>
        /// To Get CDAP Village by ID
        /// </summary>
        /// <param name="village"></param>
        /// <returns></returns>
        public CDAPImplementationList GetCDAPVillageID(string village)
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;
            string           proc = "USP_GET_VILLAGEID";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("VILLAGES_", village);
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            cmd.Connection.Open();
            OracleDataReader       dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            CDAPImplementationBO   obCDAPImplementationBO    = null;
            CDAPImplementationList objCDAPImplementationList = new CDAPImplementationList();

            while (dr.Read())
            {
                obCDAPImplementationBO = new CDAPImplementationBO();
                if (!dr.IsDBNull(dr.GetOrdinal("VillageID")))
                {
                    obCDAPImplementationBO.Villageid = dr.GetInt32(dr.GetOrdinal("VillageID"));
                }

                objCDAPImplementationList.Add(obCDAPImplementationBO);
            }
            dr.Close();
            return(objCDAPImplementationList);
        }
コード例 #2
0
        /// <summary>
        /// To Get CDAP Phase Details By ID
        /// </summary>
        /// <param name="PhaseID"></param>
        /// <returns></returns>
        public CDAPImplementationList GetCDAPPhaseDetailsByID(int PhaseID)
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;
            string           proc = "USP_GET_TRN_CDAP_PHASESBYID";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("CDAP_PHASEID_", PhaseID);
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            cmd.Connection.Open();
            OracleDataReader       dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            CDAPImplementationBO   obCDAPImplementationBO    = null;
            CDAPImplementationList objCDAPImplementationList = new CDAPImplementationList();

            while (dr.Read())
            {
                obCDAPImplementationBO = new CDAPImplementationBO();
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PHASENO")))
                {
                    obCDAPImplementationBO.Cdap_phaseno = dr.GetInt32(dr.GetOrdinal("CDAP_PHASENO"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PHASEID")))
                {
                    obCDAPImplementationBO.Cdap_phaseid = dr.GetInt32(dr.GetOrdinal("CDAP_PHASEID"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PERIODFROM")))
                {
                    obCDAPImplementationBO.PeriodFrom = dr.GetDateTime(dr.GetOrdinal("CDAP_PERIODFROM"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PERIODTO")))
                {
                    obCDAPImplementationBO.PeriodTo = dr.GetDateTime(dr.GetOrdinal("CDAP_PERIODTO"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("PROJECTID")))
                {
                    obCDAPImplementationBO.ProjectedId = dr.GetInt32(dr.GetOrdinal("PROJECTID"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("EXPENDITURE")))
                {
                    obCDAPImplementationBO.EXPENDITURE = Convert.ToDecimal(dr.GetValue(dr.GetOrdinal("EXPENDITURE")));
                }
                objCDAPImplementationList.Add(obCDAPImplementationBO);
            }
            dr.Close();
            return(objCDAPImplementationList);
        }
コード例 #3
0
        /// <summary>
        /// To Get CDAP PAP Details
        /// </summary>
        /// <param name="PhaseactivityID"></param>
        /// <returns></returns>
        public CDAPImplementationList GetCDAPPAPDetails(int PhaseactivityID)
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;
            string           proc = "USP_GET_CDAPPLANDISPLAY";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("CDAP_PHASEACTIVITYID_", PhaseactivityID);
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            cmd.Connection.Open();
            OracleDataReader       dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            CDAPImplementationBO   obCDAPImplementationBO    = null;
            CDAPImplementationList objCDAPImplementationList = new CDAPImplementationList();

            while (dr.Read())
            {
                obCDAPImplementationBO = new CDAPImplementationBO();
                //  if (!dr.IsDBNull(dr.GetOrdinal("cdap_phaseid"))) obCDAPImplementationBO.Cdap_phaseid = dr.GetInt32(dr.GetOrdinal("cdap_phaseid"));
                //  if (!dr.IsDBNull(dr.GetOrdinal("cdap_phaseno"))) obCDAPImplementationBO.Cdap_phaseno = dr.GetInt32(dr.GetOrdinal("cdap_phaseno"));
                //   if (!dr.IsDBNull(dr.GetOrdinal("cdap_periodfrom"))) obCDAPImplementationBO.PeriodFrom = dr.GetDateTime(dr.GetOrdinal("cdap_periodfrom"));
                //  if (!dr.IsDBNull(dr.GetOrdinal("cdap_periodto"))) obCDAPImplementationBO.PeriodTo = dr.GetDateTime(dr.GetOrdinal("cdap_periodto"));
                if (!dr.IsDBNull(dr.GetOrdinal("cdap_activityid")))
                {
                    obCDAPImplementationBO.Cdap_activityid = dr.GetInt32(dr.GetOrdinal("cdap_activityid"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("district")))
                {
                    obCDAPImplementationBO.District = dr.GetString(dr.GetOrdinal("district"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("county")))
                {
                    obCDAPImplementationBO.County = dr.GetString(dr.GetOrdinal("county"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("subcounty")))
                {
                    obCDAPImplementationBO.SubCounty = dr.GetString(dr.GetOrdinal("subcounty"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("villages")))
                {
                    obCDAPImplementationBO.Village = dr.GetString(dr.GetOrdinal("villages"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("activitydetails")))
                {
                    obCDAPImplementationBO.Activitydetails = dr.GetString(dr.GetOrdinal("activitydetails"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("modeofimplementation")))
                {
                    obCDAPImplementationBO.Modeofimplementation = dr.GetString(dr.GetOrdinal("modeofimplementation"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("challenges")))
                {
                    obCDAPImplementationBO.Challenges = dr.GetString(dr.GetOrdinal("challenges"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("comments")))
                {
                    obCDAPImplementationBO.Comments = dr.GetString(dr.GetOrdinal("comments"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("activitydatefrom")))
                {
                    obCDAPImplementationBO.Activitydatefrom = dr.GetDateTime(dr.GetOrdinal("activitydatefrom"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("activitydateto")))
                {
                    obCDAPImplementationBO.Activitydateto = dr.GetDateTime(dr.GetOrdinal("activitydateto"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("hhid")))
                {
                    obCDAPImplementationBO.HhId = dr.GetInt32(dr.GetOrdinal("hhid"));
                }
                objCDAPImplementationList.Add(obCDAPImplementationBO);
            }
            dr.Close();
            return(objCDAPImplementationList);
        }
コード例 #4
0
        /// <summary>
        /// To Get CDAP Phase Activity Details
        /// </summary>
        /// <param name="prjctID"></param>
        /// <param name="PhaseID"></param>
        /// <returns></returns>
        public CDAPImplementationList GetCDAPPhaseActivityDetails(int prjctID, int PhaseID)
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;
            string           proc = "USP_GET_PHASEACTIVITY";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("PROJECTID_", prjctID);
            cmd.Parameters.Add("PHASEID_", PhaseID);
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            cmd.Connection.Open();
            OracleDataReader       dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            CDAPImplementationBO   obCDAPImplementationBO    = null;
            CDAPImplementationList objCDAPImplementationList = new CDAPImplementationList();

            while (dr.Read())
            {
                obCDAPImplementationBO = new CDAPImplementationBO();
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PHASENO")))
                {
                    obCDAPImplementationBO.Cdap_phaseno = dr.GetInt32(dr.GetOrdinal("CDAP_PHASENO"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PERIODFROM")))
                {
                    obCDAPImplementationBO.PeriodFrom = dr.GetDateTime(dr.GetOrdinal("CDAP_PERIODFROM"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PERIODTO")))
                {
                    obCDAPImplementationBO.PeriodTo = dr.GetDateTime(dr.GetOrdinal("CDAP_PERIODTO"));
                }
                //if (!dr.IsDBNull(dr.GetOrdinal("projectid"))) obCDAPImplementationBO.PeriodTo = dr.get(dr.GetOrdinal("projectid"));
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_PHASEACTIVITYID")))
                {
                    obCDAPImplementationBO.Cdap_phaseactivityid = dr.GetInt32(dr.GetOrdinal("CDAP_PHASEACTIVITYID"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("CDAP_ACTIVITYNAME")))
                {
                    obCDAPImplementationBO.Cdap_activityname = dr.GetString(dr.GetOrdinal("CDAP_ACTIVITYNAME"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("DISTRICT")))
                {
                    obCDAPImplementationBO.District = dr.GetString(dr.GetOrdinal("DISTRICT"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("COUNTY")))
                {
                    obCDAPImplementationBO.County = dr.GetString(dr.GetOrdinal("COUNTY"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("SUBCOUNTY")))
                {
                    obCDAPImplementationBO.SubCounty = dr.GetString(dr.GetOrdinal("SUBCOUNTY"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("VILLAGES")))
                {
                    obCDAPImplementationBO.Village = dr.GetString(dr.GetOrdinal("VILLAGES"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("activitydatefrom")))
                {
                    obCDAPImplementationBO.Activitydatefrom = dr.GetDateTime(dr.GetOrdinal("activitydatefrom"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("activitydateto")))
                {
                    obCDAPImplementationBO.Activitydateto = dr.GetDateTime(dr.GetOrdinal("activitydateto"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("activitydetails")))
                {
                    obCDAPImplementationBO.Activitydetails = dr.GetString(dr.GetOrdinal("activitydetails"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("modeofimplementation")))
                {
                    obCDAPImplementationBO.Modeofimplementation = dr.GetString(dr.GetOrdinal("modeofimplementation"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("challenges")))
                {
                    obCDAPImplementationBO.Challenges = dr.GetString(dr.GetOrdinal("challenges"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("comments")))
                {
                    obCDAPImplementationBO.Comments = dr.GetString(dr.GetOrdinal("comments"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("PAPNAMES")))
                {
                    obCDAPImplementationBO.PapNames = dr.GetString(dr.GetOrdinal("PAPNAMES"));
                }

                objCDAPImplementationList.Add(obCDAPImplementationBO);
            }
            dr.Close();
            return(objCDAPImplementationList);
        }