Beispiel #1
0
        /// <summary>
        /// 根据公司ID,计算该公司指定时间段内员工考勤异常情况
        /// </summary>
        /// <param name="strCompanyId"></param>
        /// <param name="dtPunchFrom"></param>
        /// <param name="dtPunchTo"></param>
        /// <param name="strMsg"></param>
        public void CheckAbnormRdForCompanyByDate(string strCompanyId, DateTime dtPunchFrom, DateTime dtPunchTo, ref string strMsg)
        {
            if (dtPunchFrom > dtPunchTo)
            {
                return;
            }

            EmployeeBLL          bllEmployee  = new EmployeeBLL();
            List <T_HR_EMPLOYEE> entEmployees = new List <T_HR_EMPLOYEE>();
            var ents = bllEmployee.GetEmployeeByCompanyID(strCompanyId, dtPunchFrom);

            if (ents == null)
            {
                strMsg = "当前查询公司无员工记录";
                return;
            }

            if (ents.Count() == 0)
            {
                strMsg = "当前查询公司无员工记录";
                return;
            }

            entEmployees = ents.ToList();

            AbnormRecordBLL bllAbnormRecord = new AbnormRecordBLL();

            bllAbnormRecord.CheckAbnormRecordForEmployees(entEmployees, dtPunchFrom, dtPunchTo, ref strMsg);
        }
    }//end Button_Click
    #endregion

    #region "Methods"
    public void PopulateUserControlsFromSession() {
        try {
            //Get installation from session             
            Installation i = WebUtils.GetInstallationObjectFromSession();

            //services
            List<string> servNames = InstallationBLL.GetServiceDetailsFull(i);
            this.ServiceSelectionUserControl.PopulateServices(servNames);

            //Staff
            List<string> staffNames = InstallationBLL.GetStaff1stNameWithTitle(i);
            this.StaffSelectionUserControl.PopulateStaff(staffNames);

            //date&time
            DateTime todaysDate = this.DateSelectionUserControl.GetSelectedDate();
            System.Diagnostics.Debug.Print("CALENDAR TIME: " + todaysDate.TimeOfDay.ToString() + "ON todays date: " + todaysDate.ToString());
            //ALWAYS pick 1st staff by default
            EmployeeBLL selStaff = i.Employees[0];//staff can be null
            PopulateDateAndTimeUserControl(selStaff, todaysDate);

            //End-user Details 
            //DO nothing start with empty fields

            //Payment

        }
        catch (Exception ex) {
            System.Diagnostics.Debug.Print("<h2>BookAppt.aspx, PopulateUserControlsFromSession Method</h2>\n" + ex.ToString() + "\n" + ex.InnerException + "\n" + ex.Message);
            // Log the exception and notify system operators
            ExceptionUtility.LogException(ex, "BookAppt.aspx, PopulateUserControlsFromSession Method");
            ExceptionUtility.NotifySystemOps(ex);
        }//end catch
    }//end void
Beispiel #3
0
        /// <summary>
        /// 根据员工指纹编号,计算该员工指定月份考勤异常情况
        /// </summary>
        /// <param name="strFingertId">员工指纹编号</param>
        /// <param name="strPunchMonth">月份</param>
        /// <param name="strMsg">返回处理消息</param>
        public void CheckAbnormRecordByFingertId(string strFingertId, string strPunchMonth, ref string strMsg)
        {
            DateTime dtCheck = new DateTime();
            DateTime dtStart = new DateTime(), dtEnd = new DateTime();

            DateTime.TryParse(strPunchMonth + "-1", out dtStart);
            if (dtStart <= dtCheck)
            {
                return;
            }

            dtEnd = dtStart.AddMonths(1).AddDays(-1);
            //DateTime.TryParse("2011-10-16", out dtEnd);

            List <T_HR_EMPLOYEE> entEmployees = new List <T_HR_EMPLOYEE>();

            EmployeeBLL   bllEmployee         = new EmployeeBLL();
            T_HR_EMPLOYEE entEmployee         = bllEmployee.GetEmployeeByFingerPrintID(strFingertId);

            if (entEmployee == null)
            {
                strMsg = "当前指纹编号无对应的员工";
                return;
            }

            entEmployees.Add(entEmployee);

            AbnormRecordBLL bllAbnormRecord = new AbnormRecordBLL();

            bllAbnormRecord.CheckAbnormRecordForEmployees(entEmployees, dtStart, dtEnd, ref strMsg);
        }
