Beispiel #1
0
        public bool ChackedIfDataExsist()
        {
            bool      exsist = false;
            DataTable tb     = DbComunication.GetInventoryTable("Select * From Employees");

            if (tb.Rows.Count != 0)
            {
                exsist = true;
            }
            return(exsist);
        }
Beispiel #2
0
        public string GetSkillURL(int skillId)
        {
            DataTable db = DbComunication.GetInventoryTable(" Select URL From SkillsInfoes where SkillId = " + skillId);

            if (db.Rows.Count > 0)
            {
                return(db.Rows[0]["URL"].ToString());
            }
            else
            {
                return(" there is no url ");
            }
        }
Beispiel #3
0
        public DataTable GetEmployeesIdFromSkillsNames(string skillNames)
        {
            string    ret   = "";
            DataTable empId = DbComunication.GetInventoryTable(" Select EmployeeId From Skills Where SkillName = " + skillNames);

            foreach (DataRow row in empId.Rows)
            {
                ret = ret + "EmployeeId = '" + row["EmployeeId"].ToString() + "' ";
                if (row != empId.Rows[empId.Rows.Count - 1])
                {
                    ret = ret + " or ";
                }
            }

            DataTable empKnowSkill = DbComunication.GetInventoryTable("Select * From Employees Where " + ret);

            return(empKnowSkill);
        }
Beispiel #4
0
        public string[] GetReferences(int employeeId)
        {
            DataTable refe = DbComunication.GetInventoryTable(" Select * From EmpReferences Where EmployeeId = " + employeeId);

            string[] anse = new string[refe.Rows.Count];
            int      i    = 0;

            foreach (DataRow row in refe.Rows)
            {
                anse[i] = string.Format(row["FirstName"].ToString() + " " +
                                        row["LastName"].ToString() + " Position: " +
                                        row["Position"].ToString() + " Email: " +
                                        row["Email"].ToString());
                i++;
            }
            ;


            return(anse);
        }
Beispiel #5
0
 public void AddNewReferences(int employeeId, string lastName, string firstName, string position, string alias, string email)
 {
     DbComunication.InsertNewReferences(employeeId, lastName, firstName, position, alias, email);
 }
Beispiel #6
0
 public void AddNewSkill(int employeeId, string skillName, string briefDesc)
 {
     DbComunication.InsertNewSkill(employeeId, skillName, briefDesc);
 }
Beispiel #7
0
 public void InsertNewEmp(string lastName, string firstName, string alias, string email)
 {
     DbComunication.InsertNewEmployee(lastName, firstName, alias, email);
 }
Beispiel #8
0
 public DataTable GetSkillsById(int empId)
 {
     return(DbComunication.GetInventoryTable(" Select * From Skills Where EmployeeId = " + empId));
 }
Beispiel #9
0
 public DataTable GetAllEmployees()
 {
     return(DbComunication.GetInventoryTable(" Select * From Employees "));
 }
Beispiel #10
0
 public void AddUrlToSkill(int skillId, string url)
 {
     DbComunication.InsertURLToSkill(skillId, url);
 }