Example #1
0
 public static void AddFixedNavigation(FixedNavigationView fixedNavigationView, string account)
 {
     if (Service.Foundation.Domain.FixedNavigations.Instance.Query(fixedNavigationView.Departure, fixedNavigationView.Arrival) != null)
     {
         throw new ChinaPay.Core.Exception.KeyRepeatedException("[" + fixedNavigationView.Departure + "]-[" + fixedNavigationView.Arrival + "] 此条航线已经存在");
     }
     Service.Foundation.Domain.FixedNavigations.Instance.Insert(fixedNavigationView);
     saveAddLog("非固定航线", fixedNavigationView.ToString(), fixedNavigationView.Departure + fixedNavigationView.Arrival, account);
 }
Example #2
0
 private bool isValidData(FixedNavigationView view)
 {
     if (!string.IsNullOrEmpty(ucDepartures.Code) && ucDepartures.Code != view.Departure)
     {
         return(false);
     }
     if (!string.IsNullOrEmpty(ucArrivals.Code) && ucArrivals.Code != view.Arrival)
     {
         return(false);
     }
     return(true);
 }
Example #3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         Checking();
         var fixedNavigation = new FixedNavigationView();
         fixedNavigation.Departure = ucDeparture.Code;
         fixedNavigation.Arrival   = ucArrival.Code;
         FoundationService.AddFixedNavigation(fixedNavigation, CurrentUser.UserName);
         ShowMessage("保存成功!");
         refresh();
     }
     catch (Exception ex)
     {
         ShowExceptionMessage(ex, "保存");
     }
 }
Example #4
0
 public static void DeleteFixedNavigation(FixedNavigationView fixedNavigationView, string account)
 {
     Service.Foundation.Domain.FixedNavigations.Instance.Delete(fixedNavigationView);
     saveDeleteLog("非固定航线", fixedNavigationView.ToString(), fixedNavigationView.Departure + fixedNavigationView.Arrival, account);
 }