Beispiel #4
0
        /// <summary>
        /// 根据员工ID,计算该公司指定时间段内员工考勤异常情况
        /// </summary>
        /// <param name="strEmployeeIds"></param>
        /// <param name="dtPunchFrom"></param>
        /// <param name="dtPunchTo"></param>
        /// <param name="strMsg"></param>
        public void CheckAbnormRdForEmployeesByDate(string strEmployeeIds, DateTime dtPunchFrom, DateTime dtPunchTo, ref string strMsg)
        {
            if (dtPunchFrom > dtPunchTo)
            {
                return;
            }

            string[] strlist = strEmployeeIds.Split(',');

            EmployeeBLL          bllEmployee  = new EmployeeBLL();
            List <T_HR_EMPLOYEE> entEmployees = bllEmployee.GetEmployeeByIDs(strlist);

            if (entEmployees == null)
            {
                strMsg = "当前员工编号无对应的员工";
                return;
            }

            if (entEmployees.Count() == 0)
            {
                strMsg = "当前员工编号无对应的员工";
                return;
            }

            AbnormRecordBLL bllAbnormRecord = new AbnormRecordBLL();

            bllAbnormRecord.CheckAbnormRecordForEmployees(entEmployees, dtPunchFrom, dtPunchTo, ref strMsg);
        }
