public static void UpdateRefundAndRescheduling(RefundAndReschedulingView refundAndReschedulingView, string account) { var refundAndRescheduling = RefundAndRescheduling.GetRefundAndRescheduling(refundAndReschedulingView); var repository = ChinaPay.B3B.Service.Foundation.Repository.Factory.CreateRefundAndReschedulingRepository(); repository.Update(refundAndRescheduling); saveLog(OperationType.Update, "修改退改签客规", refundAndRescheduling.AirlineCode.Value, account); }
public static void AddRefundAndRescheduling(RefundAndReschedulingView refundAndReschedulingView, string account) { var refundAndRescheduling = RefundAndRescheduling.GetRefundAndRescheduling(refundAndReschedulingView); if (QueryRefundAndRescheduling(refundAndRescheduling.AirlineCode) != null) { throw new ChinaPay.Core.Exception.KeyRepeatedException("航空公司[" + refundAndRescheduling.AirlineCode + "]的退改签客规已存在"); } var repository = ChinaPay.B3B.Service.Foundation.Repository.Factory.CreateRefundAndReschedulingRepository(); repository.Insert(refundAndRescheduling); saveLog(OperationType.Insert, "添加退改签客规", refundAndRescheduling.AirlineCode.Value, account); }
internal static RefundAndRescheduling GetRefundAndRescheduling(RefundAndReschedulingView refundAndReschedulingView) { if (null == refundAndReschedulingView) { throw new ArgumentNullException("refundAndReschedulingView"); } refundAndReschedulingView.Validate(); return(new RefundAndRescheduling(ChinaPay.Utility.StringUtility.Trim(refundAndReschedulingView.Airline)) { Refund = ChinaPay.Utility.StringUtility.Trim(refundAndReschedulingView.Refund), Scrap = ChinaPay.Utility.StringUtility.Trim(refundAndReschedulingView.Scrap), Change = ChinaPay.Utility.StringUtility.Trim(refundAndReschedulingView.Change), AirlineTel = ChinaPay.Utility.StringUtility.Trim(refundAndReschedulingView.AirlineTel), Remark = ChinaPay.Utility.StringUtility.Trim(refundAndReschedulingView.Remark), Level = refundAndReschedulingView.Level }); }
protected void btnSave_Click(object sender, EventArgs e) { if (Request.QueryString["action"] != null) { RefundAndReschedulingView refundAndReschedulingView = new RefundAndReschedulingView() { Airline = this.ddlAirline.SelectedValue, AirlineTel = this.txtPhone.Text.Trim(), Refund = this.txtRefund.InnerText.Trim(), Scrap = this.txtScrap.InnerText.Trim(), Change = this.txtChange.InnerText.Trim(), Remark = this.txtRemark.InnerText.Trim(), Level = Convert.ToInt32(this.txtOrderby.Text.Trim()) }; if (Request.QueryString["action"].ToString() == "add") { try { FoundationService.AddRefundAndRescheduling(refundAndReschedulingView, CurrentUser.UserName); RegisterScript("alert('添加成功!'); window.location.href='RefundChangeTicket.aspx'"); } catch (Exception ex) { ShowExceptionMessage(ex, "添加"); } } else { try { FoundationService.UpdateRefundAndRescheduling(refundAndReschedulingView, CurrentUser.UserName); RegisterScript("alert('修改成功!'); window.location.href='RefundChangeTicket.aspx'"); } catch (Exception ex) { ShowExceptionMessage(ex, "修改"); } } } }