コード例 #1
0
ファイル: ShellViewModel.cs プロジェクト: tkyle/WPFDemo
        public void ShowEmployeeInfo(int id)
        {
            EmployeeInfoViewModel = IoC.Get <IEmployeeInfoView>();

            EmployeeInfoViewModel.Employee = EmployeeInformationEdit.GetEmployee(id);

            Items.Add(EmployeeInfoViewModel);
        }
コード例 #2
0
        public EmployeeHistoryPresenter(IEmployeeInfoView itsView, string employeeId)
        {
            _ItsView    = itsView;
            _EmployeeId = employeeId;

            _ThePresenters = new List <IViewEmployeePresenter>();
            _ThePresenters.Add(new ViewBasicInfoPresenter(itsView.BasicInfoView));
            _ThePresenters.Add(new ViewDimissionBasicInfoPresenter(itsView.DimissionInfoView));
            _ThePresenters.Add(new ViewFamilyInfoPresenter(itsView.FamilyInfoView));
            _ThePresenters.Add(new ViewResumeInfoPresenter(itsView.ResumeInfoView));
            _ThePresenters.Add(new ViewWelfareInfoPresenter(itsView.WelfareInfoView));
            _ThePresenters.Add(new ViewWorkInfoPresenter(itsView.WorkInfoView, false));
            new ViewFileCargosInfoPresenter(itsView.FileCargoInfoView, _IEmployeeHistoryFacade.GetEmployeeHistoryByEmployeeHistoryID(Convert.ToInt32(_EmployeeId)).Employee.Account.Id);
            AttachViewEvent();
        }
コード例 #3
0
        protected ViewEmployeeInfoPresenterBase(IEmployeeInfoView itsView, string employeeId)
        {
            _ItsView    = itsView;
            _EmployeeId = employeeId;

            _ThePresenters = new List <IViewEmployeePresenter>();
            _ThePresenters.Add(new ViewBasicInfoPresenter(itsView.BasicInfoView));
            _ThePresenters.Add(new ViewDimissionBasicInfoPresenter(itsView.DimissionInfoView));
            _ThePresenters.Add(new ViewResumeInfoPresenter(itsView.ResumeInfoView));
            _ThePresenters.Add(new ViewFamilyInfoPresenter(itsView.FamilyInfoView));
            _ThePresenters.Add(new ViewResumeInfoPresenter(itsView.ResumeInfoView));
            _ThePresenters.Add(new ViewWelfareInfoPresenter(itsView.WelfareInfoView));
            _ThePresenters.Add(new ViewSkillInfoPresenter(itsView.EmployeeSkillInfoView));
            new ViewFileCargosInfoPresenter(itsView.FileCargoInfoView, Convert.ToInt32(_EmployeeId));
            AttachViewEvent();
        }
コード例 #4
0
        /// <summary>
        /// 各个Presenter像积木一样搭建一个完整的员工信息,每个P又都有InitView,DataBind,Vaildate,CompleteTheObject3个小P组成
        /// </summary>
        /// <param name="itsView"></param>
        /// <param name="employeeId"></param>
        /// <param name="operatorAccount"></param>
        public UpdateEmployeeInfoPresenter(IEmployeeInfoView itsView, string employeeId, Account operatorAccount)
        {
            _OperatorAccount = operatorAccount;
            _ItsView         = itsView;
            _EmployeeId      = employeeId;

            _ThePresenters = new List <IUpdateEmployeePresenter>();
            _ThePresenters.Add(new UpdateBasicInfoPresenter(itsView.BasicInfoView));
            _ThePresenters.Add(new UpdateDimissionBasicInfoPresenter(itsView.DimissionInfoView));
            _ThePresenters.Add(new UpdateFamilyInfoPresenter(itsView.FamilyInfoView));
            _ThePresenters.Add(new UpdateResumeInfoPresenter(itsView.ResumeInfoView));
            _ThePresenters.Add(new UpdateWelfareInfoPresenter(itsView.WelfareInfoView));
            _ThePresenters.Add(new UpdateWorkInfoPresenter(itsView.WorkInfoView));
            _ThePresenters.Add(new UpdateSkillInfoPresenter(itsView.EmployeeSkillInfoView));
            AttachViewEvent();
            //年假信息
            _TheVocationPresenter = new VocationBackPresenter(itsView);
            //档案
            new UpdateFileCargosInfoPresenter(itsView.FileCargoInfoView, Convert.ToInt32(_EmployeeId));
        }
コード例 #5
0
 /// <summary>
 /// 各个Presenter像积木一样搭建一个完整的员工信息,每个P又都有InitView,Vaildate,CompleteTheObject3个小P组成
 /// </summary>
 /// <param name="itsView"></param>
 /// <param name="operatorAccount"></param>
 public AddEmployeeInfoPresenter(IEmployeeInfoView itsView, Account operatorAccount)
 {
     _OperatorAccount = operatorAccount;
     _ItsView         = itsView;
     _ThePresenters   = new List <IAddEmployeePresenter>();
     //基本信息
     _ThePresenters.Add(new AddBasicInfoPresenter(itsView.BasicInfoView));
     //离职信息
     _ThePresenters.Add(new AddDimissionBasicInfoPresenter(itsView.DimissionInfoView));
     //家庭信息
     _ThePresenters.Add(new AddFamilyInfoPresenter(itsView.FamilyInfoView));
     //简历
     _ThePresenters.Add(new AddResumeInfoPresenter(itsView.ResumeInfoView));
     //福利
     _ThePresenters.Add(new AddWelfareInfoPresenter(itsView.WelfareInfoView));
     //工作
     _ThePresenters.Add(new AddWorkInfoPresenter(itsView.WorkInfoView));
     //技能
     _ThePresenters.Add(new AddSkillInfoPresenter(itsView.EmployeeSkillInfoView));
     //档案信息
     new AddFileCargosInfoPresenter(itsView.FileCargoInfoView, 0);
     AttachViewEvent();
 }
コード例 #6
0
 public VacationFrontPresenter(IEmployeeInfoView itsView)
 {
     _ItsView = itsView;
 }
コード例 #7
0
        //private IVacationFacade _IVacationFacade = InstanceFactory.CreateVacationFacade();

        public VocationBackPresenter(IEmployeeInfoView itsView)
        {
            _ItsView = itsView;
            // AttachViewEvent();
        }
コード例 #8
0
 public BackViewEmployeeInfoPresenter(IEmployeeInfoView itsView, string employeeId)
     : base(itsView, employeeId)
 {
     _ThePresenters.Add(new ViewWorkInfoPresenter(itsView.WorkInfoView, false));
 }
コード例 #9
0
 public FrontViewEmployeeInfoPresenter(IEmployeeInfoView itsView, string employeeId)
     : base(itsView, employeeId)
 {
     _ThePresenters.Add(new ViewWorkInfoPresenter(itsView.WorkInfoView, true));
     _TheVacationPresenter = new VacationFrontPresenter(itsView);
 }