Beispiel #5
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnadd_Click(object sender, EventArgs e)
        {
            IfNull();

            try
            {
                Employee em = new Employee();
                em.EmpName     = txtname.Text.Trim();
                em.DeptID      = Convert.ToInt32(cmbdeptName.SelectedValue);
                em.EmpBirthday = Convert.ToDateTime(txtEmpBirthday.Text.Trim());
                em.Empphone    = txtEmpphone.Text.Trim();

                int num = EmployeeBLL.AddBLL(em);
                if (num > 0)
                {
                    MessageBox.Show("添加成功");
                }
                else
                {
                    MessageBox.Show("添加失败");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
			EmployeeBLL objBll = new EmployeeBLL();
			if(hfType.Value != "Edit")
			{
				if (objBll.GetEmployeeByWorkNo(txtWorkNoEdit.Text.Trim()) > 0)
				{
					SessionSet.PageMessage = "该员工编码已经存在!";
					return;
				}
			}
			else
			{
				if (ViewState["OldWorkNo"].ToString() != txtWorkNoEdit.Text.Trim())
				{
					if (objBll.GetEmployeeByWorkNo(txtWorkNoEdit.Text.Trim()) > 0)
					{
						SessionSet.PageMessage = "该员工编码已经存在!";
						return;
					}
				}
			}
            SaveEmployeeInfo();
            if(hfType.Value != "Edit")
            {
                Response.Write("<script>window.opener.frames['ifEmployeeInfo'].form1.Refresh.value='true';window.opener.frames['ifEmployeeInfo'].form1.submit();window.close();</script>");
            }
            else
            {
                Response.Write("<script>window.opener.form1.Refresh.value='true';window.opener.form1.submit();window.close();</script>");
            }
        }
Beispiel #7
0
 public ActionResult ChangePassword(EmployeePassword model)
 {
     try
     {
         if (string.IsNullOrEmpty(model.password))
         {
             ModelState.AddModelError("password", "Old password expected");
         }
         if (string.IsNullOrEmpty(model.nPassword))
         {
             ModelState.AddModelError("nPassword", "New password expected");
         }
         if (string.IsNullOrEmpty(model.nlPassword))
         {
             ModelState.AddModelError("nlPassword", "Password expected");
         }
         model.password   = MD5Helper.EncodeMD5(model.password);
         model.nPassword  = MD5Helper.EncodeMD5(model.nPassword);
         model.nlPassword = MD5Helper.EncodeMD5(model.nlPassword);
         EmployeeBLL.ChangePassword(model.Id, model.password, model.nPassword, model.nlPassword);
         return(RedirectToAction("Index", "Dashboard"));
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", ex.Message + ":" + ex.StackTrace);
         return(View(model));
     }
 }
Beispiel #8
0
        protected void FillPage()
        {
            //获取考试基本信息
            lblTitle.Text = "模拟考试";

            // 用于前台JS判断是否完成全部试题
            hfPaperItemsCount.Value = ViewState["ExamNumber"].ToString();
            lblTitleRight.Text      = "总共" + ViewState["ExamNumber"] + "题";


            string strSql = "select a.*,GetStationOrgID(org_id) StationOrgID from Employee a "
                            + " where Employee_ID=" + Request.QueryString.Get("employeeID");
            OracleAccess db = new OracleAccess();

            DataRow dr = db.RunSqlDataSet(strSql).Tables[0].Rows[0];

            lblWorkNo.Text = dr["Work_No"].ToString();
            lblIDCard.Text = dr["Identity_CardNo"].ToString();
            lblSex.Text    = dr["Sex"].ToString();

            EmployeeBLL objEmployeebll = new EmployeeBLL();
            Employee    objEmployee    = objEmployeebll.GetEmployee(Convert.ToInt32(Request.QueryString.Get("employeeID")));

            lblOrgName.Text = objEmployee.OrgName;
            lblPost.Text    = objEmployee.PostName;
            lblName.Text    = objEmployee.EmployeeName;
        }
Beispiel #9
0
        public ActionResult Edit(EmployeeVM objVM)
        {
            var resultVM = new ResultVM();

            try
            {
                using (var objBLL = new EmployeeBLL())
                {
                    objVM.Logo = Helper.FilePaths(Server.MapPath("~/content/employee/" + objVM.ID + "/img/"));
                    //objVM.LastActivityBy = ActiveUser.ID;
                    int id = objBLL.SaveData(objVM);
                    if (id > 0)
                    {
                        resultVM.Data      = id;
                        resultVM.IsSuccess = true;
                        resultVM.Message   = "Record added successfully!";
                    }
                    else
                    {
                        resultVM.Message = "Failed to add record!";
                    }
                }
            }
            catch (Exception ex)
            {
                resultVM.Message = "Something went wrong!";
                resultVM.Errors  = ex.ToString();
                Helper.LogException(ex);
            }

            return(Json(resultVM, JsonRequestBehavior.AllowGet));
        }
Beispiel #10
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtUserNo.Text.Trim() == "" || txtPassword.Text.Trim() == "")
     {
         MessageBox.Show("Please fill the userno and password");
     }
     else
     {
         List <EMPLOYEE> employeelist = EmployeeBLL.GetEmployees(Convert.ToInt32(txtUserNo.Text), txtPassword.Text);
         if (employeelist.Count == 0)
         {
             MessageBox.Show("please control your information");
         }
         else
         {
             EMPLOYEE employee = new EMPLOYEE();
             employee = employeelist.First();
             UserStatic.EmployeeID = employee.ID;
             UserStatic.UserNo     = employee.UserNo;
             UserStatic.isAdmin    = Convert.ToBoolean(employee.isAdmin);
             FrmMain frm = new FrmMain();
             this.Hide();
             frm.ShowDialog();
         }
     }
 }
        void DisplayEmployeeNow(int Id)
        {
            Employee oEmp = new EmployeeBLL(mAccount).getElementById(Id);

            txtHoTen.Text     = "" + oEmp.EmployeeName;
            txtEmail.Text     = "" + oEmp.Email;
            txtDiaChi.Text    = "" + oEmp.Address;
            txtMobile.Text    = "" + oEmp.Mobile;
            txtCMND.Text      = "" + oEmp.IdentityNumber;
            txtDienThoai.Text = "" + oEmp.Phone;
            txtMaThue.Text    = "" + oEmp.PersonalTaxCode;
            txtMoTa.Text      = "" + oEmp.Description;
            txtNoiCap.Text    = "" + oEmp.PlaceOfIssue;
            txtNoiDung.Text   = "" + oEmp.EmployeeCV;
            txtQueQuan.Text   = "" + oEmp.PlaceBirthday;
            txtTruong.Text    = "" + oEmp.UniversityName;

            dateEditNgayCap.EditValue  = "" + oEmp.DateOfIssue;
            dateEditNgaySinh.EditValue = "" + oEmp.DateBirhday;

            //lookUpEditChucVu.EditValue
            //lookUpEditPhongBan.EditValue
            //lookUpEditTrungTam.EditValue

            if (oEmp.Sex == 0)
            {
                cboGioiTinh.Text = "Nam";
            }
            else if (oEmp.Sex == 1)
            {
                cboGioiTinh.Text = "Nữ";
            }
        }
