Exemplo n.º 1
0
        public void SetApplicationBind(string applicationId)
        {
            int Id;

            if (!int.TryParse(applicationId, out Id))
            {
                _ItsView.Message = "初始化错误";
            }
            ITraineeApplicationFacade facade      = InstanceFactory.CreateTraineeApplicationFacade();
            TraineeApplication        application = facade.GetTraineeApplicationByPkid(Id);

            _ItsView.CourseName = application.CourseName;
            _ItsView.Place      = application.TrainPlace;

            _ItsView.Trainer = application.Trainer;

            _ItsView.TrainScope       = application.TrainType.Id.ToString();
            _ItsView.EmployeeList     = application.StudentList;
            _ItsView.ChoosedEmployees = RequestUtility.GetEmployeeNames(application.StudentList);
            _ItsView.SkillDisplay     = application.Skills;

            _ItsView.ExpectST        = application.StratTime.ToString();
            _ItsView.ExpectET        = application.EndTime.ToString();
            _ItsView.ExpectCost      = application.TrainCost.ToString();
            _ItsView.ExpectHour      = application.TrainHour.ToString();
            _ItsView.HasCertifaction = application.HasCertifacation;
        }
Exemplo n.º 2
0
        public bool DataBind(string courseId)
        {
            int _courseId;

            if (!int.TryParse(courseId, out _courseId))
            {
                _ItsView.Message = CourseUtility._InitError;
                return(false);
            }

            Course course = _ITrainFacade.GetTrainCourseByPKID(_courseId);

            if (course != null)
            {
                _ItsView.CourseName  = course.CourseName;
                _ItsView.Place       = course.TrainPlace;
                _ItsView.Coordinator = course.Coordinator.Name;
                _ItsView.Trainer     = course.Trainer;

                _ItsView.TrainScope  = Convert.ToInt32(course.Scope).ToString();
                _ItsView.TrainStatus = Convert.ToInt32(course.Status).ToString();

                List <Account> employeeList = new List <Account>();
                foreach (TrainEmployeeFB employee in course.TrainFBResult.TrainEmployeeFBs)
                {
                    employeeList.Add(employee.Trainee);
                }
                _ItsView.EmployeeList     = employeeList;
                _ItsView.ChoosedEmployees = RequestUtility.GetEmployeeNames(_ItsView.EmployeeList);
                List <Skill> skilllist = new List <Skill>();
                foreach (Skill skill in course.Skill)
                {
                    skilllist.Add(skill);
                }
                _ItsView.SkillList     = skilllist;
                _ItsView.ChoosedSkills = GetSkillNames(_ItsView.SkillList);

                _ItsView.ExpectST        = course.ExpectST.ToShortDateString();
                _ItsView.ExpectET        = course.ExpectET.ToShortDateString();
                _ItsView.ExpectCost      = course.ExpectCost.ToString();
                _ItsView.ExpectHour      = course.ExpectHour.ToString();
                _ItsView.ActualST        = course.ActualST.ToShortDateString();
                _ItsView.ActualET        = course.ActualET.ToShortDateString();
                _ItsView.ActualCost      = course.ActualCost.ToString();
                _ItsView.ActualHour      = course.ActualHour.ToString();
                _ItsView.PaperId         = course.CourseFeedBackPaper.FeedBackPaperId;
                _ItsView.HasCertifaction = course.HasCertification.Equals(1);
                return(true);
            }
            _ItsView.Message = CourseUtility._InitError;
            return(false);
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Powers.HasAuth(LoginUser.Auths, AuthType.HRMIS, HrmisPowers.A502))
            {
                throw new ApplicationException("没有权限访问");
            }
            SetPlanDutyInfoView1.LoginUser = LoginUser;
            PlanDutyAddPresenter setPlanDutyPresenter =
                new PlanDutyAddPresenter(SetPlanDutyInfoView1, LoginUser);

            setPlanDutyPresenter.InitView(IsPostBack, DateTime.Now);
            if (!string.IsNullOrEmpty(Request.QueryString["employeeID"]) && !IsPostBack)
            {
                Account account =
                    BllInstance.AccountBllInstance.GetAccountById(
                        Convert.ToInt32(SecurityUtil.DECDecrypt(Request.QueryString["employeeID"])));
                List <Account> accountlist = new List <Account>();
                accountlist.Add(account);
                SetPlanDutyInfoView1.EmployeeList = accountlist;
                SetPlanDutyInfoView1.SetPlanDutyView.EmployeeList = RequestUtility.GetEmployeeNames(accountlist);
            }
        }
 private void ChoseAccountAjax(object sender, EventArgs e)
 {
     txtEmployeeList.Text = RequestUtility.GetEmployeeNames(ChoseEmployeeView1.AccountRight);
     mpeChoseEmployeeView.Show();
 }
Exemplo n.º 5
0
 protected void ChoseAccountAjax(object sender, EventArgs e)
 {
     ChoosedEmployees = RequestUtility.GetEmployeeNames(ChoseEmployeeView1.AccountRight);
     mpeEmployeeList.Show();
 }