Example #1
0
        public int AddNewConfigProjectsLib(string ProjectName)
        {
            Args.Clear();
            Args.Add("@ProjectName", ProjectName);

            return(int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_PROJECT_LIB_ID", Args).ToString()));
        }
        public int AddConfigCompany(string companyName)
        {
            Args.Clear();
            Args.Add("@CompanyName", companyName);

            return(int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_COMPANY", Args).ToString()));
        }
        public int AddNewConfigProjects(int ConfigProjectsLibId, int ConfigAreaId)
        {
            Args.Clear();
            Args.Add("@ConfigProjectsLibId", ConfigProjectsLibId);
            Args.Add("@ConfigAreaId", ConfigAreaId);

            return(int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_PROJECT_ID", Args).ToString()));
        }
        public void UpdateConfigProjectDocumentInfo(ConfigProject configProject)
        {
            Args.Clear();
            Args.Add("@ConfigProjectID", configProject.ID);
            Args.Add("@JDUploaded", configProject.JdUploaded);

            DBObjects.ExecSqlProcedure("UPDATE_PROJECT_DOCUMENT_INFO", Args);
        }
Example #5
0
        public void UpdateCandidateDocumentInfo(Candidate candidate)
        {
            Args.Clear();
            Args.Add("@CandidateID", candidate.ID);
            Args.Add("@CVUploaded", candidate.CvUploaded);

            DBObjects.ExecSqlProcedure("UPDATE_DOCUMENT_INFO", Args);
        }
Example #6
0
        public int AddCandidtate(Candidate candidate)
        {
            Args.Clear();
            Args.Add("@FirstEmail", candidate.FirstEmail);
            Args.Add("@SecondEmail", candidate.SecondEmail);
            Args.Add("@FirstName", candidate.FirstName);
            Args.Add("@LastName", candidate.LastName);
            Args.Add("@FirstPhone", candidate.FirstPhone);
            Args.Add("@SecondPhone", candidate.SecondPhone);

            return(int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_CANDIDATE", Args).ToString()));
        }
        public void AddCandidateHistory(CandidateHistory CandidateHistory)
        {
            Dictionary <dynamic, dynamic> Args = new Dictionary <dynamic, dynamic>();

            Args.Add("@SEQ", CandidateHistory.Seq);
            Args.Add("@CONFIG_STATUS_ID", CandidateHistory.ConfigStatusID);
            Args.Add("@TIMESTAMP", CandidateHistory.Timestamp);
            Args.Add("@COMMENTS", CandidateHistory.Comments);
            Args.Add("@HISTORY_OF_CONTACT", CandidateHistory.HistoryOfContact);
            Args.Add("@CV_RECEIVED", false);
            Args.Add("@CANDIDATES_PROJECTS_ID", CandidateHistory.CandidatesProjectsID);

            DBObjects.ExecSqlProcedure("ADD_CANDIDATE_HISTORY", Args);
        }
Example #8
0
        public void UpdateCandidate(Candidate candidate)
        {
            //Candidate candidateToUpdate = Candidates.Where(c => c.ID.Equals(candidate.ID)).FirstOrDefault();
            //candidateToUpdate = candidate;
            Args.Clear();
            Args.Add("@CandidateId", candidate.ID);
            Args.Add("@FirstName", candidate.FirstName);
            Args.Add("@LastName", candidate.LastName);
            Args.Add("@FirstPhone", candidate.FirstPhone);
            Args.Add("@SecondPhone", candidate.SecondPhone);
            Args.Add("@FirstEmail", candidate.FirstEmail);
            Args.Add("@SecondEmail", candidate.SecondEmail);

            DBObjects.ExecSqlProcedure("UPDATE_CANDIDATE_INFO", Args);
        }
Example #9
0
        public CandidateCompany AddAndCreateCandidateCompany(int candidateId, string position)
        {
            CandidateCompany candidateCompany = new CandidateCompany();

            Args.Clear();
            Args.Add("@CandidateID", candidateId);
            Args.Add("@Position", position);


            int id = int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_CANDIDATE_COMPANY", Args).ToString());

            candidateCompany.ID          = id;
            candidateCompany.CandidateID = candidateId;
            candidateCompany.Position    = position;
            candidateCompany.ProjectID   = 0;
            return(candidateCompany);
        }
Example #10
0
        public int AddCandidateCompany(int candidateId, ConfigCompany configCompany, string position, ConfigProject configProject)
        {
            Args.Clear();
            Args.Add("@CompanyID", configCompany.ID);
            Args.Add("@CandidateID", candidateId);
            Args.Add("@Position", position);
            Args.Add("@ProjectID", configProject.ID);

            try
            {
                return(int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_CANDIDATE_COMPANY", Args).ToString()));
            }
            catch
            {
                return(0);
            }
        }
        private void LoadConfigCompanyProjects()
        {
            DataTable dt = DBObjects.GetTableFromSQL("SELECT DISTINCT [COMPANY_ID],[CONFIG_PROJECT_ID] FROM [CANDIDATES_PROJECTS]");

            ConfigCompanyProjects = new ObservableCollection <ConfigCompanyProject>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        ConfigCompanyProjects.Add(new ConfigCompanyProject(row));
                    }
                }
            }

            catch (Exception x) { }
        }
        private void LoadConfigProjects()
        {
            DataTable dt = DBObjects.GetTableFromSQL("Select * FROM ConfigProject_View ");

            ConfigProjects = new ObservableCollection <ConfigProject>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        ConfigProjects.Add(new ConfigProject(row));
                    }
                }
            }
            catch (Exception ex)
            { }
        }