Beispiel #12
0
        private void btn_Kaydet_Click(object sender, EventArgs e)
        {
            try
            {
                Person person = new Person
                {
                    FirstName  = txt_firstName.Text,
                    MiddleName = txt_MiddleName.Text,
                    LastName   = txt_LastName.Text
                };

                Employee employee = new Employee
                {
                    BirthDate        = dtp_BirthDate.Value,
                    JobTitle         = txt_JobTitle.Text,
                    LoginID          = txt_LoginId.Text,
                    NationalIDNumber = int.Parse(txt_nationalID.Text)
                };


                EmployeeBLL.InsertEmployee(person, employee);

                MessageBox.Show("Kayıt eklendi");
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Hata alındı:" + ex.Message);
                MessageBox.Show("Kayıt ekelemede hata" + ex.Message);
            }


            this.Close();
        }
        public ActionResult Edit(EmployeeVM objVM)
        {
            try
            {
                using (var objBLL = new EmployeeBLL())
                {
                    objVM.Logo = Helper.FilePaths(Server.MapPath("~/content/employee/" + objVM.ID + "/img/"));
                    //objVM.LastActivityBy = ActiveUser.ID;
                    int id = objBLL.SaveData(objVM);
                    if (id > 0)
                    {
                        TempData[Toastr.SUCCESS] = "Record updated successfully!";
                        return(RedirectToAction("Index"));
                    }
                    else
                    {
                        TempData[Toastr.ERROR] = "Failed to update record!";
                    }
                }
            }
            catch (Exception ex)
            {
                TempData[Toastr.ERROR] = "Something went wrong!";
                Helper.LogException(ex);
            }

            MVCHelper.DDLDepartment(this, selected: objVM.DepartmentId);
            MVCHelper.DDLCountry(this, selected: objVM.Country);
            MVCHelper.DDLState(this, selected: objVM.State, countryName: objVM.Country);
            return(View(objVM));
        }
    protected void DateSelectionUserControl_CalendarSelectionChanged(object sender, EventArgs e) {
        try {
            System.Diagnostics.Debug.Print("calendar selection change new eventHandlers IS working");

            Installation i = WebUtils.GetInstallationObjectFromSession();
            EmployeeBLL selStaff = null;
            //get staff selected
            int staffSel_index = this.StaffSelectionUserControl.GetSelectedServiceIndex();//staff can be null
            //NB index 0 = "No Preference"
            if (staffSel_index > 0)
                selStaff = i.Employees[staffSel_index - 1];
            else
                //ALWAYS pick 1st staff by default
                selStaff = i.Employees[0];//staff can be null


            //updated usercontrol with new date
            DateTime userNewSelDate = this.DateSelectionUserControl.GetSelectedDate();
            PopulateDateAndTimeUserControl(selStaff, userNewSelDate);
        }
        catch (Exception ex) {
            System.Diagnostics.Debug.Print("<h2>BookAppt.aspx, DateSelectionUserControl_CalendarSelectionChanged()</h2>\n" + ex.ToString() + "\n" + ex.InnerException + "\n" + ex.Message);
            // Log the exception and notify system operators
            ExceptionUtility.LogException(ex, "BookAppt.aspx, DateSelectionUserControl_CalendarSelectionChanged()");
            ExceptionUtility.NotifySystemOps(ex);
        }//e
    }
 public Form_ChangePassword(int EmpID)
 {
     EmployeeID  = EmpID;
     employeeBLL = new EmployeeBLL();
     employee    = employeeBLL.FindEmployee(EmployeeID);
     InitializeComponent();
 }
Beispiel #16
0
        public void showData()
        {
            var employees = EmployeeBLL.Search(pageIndex, pageSize, sortBy, sortOrder, filterAssignment, filterGender, keyword);

            dgEmployees.ItemsSource = employees.Items;
            pageCount = employees.PageCount;
        }
