Exemplo n.º 1
0
        private void _click(object sender, System.EventArgs e)
        {
            ACMS.Control.ACMSRosterHeader rh = new ACMS.Control.ACMSRosterHeader();
            rh = (ACMS.Control.ACMSRosterHeader) sender;
            string dtDate;

            if ( rh.WeekDay != "1")
            {

                        dtDate = Convert.ToDateTime(currentDay).AddDays(Convert.ToInt32(rh.WeekDay) - 1 ).ToString("yyyy-MM-dd");
            }
            else
            {
                dtDate = Convert.ToDateTime(currentDay).AddDays((Convert.ToInt32(rh.WeekDay)+7) - 1).ToString("yyyy-MM-dd");
            }

            string strDate;
            strDate = Convert.ToDateTime(currentDay).AddDays(- 7).ToString("yyyy-MM-dd");

            ACMS.ACMSBranch.frmRoster myform;
            ACMSLogic.User.BranchCode = terminalUser.Branch.Id;
            ACMSLogic.User.EmployeeID = employee.Id;
            if (employee.Department != null)
                ACMSLogic.User.DepartmentID = employee.Department.Id;
            if (employee.StrEmployeeName != null)
                ACMSLogic.User.EmployeeName = employee.StrEmployeeName;
            if (employee.JobPosition.Id != null)
                ACMSLogic.User.JobPositionCode = employee.JobPosition.Id;
            if (employee.RightsLevel != null)
                ACMSLogic.User.RightsLevelID = employee.RightsLevel.Id;

            ACMSLogic.User oUser = new User();
            myform = new ACMS.ACMSBranch.frmRoster(rh.EmpID,dtDate);
            myform.SetEmployeeRecord(employee);
            myform.SetTerminalUser(terminalUser);
            myform.initData(oUser);

            myform.ShowDialog();
            myform.Dispose();
        }
Exemplo n.º 2
0
        private void InitRostercmb()
        {
            this.acmsRosterHeader1 = new ACMS.Control.ACMSRosterHeader();
            this.groupControl1.Controls.Add(this.acmsRosterHeader1);

            //
            // acmsRosterHeader1
            //
            this.acmsRosterHeader1.dtRoster = null;
            this.acmsRosterHeader1.dtRosterDetail = null;
            this.acmsRosterHeader1.EmpID = null;
            this.acmsRosterHeader1.Location = new System.Drawing.Point(8, 48);
            this.acmsRosterHeader1.Name = "acmsRosterHeader1";
            this.acmsRosterHeader1.Size = new System.Drawing.Size(816, 408);
            this.acmsRosterHeader1.TabIndex = 21;
            this.acmsRosterHeader1.WeekDay = null;
            this.acmsRosterHeader1.WeekNo = null;
            this.acmsRosterHeader1.year = null;
            this.acmsRosterHeader1.Click += new System.EventHandler(this._click);

            Refresh_comboBoxRoster();
        }