Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Account LoginUser = Session[SessionKeys.LOGININFO] as Account;

            if (LoginUser == null)
            {
                return;
            }
            MonthAttendancePresenter monthAttendanceFontPresenter =
                new MonthAttendancePresenter(MonthAttendanceView1, LoginUser);

            MonthAttendanceView1.StatisticsAttendance += monthAttendanceFontPresenter.StatisticsEvent;
            if (String.IsNullOrEmpty(IsFirstAdd))
            {
                monthAttendanceFontPresenter.InitPresenter(false);
            }
            else
            {
                monthAttendanceFontPresenter.InitPresenter(IsPostBack);
            }
            IsFirstAdd = "IsADDed";

            MonthAttendanceView1._ShowEmployeeDayAttendanceWindow   = ShowEmployeeDayAttendance;
            MonthAttendanceView1.ddlDepartmentSelectedIndexChanged +=
                monthAttendanceFontPresenter.ddlDepartmentSelectedIndexChanged;
            MonthAttendanceView1.btnExportClientVisible = false;

            myDayAttendancePresenter                = new MyDayAttendancePresenter(MyDayAttendance1, LoginUser);
            MyDayAttendance1._ExecuteSearchEvent   += myDayAttendancePresenter.ExecuteSearchEvent;
            MyDayAttendance1.ShowUpdatePanel       += ShowMyDayAttendanceWindow;
            MyDayAttendance1.HideUpdatePanel       += HideMyDayAttendanceWindow;
            MyDayAttendance1._DateSlection         += ShowMyDayAttendanceDetail;
            MyDayAttendance1.btnCancelOnClientClick = "return CloseModalPopupExtender('" + divMPEMyDayAttendance.ClientID + "');";

            showCalendarDetailPresenter            = new ShowCalendarDetailPresenter(ShowCalendarDetail1, LoginUser);
            ShowCalendarDetail1.btnCancelClick    += HideMyDayAttendanceDetailWindow;
            ShowCalendarDetail1.ShowPanel         += ShowMyDayAttendanceDetailWindow;
            ShowCalendarDetail1.BtnSendEmailEvent += showCalendarDetailPresenter.SendEmailForEmployees;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            MonthAttendancePresenter monthAttendanceBackPresenter =
                new MonthAttendancePresenter(MonthAttendanceView1, LoginUser);

            MonthAttendanceView1.StatisticsAttendance += monthAttendanceBackPresenter.StatisticsEvent;
            monthAttendanceBackPresenter.InitPresenter(IsPostBack);
            MonthAttendanceView1._ShowEmployeeDayAttendanceWindow   = ShowEmployeeDayAttendance;
            MonthAttendanceView1.ddlDepartmentSelectedIndexChanged +=
                monthAttendanceBackPresenter.ddlDepartmentSelectedIndexChanged;

            myDayAttendancePresenter                = new MyDayAttendancePresenter(MyDayAttendance1, LoginUser);
            MyDayAttendance1._ExecuteSearchEvent   += myDayAttendancePresenter.ExecuteSearchEvent;
            MyDayAttendance1.ShowUpdatePanel       += ShowMyDayAttendanceWindow;
            MyDayAttendance1.btnCancelOnClientClick = "return CloseModalPopupExtender('" +
                                                      divMPEMyDayAttendance.ClientID + "');";
            MyDayAttendance1.HideUpdatePanel += HideMyDayAttendanceWindow;
            MyDayAttendance1._DateSlection   += ShowMyDayAttendanceDetail;

            showCalendarDetailPresenter            = new ShowCalendarDetailPresenter(ShowCalendarDetail1, LoginUser);
            ShowCalendarDetail1.btnCancelClick    += HideMyDayAttendanceDetailWindow;
            ShowCalendarDetail1.ShowPanel         += ShowMyDayAttendanceDetailWindow;
            ShowCalendarDetail1.BtnSendEmailEvent += showCalendarDetailPresenter.SendEmailForEmployees;
        }