Beispiel #17
0
        public ActionResult GetEmployee()
        {
            try
            {
                int      pageIndex = Convert.ToInt32(Request.QueryString["page"]);
                int      pageSize  = Convert.ToInt32(Request.QueryString["limit"]);
                string   branchIds = Request.QueryString["id"];
                string[] _ids      = branchIds.Split(',');
                int[]    ids       = Array.ConvertAll <string, int>(_ids, id =>
                {
                    return(int.Parse(id));
                });
                EmployeeBLL     eBll       = new EmployeeBLL();
                int             rows       = 0;
                int             totalPages = 0;
                List <Employee> list       = eBll.LoadPagedEntitys(pageIndex, pageSize, out rows, out totalPages, t => ids.Contains(t.branchId), true, t => t.Id);
                if (list != null && list.Count > 0)
                {
                    List <Branch> branchList = new BranchBLL().GetEntitys();
                    list.ForEach(t =>
                    {
                        branchList.ForEach(y =>
                        {
                            if (t.branchId == y.Id)
                            {
                                t.branchName = y.branchName;
                            }
                        });
                    });
                    List <Role> roleList = new RoleBLL().GetEntitys();
                    list.ForEach(t =>
                    {
                        roleList.ForEach(y =>
                        {
                            if (t.roleId == y.Id)
                            {
                                t.roleName = y.roleName;
                            }
                        });
                    });
                    List <Position> positionList = new PositionBLL().GetEntitys();
                    list.ForEach(t =>
                    {
                        positionList.ForEach(y =>
                        {
                            if (t.positionId == y.Id)
                            {
                                t.positionName = y.positionName;
                            }
                        });
                    });
                }
                string resJson = Common.Common.JsonSerialize(list);
                resJson = "{total:" + rows + ",root:" + resJson + "}";
                return(Content(resJson));
            }
            catch { }

            return(Content("{}"));
        }
 public UC_Employee()
 {
     employeeBLL = new EmployeeBLL();
     InitializeComponent();
     LoadEmployee();
     LoadEmployeeEE();
 }
 public UCEmployee_Add(Form_Restaurant form, DataGridView data)
 {
     datagrid    = data;
     employeeBLL = new EmployeeBLL();
     mainform    = form;
     InitializeComponent();
 }
 void FillAllData()
 {
     dto = EmployeeBLL.GetAll();
     dataGridView1.DataSource            = dto.Employees;
     dataGridView1.Columns[0].Visible    = false;
     dataGridView1.Columns[1].HeaderText = "User No";
     dataGridView1.Columns[2].HeaderText = "Name";
     dataGridView1.Columns[3].HeaderText = "Surname";
     dataGridView1.Columns[4].HeaderText = "Department";
     dataGridView1.Columns[5].HeaderText = "Position";
     dataGridView1.Columns[6].Visible    = false;
     dataGridView1.Columns[7].Visible    = false;
     dataGridView1.Columns[8].HeaderText = "Salary";
     dataGridView1.Columns[9].Visible    = false;
     dataGridView1.Columns[10].Visible   = false;
     dataGridView1.Columns[11].Visible   = false;
     dataGridView1.Columns[12].Visible   = false;
     dataGridView1.Columns[13].Visible   = false;
     comboFull = false;
     cmbDepartment.DataSource    = dto.Departments;
     cmbDepartment.DisplayMember = "DepartamentName";
     cmbDepartment.ValueMember   = "ID";
     cmbPosition.DataSource      = dto.Positions;
     cmbPosition.DisplayMember   = "Position1";
     cmbPosition.ValueMember     = "ID";
     cmbDepartment.SelectedIndex = -1;
     cmbPosition.SelectedIndex   = -1;
     comboFull = true;
 }
        private void BindData()
        {
            EmployeeBLL EmployeeBL             = new EmployeeBLL(connectionString);
            List <EmployeeViewModel> employees = EmployeeBL.GetEmployeeInventory();

            string[]      date_notime        = new string[3];
            List <string> employees_in_modal = new List <string>();

            foreach (EmployeeViewModel element in employees)
            {
                date_notime       = element.BirthDate.Split(' ');
                element.BirthDate = date_notime[0];
                date_notime       = element.StartDate.Split(' ');
                element.StartDate = date_notime[0];
                if (!String.IsNullOrEmpty(element.EndDate))
                {
                    date_notime     = element.EndDate.Split(' ');
                    element.EndDate = date_notime[0];
                }
                else
                {
                    employees_in_modal.Add(element.Name);
                }
            }

            TerminateEmployeeList.DataSource = employees_in_modal;
            TerminateEmployeeList.DataBind();

            EmployeeList.DataSource = employees;
            EmployeeList.DataBind();
        }
