protected override void InitPresenter() { _ItsView.LeaveRequestItemList = LeaveRequestUtility.AddNullItem(new List <LeaveRequestItem>()); _ItsView.EmployeeName = EmployeeName; _ItsView.SetFormReadOnly = false; //_ItsView.SetFormCancel = false; DateTime now = DateTime.Now; DateTime show = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, 0); _ItsView.TimeSpan = show + " ~ " + show; _ItsView.CostTime = "0"; }
/// <summary> /// 在rowIndex下新增空行 /// </summary> /// <param name="rowIndex"></param> protected void LeaveRequestItemForAddAtEvent(string rowIndex) { List <LeaveRequestItem> items = new List <LeaveRequestItem>(); for (int i = 0; i < _ItsView.LeaveRequestItemList.Count; i++) { items.Add(_ItsView.LeaveRequestItemList[i]); if (Convert.ToInt32(rowIndex) == i) { LeaveRequestUtility.AddNullItem(items); } } _ItsView.LeaveRequestItemList = items; }
/// <summary> /// 根据请假单状态判断操作的数据源 /// </summary> private void GetDataSource() { LeaveRequest leaveRequest = _ILeaveRequestFacade.GetLeaveRequestByPKID(Convert.ToInt32(LeaveRequestID)); //-1 全部;0 新增;1 提交;2 审核不通过;3 审核通过;4 取消请假; //5 拒绝取消假期;6 批准取消假期;7 审核中;8 审核取消中 switch (leaveRequest.LeaveRequestItems[0].Status.Id) { case 1: case 7: _ItsView.StatusSource = LeaveRequestUtility.GetLeaveRequestStatusForApproveSubmit(); break; case 4: case 8: _ItsView.StatusSource = LeaveRequestUtility.GetLeaveRequestStatusForApproveCancel(); break; } }
private void GetDataSource() { _ItsView.StatusSource = LeaveRequestUtility.GetLeaveRequestStatus(); }
/// <summary> /// 根据请假单状态判断操作的数据源 /// </summary> private void GetDataSource() { //-1 全部;0 新增;1 提交;2 审核不通过;3 审核通过;4 取消请假; //5 拒绝取消假期;6 批准取消假期;7 审核中;8 审核取消中 _ItsView.ApproveCancelStatusSource = LeaveRequestUtility.GetLeaveRequestStatusForCancel(); }
/// <summary> /// 根据请假单状态判断操作的数据源 /// </summary> private void GetDataSource() { _ItsView.ApproveCancelStatusSource = LeaveRequestUtility.GetLeaveRequestStatusForApproveCancel(); _ItsView.ApproveSubmitStatusSource = LeaveRequestUtility.GetLeaveRequestStatusForApproveSubmit(); }