Exemplo n.º 1
0
 /// <summary>
 /// 申请开通某个功能
 /// </summary>
 /// <param name="scenic"></param>
 /// <param name="module"></param>
 public void Apply(Scenic scenic, TourMembership applier, ScenicModule module)
 {
     ScenicCheckProgress scp = new ScenicCheckProgress();
     var cplist = scenic.CheckProgress.ToList();
     if (cplist.Count != 0)
     {
         foreach (ScenicCheckProgress item in cplist)
         {
             if (item.Module == module)
             {
                 scp = item;
                 continue;
             }
         }
     }
     scp.Applier = applier;
     scp.CheckStatus = CheckStatus.Applied;
     scp.CheckTime = DateTime.Now;
     scp.Module = module;
     scp.Scenic = scenic;
     IScenic.SaveCheckProgress(scp);
 }
Exemplo n.º 2
0
 public ScenicCheckProgress GetStatus(int scenicId, ScenicModule module)
 {
     return IScenic.GetStatus(scenicId, module);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新状态
 /// </summary>
 /// <param name="status"></param>
 /// <param name="module"></param>
 private void UpdateStatus(CheckStatus status, ScenicModule module)
 {
     bllScenic.ChangeCheckStatus(scenic, CurrentMember, module, status);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 批准某个功能的申请.
 /// </summary>
 /// <param name="scenic"></param>
 /// <param name="checker"></param>
 /// <param name="module"></param>
 public void ChangeCheckStatus(Scenic scenic, TourMembership checker, ScenicModule module, CheckStatus cs)
 {
     ScenicCheckProgress scp = GetStatus(scenic.Id, module);
     if (scp.CheckStatus != CheckStatus.Applied)
     {
         ErrHandler.Redirect(ErrType.UnknownError,"187行");
     }
     scp.CheckStatus = cs;
     IScenic.SaveCheckProgress(scp);
     if (module == ScenicModule.SellOnLine)
     {
         IList<Ticket> tickets = ITicket.GetTicketByscId(scenic.Id);
         foreach (var item in tickets)
         {
             item.Lock = false;
         }
         ITicket.SaveOrUpdateTicket(tickets);
     }
 }
Exemplo n.º 5
0
 public ScenicCheckProgress GetStatus(int scenicId, ScenicModule module)
 {
     string sql = "select s from ScenicCheckProgress s where s.Scenic.Id=" + scenicId
         + " and s.Module=" + (int)module;
     IQuery query = session.CreateQuery(sql);
     var result = query.Future<Object>();
     if (result.Count() == 0)
     {
         return new ScenicCheckProgress() { CheckStatus = CheckStatus.NotApplied };
     }
     return (ScenicCheckProgress)result.First();
 }