Beispiel #22
0
 public void LoadObject(int IdObject)
 {
     try
     {
         EmployeeBLL EmployeeBLL = new EmployeeBLL();
         if (EmployeeBLL.GetIdEntity(IdObject) != null)
         {
             EmployeeML Employee = EmployeeBLL.GetIdEntity(IdObject);
             textBoxNumControl.Text = Employee.Id.ToString();
             textBoxNombre.Text     = Employee.Name.ToString();
             textBoxApellidoP.Text  = Employee.LastName.ToString();
             DepartamentBLL DepartamentBLL = new DepartamentBLL();
             DepartamentML  Departament    = DepartamentBLL.GetIdEntity(Employee.IdDepartament);
             textBoxDepartamento.Text = Departament.Name.ToString();
             JobBLL JobBLL = new JobBLL();
             JobML  Job    = JobBLL.GetIdEntity(Employee.IdJob);
             textBoxPuesto.Text = Job.Name;
         }
         else
         {
             cFAT100010 Alert = new cFAT100010("Información", "El empleado no existe", MessageBoxIcon.Information);
             Alert.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(String.Format("LoadObject: {0}", ex), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #23
0
 public void EmployeeAddOrUpdate(T_HR_EMPLOYEE entity, ref string strMsg)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         bll.EmployeeAddOrUpdate(entity, ref strMsg);
     }
 }
        protected void TerminateEmployeeSubmitButton_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                int         id;
                string      EmployeeEndDate = "";
                EmployeeBLL bll             = new EmployeeBLL(connectionString);
                List <EmployeeViewModel> Terminate_Employee = bll.GetEmployeeInventory();

                int i;
                for (i = 0; i < Terminate_Employee.Count; i++)
                {
                    if (Terminate_Employee[i].Name.Equals(TerminateEmployeeList.SelectedItem.Text))
                    {
                        break;
                    }
                }

                id = Terminate_Employee[i].EmployeeID;
                EmployeeEndDate = TerminateEmployeeEndDate.Text;

                bll.UpdateEmployeeEndDate(id, EmployeeEndDate);

                Terminate_Employee.Clear();
                Terminate_Employee = bll.GetEmployeeInventory();
                BindData();
                Response.Redirect("~/AllEmployees.aspx");
            }
        }
        public void GetEmployeeByEmployeeId_MethodCalledWithEmployeeId_ShouldGetCorrespondingEmployeeInfo()
        {
            //---------------------------------- ARRANGE -------------------------------------

            //setting up the in-memory database with required data for test
            FakeObjectSet <Employee> employeeObjectSet = new FakeObjectSet <Employee>();
            Employee employeeOldData = TestDataFactory.CreateNewObjectWithValidExistingEmployeeData();

            employeeObjectSet.AddObject(employeeOldData);
            mockDatabaseConext.Setup(db => db.Employees).Returns(employeeObjectSet);

            EmployeeBLL employeeBLL = new EmployeeBLL(mockDatabaseConext.Object);

            string EXPECTED_ADDRESS = employeeOldData.Address;

            //---------------------------------- ACT -------------------------------------

            Employee employeeNewData = employeeBLL.GetEmployeeByEmployeeId(1);

            //---------------------------------- ASSERT -------------------------------------

            string ACTUAL_ADDRESS = employeeNewData.Address;

            Assert.AreEqual(EXPECTED_ADDRESS, ACTUAL_ADDRESS, "Address should be found");
        }
Beispiel #26
0
        public ActionResult Index()
        {
            WebUserData userData = User.GetUserData();
            Employee    data     = EmployeeBLL.GetEmployee(Convert.ToInt32(userData.UserID));

            return(View(data));
        }
Beispiel #27
0
        public ActionResult Get(int id)
        {
            if (id <= 0)
            {
                return(Json(new ResultModel(string.Format("{0}不存在", this.ModelName))));
            }

            EmployeeBLL dal    = new EmployeeBLL();
            ResultModel result = dal.Get(id);

            if (result.ResultStatus != 0)
            {
                return(Json(result));
            }

            object rtnObj = result.ReturnValue;

            if (rtnObj == null)
            {
                return(Json(new ResultModel(string.Format("{0}不存在", this.ModelName))));
            }

            result.ResultStatus = 0;
            result.Message      = string.Format("{0}获取成功", this.ModelName);
            result.ReturnValue  = Newtonsoft.Json.JsonConvert.SerializeObject(rtnObj);
            return(Json(result));
        }
Beispiel #28
0
        /// <summary>
        /// 根据ID获取联系方式数据模型
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        public string GetContact()
        {
            HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"]; //获取传统context
            HttpRequestBase request = context.Request;                                       //定义传统request对象
            int             id      = int.Parse(request.QueryString["id"]);
            int             eid     = int.Parse(request.QueryString["eid"]);

            IBLL.IEmployeeBLL m_BLL = new EmployeeBLL();
            Employee          item  = m_BLL.GetById(eid);

            EmployeeInfo info = new EmployeeInfo();

            info.empId             = item.Id;
            info.Empname           = item.Name;
            info.CertificateNumber = item.CertificateNumber;

            info.contactList = (from a in item.EmployeeContact
                                where a.Id == id
                                select new EmployeeContacts
            {
                Id = a.Id,
                Telephone = a.Telephone,
                MobilePhone = a.MobilePhone,
                CState = a.State,
                Email = a.Email,
                Address = a.Address,
                Remark = a.Remark,
                CreateTime = a.CreateTime,
                CreatePerson = a.CreatePerson
            }).ToList();
            return(Newtonsoft.Json.JsonConvert.SerializeObject(info));
        }
Beispiel #29
0
 public Form_Profile(int EmployeeID)
 {
     InitializeComponent();
     EmpID       = EmployeeID;
     employeeBLL = new EmployeeBLL();
     LoadData();
 }
