Example #1
0
        public List <Data_Vacancy> displaylistdal(string plist)
        {
            SqlConnection con = new SqlConnection(c);

            con.Open();
            List <Data_Vacancy> dum = new List <Data_Vacancy>();
            string     queryStr     = "Select * from E_Data_Vacancy where Vac_IsDeleted=0  and Vac_RecruitmentRequestID=@plist";
            SqlCommand com          = new SqlCommand(queryStr, con);

            com.Parameters.Add("@plist", SqlDbType.Int).Value = plist;
            SqlDataReader dr = com.ExecuteReader();

            while (dr.Read())
            {
                Data_Vacancy d = new Data_Vacancy();
                d.Vac_VacancyID       = dr.GetInt32(0);
                d.Vac_NoOfPositions   = dr.GetInt32(1);
                d.Vac_Skills          = dr.GetString(2);
                d.Vac_Experience      = dr.GetInt32(3);
                d.Vac_Location        = dr.GetString(4);
                d.Vac_Business_Domain = dr.GetString(5);
                //d.Vac_RequiredByDate = dr.GetString(6);
                d.Vac_RecruitmentRequestID = dr.GetInt32(8);
                dum.Add(d);
            }
            con.Close();
            return(dum);
        }
        public List <Data_Vacancy> edadddisdal(string recid)
        {
            SqlConnection con = new SqlConnection(c);

            con.Open();
            List <Data_Vacancy> dum = new List <Data_Vacancy>();
            string     queryStr     = "select * from E_Data_Vacancy where Vac_Location=(select distinct(Vac_Location) from E_Data_Vacancy where Vac_RecruitmentRequestID=@recid) and Vac_IsDeleted=0 and Vac_RecruitmentRequestID is null and Vac_ApprovalStatus='Approved'";
            SqlCommand com          = new SqlCommand(queryStr, con);

            com.Parameters.Add("@recid", SqlDbType.Int).Value = recid;
            SqlDataReader dr = com.ExecuteReader();

            while (dr.Read())
            {
                Data_Vacancy d = new Data_Vacancy();
                d.Vac_VacancyID       = dr.GetInt32(0);
                d.Vac_NoOfPositions   = dr.GetInt32(1);
                d.Vac_Skills          = dr.GetString(2);
                d.Vac_Experience      = dr.GetInt32(3);
                d.Vac_Location        = dr.GetString(4);
                d.Vac_Business_Domain = dr.GetString(5);
                d.Vac_RequiredByDate  = dr.GetDateTime(6);
                //d.Vac_RecruitmentRequestID = dr.GetInt32(8);
                dum.Add(d);
            }
            return(dum);
        }
Example #3
0
        public List <Data_Vacancy> displayvacdal(string loc)
        {
            SqlConnection con = new SqlConnection(c);

            con.Open();
            List <Data_Vacancy> dum = new List <Data_Vacancy>();
            string        queryStr  = "Select * from E_Data_Vacancy where Vac_IsDeleted=0 and Vac_ApprovalStatus='Approved' and Vac_RecruitmentRequestID is null and Vac_Location='" + loc + "'";
            SqlCommand    com       = new SqlCommand(queryStr, con);
            SqlDataReader dr        = com.ExecuteReader();

            while (dr.Read())
            {
                Data_Vacancy d = new Data_Vacancy();
                d.Vac_VacancyID       = dr.GetInt32(0);
                d.Vac_NoOfPositions   = dr.GetInt32(1);
                d.Vac_Skills          = dr.GetString(2);
                d.Vac_Experience      = dr.GetInt32(3);
                d.Vac_Location        = dr.GetString(4);
                d.Vac_Business_Domain = dr.GetString(5);
                d.Vac_RequiredByDate  = dr.GetDateTime(6);

                dum.Add(d);
            }
            con.Close();
            return(dum);
        }
Example #4
0
        public List <Data_Vacancy> viewdisdal(string pid, string txt)
        {
            SqlConnection con = new SqlConnection(c);

            con.Open();
            List <Data_Vacancy> dum = new List <Data_Vacancy>();
            string     queryStr     = "";
            SqlCommand com;

            if (pid != "" && txt != "")
            {
                queryStr = "Select * from E_Data_Vacancy where Vac_IsDeleted=0  and Vac_RecruitmentRequestID in (select Rec_RecruitmentRequestID from E_Data_Recruitment where Rec_PlacementConsultantID=@pid and Rec_RequesteddDate between '" + txt + " 00:00:00.000' AND '" + txt + " 23:59:59.999')";
                com      = new SqlCommand(queryStr, con);
                com.Parameters.Add("@pid", SqlDbType.Int).Value = pid;
                //com.Parameters.Add("@dt", SqlDbType.Date).Value = txt;
            }
            else if (pid != "" && txt == "")
            {
                queryStr = "Select * from E_Data_Vacancy where Vac_IsDeleted=0  and Vac_RecruitmentRequestID in (select Rec_RecruitmentRequestID from E_Data_Recruitment where Rec_PlacementConsultantID=@pid)";
                com      = new SqlCommand(queryStr, con);
                com.Parameters.Add("@pid", SqlDbType.Int).Value = pid;
                //com.Parameters.Add("@dt", SqlDbType.Date).Value = txt;
            }
            else
            {
                queryStr = "Select * from E_Data_Vacancy where Vac_IsDeleted=0  and Vac_RecruitmentRequestID in (select Rec_RecruitmentRequestID from E_Data_Recruitment where  Rec_RequesteddDate between '" + txt + " 00:00:00.000' AND '" + txt + " 23:59:59.999')";
                com      = new SqlCommand(queryStr, con);
                //com.Parameters.Add("@pid", SqlDbType.Int).Value = pid;
                //com.Parameters.Add("@dt", SqlDbType.Date).Value = txt;
            }

            SqlDataReader dr = com.ExecuteReader();

            while (dr.Read())
            {
                Data_Vacancy d = new Data_Vacancy();
                d.Vac_VacancyID       = dr.GetInt32(0);
                d.Vac_NoOfPositions   = dr.GetInt32(1);
                d.Vac_Skills          = dr.GetString(2);
                d.Vac_Experience      = dr.GetInt32(3);
                d.Vac_Location        = dr.GetString(4);
                d.Vac_Business_Domain = dr.GetString(5);
                //d.Vac_RequiredByDate = dr.GetString(6);
                d.Vac_RecruitmentRequestID = dr.GetInt32(8);
                dum.Add(d);
            }
            con.Close();
            return(dum);
        }