コード例 #1
0
        private void queryFlightInformationByPurchase(Pagination pagination)
        {
            var data = from item in QSService.QueryTransferInformationByPurchase(getCondition(), pagination)
                       select new
            {
                OriginalCarrierName = item.OriginalCarrierName,
                CarrierName         = item.CarrierName,
                TransferType        = item.TransferType.GetDescription(),
                OriginalFlightNo    = item.OriginalFlightNo,
                FlightNo            = item.FlightNo,
                OriginalTakeoffTime = item.OriginalTakeoffTime,
                TakeoffTime         = item.TakeoffTime.HasValue?item.TakeoffTime.ToString():string.Empty,
                OriginalArrivalTime = item.OriginalArrivalTime,
                ArrivalTime         = item.ArrivalTime.HasValue?item.ArrivalTime.ToString():string.Empty
            };

            this.rptInformation.DataSource = data;
            this.rptInformation.DataBind();
            if (data.Count() > 0)
            {
                this.Pager.Visible          = true;
                this.rptInformation.Visible = true;
                this.emptyDataInfo.Visible  = false;
                if (pagination.GetRowCount)
                {
                    Pager.RowCount = pagination.RowCount;
                }
            }
            else
            {
                this.Pager.Visible          = false;
                this.rptInformation.Visible = false;
                this.emptyDataInfo.Visible  = true;
            }
        }
コード例 #2
0
ファイル: NotifyPurchase.aspx.cs プロジェクト: 842549829/Pool
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (validate())
     {
         var ids         = new List <Guid>();
         var transferIds = this.hfdTransferIds.Value.Split(',');
         foreach (var item in transferIds)
         {
             ids.Add(Guid.Parse(item));
         }
         try
         {
             if (this.radioMessage.Checked)
             {
                 QSService.MessageInformPurchaser(Guid.Parse(Request.QueryString["purchaserId"]), ids, this.txtMessage.InnerText.Trim(), CurrentUser.UserName, CurrentUser.Name);
                 var contactPhone = new List <string>();
                 contactPhone.Add(Request.QueryString["contractPhone"]);
                 SMSSendService.SendCustomMessage(new SMS.Service.Domain.Account(Guid.Empty, CurrentUser.UserName),
                                                  contactPhone,
                                                  this.txtMessage.InnerText.Trim(), true);
             }
             if (this.radioHandler.Checked)
             {
                 QSService.InformPurchaser(Guid.Parse(Request.QueryString["purchaserId"]), ids, (InformType)int.Parse(this.ddlNoticeWay.SelectedValue),
                                           (InformResult)int.Parse(this.ddlNoticeResult.SelectedValue), this.txtNoticeRemark.Text.Trim(), CurrentUser.UserName, CurrentUser.Name);
             }
             Page.ClientScript.RegisterClientScriptBlock(GetType(), "success", "alert('通知成功');window.location.href='FlightChangeNotice.aspx'", true);
         }
         catch (Exception ex)
         {
             ShowExceptionMessage(ex, "通知");
         }
     }
 }
コード例 #3
0
ファイル: NotifyPurchase.aspx.cs プロジェクト: 842549829/Pool
 private void queryNoticyPurchase(Pagination pagination)
 {
     this.rptNotify.DataSource = from item in QSService.QueryTransferDetails(pagination, Guid.Parse(Request.QueryString["purchaserId"]))
                                 select new
     {
         PNR                 = item.PNR.ToString(),
         OrderId             = item.OrderId,
         OriginalCarrierName = item.OriginalCarrierName,
         TransferType        = item.TransferType.GetDescription(),
         OriginalFlightNo    = item.OriginalFlightNo,
         FlightNo            = item.FlightNo,
         OriginalTakeoffTime = item.OriginalTakeoffTime,
         TakeoffTime         = item.TakeoffTime.HasValue ? item.TakeoffTime.Value.ToString("yyyy-MM-dd HH:mm") : string.Empty,
         OriginalArrivalTime = item.OriginalArrivalTime,
         ArrivalTime         = item.ArrivalTime.HasValue?item.ArrivalTime.Value.ToString("yyyy-MM-dd HH:mm"):string.Empty,
         CarrierName         = item.CarrierName,
         TransferId          = item.TransferId
     };
     this.rptNotify.DataBind();
     if (pagination.RowCount > 0)
     {
         this.pager.Visible = true;
         if (pagination.GetRowCount)
         {
             this.pager.RowCount = pagination.RowCount;
         }
     }
     else
     {
         this.pager.Visible = false;
     }
 }