Beispiel #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.IsWuhan())
                {
                    Grid1.Columns[3].HeaderText = "Ô±¹¤±àÂë";
                }
                else
                {
                    Grid1.Columns[3].HeaderText = "¹¤×ʱàºÅ";
                }

                string strId = Request.QueryString.Get("employeeID");
                if (strId != null && strId != "")
                {
                    ViewState["ChooseId"]   = strId;
                    ViewState["UpdateMode"] = 1;
                }
                else
                {
                    ViewState["ChooseId"]   = "";
                    ViewState["UpdateMode"] = 0;
                }

                BindStationStart();
                BindOrgStart();
                BindWorkShopStart();
                BindSystemStart();
                BindTypeStart();
                BindPostStart();

                EmployeeBLL             bll      = new EmployeeBLL();
                RailExam.Model.Employee employee = bll.GetEmployee(Convert.ToInt32(Request.QueryString.Get("nowEmployeeID")));
                OrganizationBLL         orgbll   = new OrganizationBLL();
                int stationOrgID = orgbll.GetStationOrgID(employee.OrgID);
                if (stationOrgID != 200)
                {
                    ddlStation.SelectedValue = stationOrgID.ToString();
                    OrganizationBLL objBll = new OrganizationBLL();
                    IList <RailExam.Model.Organization> objList =
                        objBll.GetOrganizationsByParentID(Convert.ToInt32(ddlStation.SelectedValue));
                    foreach (RailExam.Model.Organization organization in objList)
                    {
                        ListItem item = new ListItem();
                        item.Value = organization.OrganizationId.ToString();
                        item.Text  = organization.ShortName;
                        ddlWorkShop.Items.Add(item);
                    }

                    ddlStation.Enabled = false;
                }

                ViewState["StartRow"] = 0;
                ViewState["EndRow"]   = Grid1.PageSize;

                ViewState["EmploySortField"] = "nlssort(a.employee_name,'NLS_SORT=SCHINESE_PINYIN_M')";
                BindGrid(ViewState["EmploySortField"].ToString());
            }
        }
Beispiel #31
0
 public void EmployeeAdd(T_HR_EMPLOYEE entity, string companyID, ref string strMsg)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         bll.EmployeeAdd(entity, companyID, ref strMsg);
     }
 }
Beispiel #32
0
        private static void TestUpdateEmployee()
        {
            Employee employee = EmployeeBLL.GetEmployeeByID("4419029e-0492-44a1-b06f-4bf66648724b");

            employee.FirstName = "fasdfas";
            employee.Save();
        }
Beispiel #33
0
 public V_EMPLOYEEDETAIL getEmployeeInfobyLogin(string employeeid)
 {
     try
     {
         using (EmployeeBLL bll = new EmployeeBLL())
         {
             V_EMPLOYEEDETAIL employee =  bll.GetEmployeeDetailView(employeeid);
         if (employee == null)
         {
             Tracer.Debug("通过员工id获取到员工详细信息为空,员工id:" + employeeid);
             return null;
         }
         return employee;
         }
     }
     catch (Exception ex)
     {
         Tracer.Debug("通过员工id获取到员工详细信息出错,员工id:" + employeeid+ex.ToString());
         throw ex;
     }
 }
Beispiel #34
0
 public T_HR_EMPLOYEE GetEmployeeByNumberID(string sNumberID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeByNumberID(sNumberID);
     }
 }        /// <summary>
Beispiel #35
0
 public List<EmployeeContactWays> GetEmployeeToEngine(string[] employeeIDs)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeToEngine(employeeIDs);
     }
 }
Beispiel #36
0
 public List<T_HR_EMPLOYEE> GetEmployeePagingByFilter(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string userID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         IQueryable<T_HR_EMPLOYEE> q = bll.GetEmployeesPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, userID);
         return q.Count() > 0 ? q.ToList() : null;
     }
 }
Beispiel #37
0
 public byte[] ExportEmployeesIntime(int pageIndex, int pageSize, string sort, string filterString, IList<object> paras, ref int pageCount, string sType, string sValue, string userID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.ExportEmployeesIntime(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, sType, sValue, userID);
     }
 }
Beispiel #38
0
 public List<T_HR_EMPLOYEE> GetEmployeesWithOutPermissions(int pageIndex, int pageSize, string sort, string filterString, IList<object> paras, ref int pageCount, string sType, string sValue)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         IQueryable<T_HR_EMPLOYEE> q = bll.GetEmployeesWithOutPermissions(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, sType, sValue);
         return q.Count() > 0 ? q.ToList() : null;
     }
 }
Beispiel #39
0
 public List<V_EMPLOYEEVIEW> GetLeaveEmployeeViewsPagingForMVC(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string sType, string sValue, string userID, ref int recordCount)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         List<V_EMPLOYEEVIEW> q = bll.GetLeaveEmployeeViewsPagingForMVC(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, sType, sValue, userID, ref recordCount);
         return q;
     }
 }
Beispiel #40
0
 public List<string> GetEmployeeIDsByParasByBalancePost(IList<string> companyIDs, IList<string> departmentIDs, IList<string> postIDs)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         List<string> q = bll.GetEmployeeIDsByParasByBalancePost(companyIDs, departmentIDs, postIDs);
         return q;
     }
 }
