private static bool CanSubmitToLawDept(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.ApproveState.Equals(ApproveStateConst.已审核) && dossier.State.Equals(DossierStateConst.专卖科审核);
 }
 private static bool CanSubmitToLeader(Dossier dossier)
 {
     return dossier != null && string.IsNullOrEmpty(dossier.State);
 }
 private static bool CanSubmitFinal(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.ApproveState.Equals(ApproveStateConst.已审核) && dossier.State.Equals(DossierStateConst.审核整改报告);
 }
 private static bool CanSubmitReport(Dossier dossier)
 {
     return dossier != null && dossier.State.Equals(DossierStateConst.整改案卷);
 }
 private static bool CanApprove(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.ApproveState.Equals(ApproveStateConst.待审核) &&
            (dossier.State.Equals(DossierStateConst.专卖科审核) || dossier.State.Equals(DossierStateConst.审核整改报告));
 }
 private static bool CanBack(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.State.Equals(DossierStateConst.接收反馈意见);
 }
        public ActionResult Create(FormCollection collection)
        {
            var model = new Dossier();
            TryUpdateModel(model, collection.ToValueProvider());
            if (!ModelState.IsValid)
            {
                return View(model);
            }
            using (var session = new SessionFactory().OpenSession())
            {
                session.BeginTransaction();
                model.CreatedAt = DateTime.Now;
                model.CreatedBy = CurrentAccountNo;
                model.Time = DateTime.Now;
                model.Undertaker = CurrentAccountNo.GetName();
                model.State = "";
                model.ApproveState = "";
                ViewData.Model = model;
                if (session.Create(model))
                {
                    session.Commit();
                    FlashSuccess("创建记录成功!");
                    return Close();
                }
                session.Rollback();
                FlashFailure("创建记录失败!");
                return View();

            }
        }
 private static bool CanBack(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.ApproveState.Equals(ApproveStateConst.已审核) &&
            dossier.State.Equals(DossierStateConst.分管领导审批);
 }
 private static bool IsEditAble(Dossier contract)
 {
     if (contract == null) return false;
     return string.IsNullOrEmpty(contract.State)||contract.State.Equals(DossierStateConst.整改案卷);
 }
 private static bool CanSubmitToLeader(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.ApproveState.Equals(ApproveStateConst.待审核) &&
            dossier.State.Equals(DossierStateConst.法规科审核);
 }
 private static bool CanApprove(Dossier dossier)
 {
     if (dossier == null) return false;
     return dossier.ApproveState.Equals(ApproveStateConst.负责人待审核) &&
            dossier.State.Equals(DossierStateConst.法规科审核);
 }