コード例 #4
0
 private void queryNoticeRecords(Pagination pagination)
 {
     this.noticeRecords.DataSource = from item in QSService.QueryInformRecords(getRecordConditon(), pagination)
                                     select new
     {
         PurchaserAccount  = item.PurchaserAccount,
         CarrierName       = item.CarrierName,
         DepartureName     = item.DepartureName,
         ArrivalName       = item.ArrivalName,
         FlightNO          = item.FlightNO,
         TransferType      = item.TransferType.GetDescription(),
         InformTime        = item.InformTime.HasValue ? item.InformTime.Value.ToString("yyyy-MM-dd HH:mm") : string.Empty,
         InformMethod      = item.InformType.HasValue ? item.InformType.GetDescription() : string.Empty,
         InformResult      = item.InformResult.HasValue ? item.InformResult.GetDescription() : string.Empty,
         InfromerName      = item.InfromerName,
         ArrivalCityName   = item.ArrivalCityName,
         DepartureCityName = item.DepartureCityName
     };
     this.noticeRecords.DataBind();
     if (pagination.RowCount > 0)
     {
         this.recordPager.Visible = true;
         if (pagination.GetRowCount)
         {
             this.recordPager.RowCount = pagination.RowCount;
         }
     }
     else
     {
         this.recordPager.Visible = false;
     }
 }
コード例 #5
0
        private void initData()
        {
            //航空公司
            this.ddlAirlines.DataSource = from item in FoundationService.Airlines
                                          select new
            {
                Name = item.Code + "-" + item.ShortName,
                Code = item.Code
            };
            this.ddlAirlines.DataTextField  = "Name";
            this.ddlAirlines.DataValueField = "Code";
            this.ddlAirlines.DataBind();
            this.ddlAirlines.Items.Insert(0, new ListItem("全部", ""));
            //变更类型
            var transferType = Enum.GetValues(typeof(TransferType)) as TransferType[];

            foreach (var item in transferType)
            {
                this.ddlChangeType.Items.Add(new ListItem(item.GetDescription(), ((int)item).ToString()));
            }
            this.ddlChangeType.Items.Insert(0, new ListItem("全部", ""));
            //通知类型
            var informMethod = Enum.GetValues(typeof(InformType)) as InformType[];

            foreach (var item in informMethod)
            {
                this.ddlNoticeWay.Items.Add(new ListItem(item.GetDescription(), ((int)item).ToString()));
            }
            this.ddlNoticeWay.Items.Insert(0, new ListItem("全部", ""));
            //通知结果
            var informResult = Enum.GetValues(typeof(InformResult)) as InformResult[];

            foreach (var item in informResult)
            {
                this.ddlNoticeResult.Items.Add(new ListItem(item.GetDescription(), ((int)item).ToString()));
            }
            this.ddlNoticeResult.Items.Insert(0, new ListItem("全部", ""));
            //采购商
            //var companies = CompanyService.GetCompanies(CompanyType.Provider | CompanyType.Purchaser | CompanyType.Supplier, true);
            this.txtPurchase.SetCompanyType(CompanyType.Provider | CompanyType.Purchaser | CompanyType.Supplier, true);

            var flight = QSService.QueryFlightTransferStatInfo();

            if (flight != null)
            {
                this.lblAirlineCount.Text     = flight.CarrierCount.ToString();
                this.lblFlightCount.Text      = flight.FlightCount.ToString();
                this.lblPuchaseCount.Text     = flight.PurchaserCount.ToString();
                this.lblFlightChangeTime.Text = flight.LastQSTime.ToString();
                lblToBeInformCount.Text       = flight.ToBeInformCount.ToString();
            }
        }