Beispiel #41
0
 public List<T_HR_EMPLOYEE> GetEmployeeByIDs(string[] employeeIDs)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeByIDs(employeeIDs);
     }
 }
Beispiel #42
0
        public bool EmployeeDelete(string[] employeeIDs)
        {
            using (EmployeeBLL bll = new EmployeeBLL())
            {
                int rslt = bll.EmployeeDelete(employeeIDs);

                return (rslt > 0);
            }
        }
Beispiel #43
0
 public List<T_HR_EMPLOYEE> GetEmployeeByDepartmentID(string departmentID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         var q = bll.GetEmployeeByDepartmentID(departmentID);
         return q.Count() > 0 ? q.ToList() : null;
     }
 }
Beispiel #44
0
 public byte[] ExportEmployeeContract()
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.ExportEmployeeContract();
     }
 }
Beispiel #45
0
 public byte[] ExportContactsList(string companyID, string filterString, string[] paras, string sType, string sValue, string userId)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.ExportContactsList(companyID, filterString, paras, sType, sValue, userId);
     }
 }
Beispiel #46
0
 public V_EMPLOYEEVIEW GetEmployeeInfoByEmployeeID(string employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeInfoByEmployeeID(employeeID);
     }
 }
Beispiel #47
0
 public List<V_EMPLOYEEVIEW> GetEmployeeDetailViewByEmployeeID(string[] Employeeids)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeesByEmployeeIds(Employeeids);
     }
 }
Beispiel #48
0
 public List<V_EMPLOYEEVIEW> GetEmployeeByIDsToSendDoc(string[] employeeIDs)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeByIDsToSendDoc(employeeIDs);
     }
 }
Beispiel #49
0
 public List<string> GetEmployeeIDsWithParas(List<string> companyIDs, bool isContainChildCompany, List<string> departmentIDs, bool isContainChildDepartment, List<string> postIDs)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         List<string> q = bll.GetEmployeeIDsWithParas(companyIDs, isContainChildCompany, departmentIDs, isContainChildDepartment, postIDs);
         return q;
     }
 }
Beispiel #50
0
 public V_EMPLOYEEPOST GetEmployeeDetailByID(string employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeDetailByID(employeeID);
     }
 }
Beispiel #51
0
 public List<V_EMPLOYEEVIEW> GetEmployeeViewsActivedPaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string sType, string sValue, string userID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         List<V_EMPLOYEEVIEW> q = bll.GetEmployeeViewsActivedPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, sType, sValue, userID);
         return q;
     }
 }
Beispiel #52
0
 public V_EMPLOYEEDETAIL GetEmployeeDetailViewByID(string employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeDetailView(employeeID);
     }
 }
Beispiel #53
0
 public List<V_EMPLOYEEVIEW> GetEmployeeViewsWithOutPermissions(int pageIndex, int pageSize, string sort, string filterString, IList<object> paras, ref int pageCount, string sType, string sValue)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         List<V_EMPLOYEEVIEW> q = bll.GetEmployeeViewsWithOutPermissions(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, sType, sValue);
         return q;
     }
 }
Beispiel #54
0
 public List<V_EMPLOYEEPOST> GetEmployeeDetailByIDs(string[] employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeDetailByIDs(employeeID);
     }
 }
Beispiel #55
0
 public List<V_EMPLOYEESTATICINFO> GetEmployeesIntime(int pageIndex, int pageSize, string sort, string filterString, IList<object> paras, ref int pageCount, string sType, string sValue, string userID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeesIntime(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, sType, sValue, userID);
     }
 }
Beispiel #56
0
 public V_EMPLOYEEPOST GetVEmployeePostByEmployeeID(string employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetVEmployeePostByEmployeeID(employeeID);
     }
 }
Beispiel #57
0
 public bool EmployeeIsEntry(string sNumberID, ref string blackMessage, ref string[] leaveMessage)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.EmployeeIsEntry(sNumberID, ref blackMessage, ref leaveMessage);
     }
 }
Beispiel #58
0
 public byte[] GetEmployeePhotoByID(string employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeePhotoByID(employeeID);
     }
 }
Beispiel #59
0
 public V_EMPLOYEEDETAIL GetEmployeeByFingerPrintID(string FingerPrintID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeOrgByFingerPrintID(FingerPrintID);
     }
 }
Beispiel #60
0
 public int GetEmployeeWorkAgeByID(string employeeID)
 {
     using (EmployeeBLL bll = new EmployeeBLL())
     {
         return bll.GetEmployeeWorkAgeByID(employeeID);
     }
 }