Example #13
0
        private void LoadConfigProjectsLibs()
        {
            DataTable dt = DBObjects.GetTableFromSQL("Select * FROM [CONFIG_PROJECT_LIB] ORDER BY PROJECT_NAME");

            ConfigProjectsLibs = new ObservableCollection <ConfigProjectsLib>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        ConfigProjectsLibs.Add(new ConfigProjectsLib(row));
                    }
                }
            }
            catch (Exception ex)
            { }
        }
        private void LoadConfigAreas()
        {
            DataTable dt = DBObjects.GetTableFromSQL("Select * FROM CONFIG_AREA ORDER BY AREA_NAME");

            ConfigAreas = new ObservableCollection <ConfigArea>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        ConfigAreas.Add(new ConfigArea(row));
                    }
                }
            }
            catch (Exception ex)
            { }
        }
Example #15
0
        private void LoadCandidates()
        {
            DataTable dt = DBObjects.GetTableFromSQL("Select * FROM CANDIDATES");

            Candidates = new ObservableCollection <Candidate>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        Candidates.Add(new Candidate(row));
                    }
                }
            }

            catch (Exception x) {}
        }
        private void LoadConfigStatusLibs()
        {
            DataTable dt = DBObjects.GetTableFromSQL("Select * FROM [CONFIG_STATUS_LIB] ORDER BY [DESCRIPTION]");

            ConfigStatusLibs = new ObservableCollection <ConfigStatusLib>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        ConfigStatusLibs.Add(new ConfigStatusLib(row));
                    }
                }
            }
            catch (Exception ex)
            { }
        }
        private void LoadConfigCompanys()
        {
            DataTable dt = DBObjects.GetTableFromSQL("Select * FROM [CONFIG_COMPANY] ORDER BY NAME ");

            ConfigCompanys = new ObservableCollection <ConfigCompany>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        ConfigCompanys.Add(new ConfigCompany(row));
                    }
                }
            }
            catch (Exception ex)
            { }
        }
Example #18
0
        public int AddConfigProjectCandidate(int candidateId, ConfigProject configProject, string position, int companyId)
        {
            Args.Clear();
            Args.Add("@CandidateID", candidateId);
            Args.Add("@ProjectID", configProject.ID);
            Args.Add("@Position", position);
            Args.Add("@CompanyID", companyId);



            try
            {
                return(int.Parse(DBObjects.GetExecProcedureWithArgsResult("ADD_NEW_CANDIDATE_PROJECT", Args).ToString()));
            }
            catch (Exception)
            {
                return(0);
            }
        }
Example #19
0
        private void LoadCandidateCompanys()
        {
            DataTable dt = DBObjects.GetTableFromSQL(@"Select * FROM 
                                                    CONFIG_COMPANY CC INNER JOIN
                                                    [CANDIDATE_COMPANY] C ON CC.ID = C.COMPANY_ID");

            CandidateCompanys = new ObservableCollection <CandidateCompany>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        CandidateCompanys.Add(new CandidateCompany(row));
                    }
                }
            }

            catch (Exception x) { }
        }
        private void LoadCandidateHistorysByID(int id)
        {
            Dictionary <string, string> Args = new Dictionary <string, string>();

            Args.Add("@CANDIDATE_ID", id.ToString());
            DataTable dt = DBObjects.GetTableFromSQL("FIND_CANDIDATE_HISTORY", Args);

            CandidateHistorys = new ObservableCollection <CandidateHistory>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        CandidateHistorys.Add(new CandidateHistory(row));
                    }
                }
            }
            catch (Exception ex)
            { }
        }
        public ObservableCollection <CandidateHistory> LoadHistorysByProjectID(int id)
        {
            Dictionary <string, string> Args = new Dictionary <string, string>();

            Args.Add("@ProjectID", id.ToString());
            DataTable dt = DBObjects.GetTableFromSQL("FIND_PROJECT_HISTORY", Args);

            CandidateHistorys = new ObservableCollection <CandidateHistory>();
            try
            {
                if (dt != null)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        CandidateHistorys.Add(new CandidateHistory(row));
                    }
                }
            }
            catch (Exception ex)
            { }
            return(CandidateHistorys);
        }