コード例 #6
0
 private void queryFlightChange(Pagination pagination)
 {
     this.dataList.DataSource = QSService.QueryTransferInformation(pagination);
     this.dataList.DataBind();
     if (pagination.RowCount > 0)
     {
         this.pager.Visible         = true;
         this.dataList.Visible      = true;
         this.emptyDataInfo.Visible = false;
         if (pagination.GetRowCount)
         {
             this.pager.RowCount = pagination.RowCount;
         }
     }
     else
     {
         this.dataList.Visible      = false;
         this.emptyDataInfo.Visible = true;
         this.pager.Visible         = false;
     }
 }
コード例 #7
0
        private void queryTransferDetailByPurchase(Pagination pagination)
        {
            var data = from item in QSService.QueryTransferDetailByPurchase(pagination, this.CurrentCompany.CompanyId)
                       select new
            {
                PNR                 = item.PNR.ToString(),
                OrderId             = item.OrderId,
                OriginalCarrierName = item.OriginalCarrierName,
                CarrierName         = item.CarrierName,
                TransferType        = item.TransferType.GetDescription(),
                TransferTypeValue   = (byte)item.TransferType,
                OriginalFlightNo    = item.OriginalFlightNo,
                FlightNo            = item.FlightNo,
                OriginalTakeoffTime = item.OriginalTakeoffTime,
                TakeoffTime         = item.TakeoffTime.HasValue?item.TakeoffTime.ToString():string.Empty,
                OriginalArrivalTime = item.OriginalArrivalTime,
                ArrivalTime         = item.ArrivalTime.HasValue?item.ArrivalTime.ToString():string.Empty,
                TransferId          = item.TransferId,
                IsBeyondThreeDay    = item.OriginalTakeoffTime.Date <= DateTime.Now.AddDays(2).Date
            };

            this.rptNotify.DataSource = data;
            this.rptNotify.DataBind();
            if (data.Count() > 0)
            {
                rptNotify.Visible     = true;
                pager.Visible         = true;
                emptyDataInfo.Visible = false;
                if (pagination.GetRowCount)
                {
                    pager.RowCount = pagination.RowCount;
                }
            }
            else
            {
                rptNotify.Visible     = false;
                pager.Visible         = false;
                emptyDataInfo.Visible = true;
            }
        }
コード例 #8
0
        private void initData()
        {
            var change = QSService.QueryPurchaseFlightStaticInfo(this.CurrentCompany.CompanyId);

            if (change == null || change.OrderCount == 0)
            {
                flightChangeWithoutData.Visible = true;
                flightChangeHasData.Visible     = false;
                this.emptyDataInfo.Visible      = true;
            }
            else
            {
                lblFlightChangeTime.Text = change.LastQSTime.ToString();
                lblFlightCount.Text      = change.FlightCount.ToString();
                lblOrderCount.Text       = change.OrderCount.ToString();
                queryTransferDetail(1);
            }

            if (!string.IsNullOrWhiteSpace(this.CurrentCompany.OfficePhones))
            {
                this.hfdPurchasePhone.Value = this.CurrentCompany.OfficePhones;
            }
            else
            {
                this.hfdPurchasePhone.Value = this.CurrentCompany.ContactPhone;
            }
            var query = SMSAccountService.QueryAccount(CurrentCompany.CompanyId);

            if (query != null)
            {
                this.lblMessageCount.Text = query.Balance.ToString();
            }
            else
            {
                this.lblMessageCount.Text = "0";
            }
        }