private void InitPresenter(bool ispostback)
 {
     _View.ReasonMessage      = string.Empty;
     _View.ResultMessage      = string.Empty;
     _View.ProjectNameMessage = string.Empty;
     if (!ispostback)
     {
         _View.EmployeeName  = _LoginUser.Name;
         _View.EmployeeID    = _LoginUser.Id;
         _View.btnOKText     = "暂  存";
         _View.btnCancelText = "提  交";
         _View.OperationType = "新增加班";
         _View.SetReadOnly   = false;
         DateTime now  = DateTime.Now;
         DateTime show = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
         _View.TimeSpan            = show + " ~ " + show;
         _View.CostTime            = "0";
         _View.ApplicationItemList = OverWorkUtility.AddNullItem(new List <OverWorkItem>());
         if (_IEmployeeAdjustRuleFacade.GetAdjustRuleByAccountID(_LoginUser.Id) == null)
         {
             _View.ResultMessage = "没有调休规则,无法新增加班";
             _View.SetReadOnly   = true;
         }
     }
 }
Beispiel #2
0
 public UpdateOverWorkPresenter(IOverWorkEditView view, bool ispostBack)
 {
     _View               = view;
     _OverWorkUtility    = new OverWorkUtility(view);
     _View.ResultMessage = string.Empty;
     InitPresenter(ispostBack);
     AttachViewEvent();
 }
 public AddOverWorkPresenter(IOverWorkEditView view, Account loginUser, bool ispostBack)
 {
     _View               = view;
     _OverWorkUtility    = new OverWorkUtility(view);
     _View.ResultMessage = string.Empty;
     _LoginUser          = loginUser;
     InitPresenter(ispostBack);
     AttachViewEvent();
 }