public void UnAssignRole(int UserID, int CompanyId, int RoleId)
 {
     EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
     objempentity.UnAssignRole(UserID, CompanyId, RoleId);
 }
 public void DeleteEmployeeRole(int user_id, string comp_name, string dept_name, string role_name)
 {
     EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
     objempentity.DeleteEmployeeRole(user_id, comp_name, dept_name, role_name);
 }
        public void InsertAssignCompany(string CompanyId, int UserID)
        {
            EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
            objempentity.InsertAssignCompany(CompanyId, UserID, int.Parse(Session["usersid"].ToString()));

        }
 public void UnAssignCompany(string CompanyId, int UserID)
 {
     EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
     objempentity.UnAssignCompany(CompanyId, UserID);
 }
        public string UpdateUserDetails(ArrayList employee,string s)
        {
            EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
            employee.Insert(6, Session["usersid"].ToString());
           // objempentity.UpdateUserDetails(employee);

            System.Data.DataSet ds1 = objempentity.CheckValidation();

            int j = 0;

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {

                if (ds1.Tables[0].Rows[i]["USER_NAME"].ToString().Equals(employee[1]) || employee[1].Equals(""))
                {
                    j = 1;
                    break;

                }

            }
            if (j == 0)
            {


                objempentity.UpdateUserDetails(employee);
            }
            else if (j == 1)
            {


                System.Data.DataSet ds = objempentity.UpdateUserDetails(employee);

                s = ds.Tables[0].Rows[0]["EMAIL_CHECKER"].ToString();
                if (s == "N")
                {

                }
                if (s == "Y")
                {

                }

            }
            else
            {

            }
            return s;
        }
 public void InsertUpdateEmployeeContectDetails(ArrayList contect)
 {
     EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
     contect.Insert(10, Session["usersid"].ToString());
     objempentity.InsertUpdateEmployeeContectDetails(contect);
 }
        public void InsertUserRoleForEmployee(ArrayList MyRole)
        {
            EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
            objempentity.InsertUserRoleForEmployee(MyRole);

        }
        public string InsertUpdateEmployee(ArrayList employee ,string m)
        {
            EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
            employee.Insert(14, Session["usersid"].ToString());
            //objempentity.InsertUpdateEmployee(employee);

            System.Data.DataSet ds1 = objempentity.CheckValidation();

            int j = 0;

            for (int i = 0; i < ds1.Tables[2].Rows.Count; i++)
            {

                if ((ds1.Tables[2].Rows[i]["EMP_NAME"].ToString().Equals(employee[3]+" "+employee[2]) || (employee[3]+" "+employee[2]).Equals("")))
                {
                    j = 1;
                    break;

                }

            }
            if (j == 0)
            {
                objempentity.InsertUpdateEmployee(employee);
            }
            else if (j == 1)
            {
                System.Data.DataSet ds = objempentity.InsertUpdateEmployee(employee);
                m = ds.Tables[0].Rows[0]["SUPPLIER_CHECKER"].ToString();
                if (m == "N")
                {

                }
                if (m == "Y")
                {

                }
            }
            return m;
        }
 public void DeleteEmployeeByEmployeeID(int employeeID)
 {
     EmployeemasterStoreprocedures objempentity = new EmployeemasterStoreprocedures();
     objempentity.deleteemployee(employeeID);
 }