Exemplo n.º 1
0
        /// <summary>
        /// 修改供应商详细信息(供应商附属信息)
        /// </summary>
        /// <param name="Model">供应商实体</param>
        /// <returns></returns>
        public bool UpatetSupplierDetailsInfo(EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo Model)
        {
            bool result = true;

            if (Model.AttachInfo != null)//修改公司附件信息
            {
                result = new EyouSoft.DAL.CompanyStructure.CompanyAttachInfo().SetCompanyAttachInfo(Model.AttachInfo);
            }
            if (result)
            {
                result = idal.Update(Model);
            }
            return(result);
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Master.Naviagtion = AirTicketNavigation.团队预定散拼;
            string method = Utils.GetQueryStringValue("method");

            if (method != "getInfo")
            {
                startCity1    = Utils.GetQueryStringValue("startCity1");
                toCity1       = Utils.GetQueryStringValue("toCity1");
                startCityName = Server.UrlDecode(startCity1);
                toCityName    = Server.UrlDecode(toCity1);
                airType       = Utils.GetQueryStringValue("airType");
                airCompany    = Utils.GetQueryStringValue("airCompany");
                startDate     = Utils.GetQueryStringValue("startDate");
                backDate      = Utils.GetQueryStringValue("backDate");
                peopleNum     = Utils.GetQueryStringValue("peopleNum");
                startCity     = Utils.GetQueryStringValue("startCity");
                toCity        = Utils.GetQueryStringValue("toCity");
                peopleType    = Utils.GetQueryStringValue("peopleType");
            }
            else
            {
                if (!IsLogin)
                {
                    Utils.ResponseMeg(false, "你尚未登录");
                    return;
                }
                string sId = Utils.GetQueryStringValue("sId");
                //获取供应商信息
                //EyouSoft.Model.CompanyStructure.CompanyAttachInfo attachIno=EyouSoft.BLL.CompanyStructure.CompanyAttachInfo.CreateInstance().GetModel(sId);

                EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo info = EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance().GetSupplierInfo(sId);
                if (info == null)
                {
                    info = new EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo();
                }
                string bronze     = Domain.FileSystem + info.AttachInfo.Bronze;
                string tradeAward = Domain.FileSystem + info.AttachInfo.TradeAward;
                string certif     = Domain.FileSystem + info.AttachInfo.BusinessCertif.LicenceImg;
                Response.Clear();
                Response.Write("{");
                Response.Write(string.Format("success:\"1\",message:\"1\",contactName:\"{0}\",tel:\"{1}\",wTime:\"{2}\",webSite:\"{3}\",lev:\"{4}\",successRate:\"{5}\",tTime:\"{6}\",cerImg:\"{7}\",bronze:\"{8}\",trade:\"{9}\"", info.ContactName, info.ContactTel, info.WorkStartTime + "-" + info.WorkEndTime, info.WebSite, info.ProxyLev, (info.SuccessRate * 100).ToString("F2"), info.RefundAvgTime + "/" + info.NoRefundAvgTime, certif, bronze, tradeAward));
                Response.Write("}");
                Response.End();
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 获取完整的供应商实体
 /// </summary>
 /// <param name="CompanyId">公司ID</param>
 /// <returns></returns>
 public EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo GetSupplierInfo(string CompanyId)
 {
     EyouSoft.Model.TicketStructure.TicketWholesalersInfo    ticketWholesalersInfoModel = idal.GetModel(CompanyId);
     EyouSoft.Model.CompanyStructure.CompanyDetailInfo       companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyId);
     EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo Model        = new EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo();
     if (ticketWholesalersInfoModel != null)
     {
         Model.CompanyId = ticketWholesalersInfoModel.CompanyId;
         Model.ProxyLev  = ticketWholesalersInfoModel.ProxyLev;
         //Model.SuccessRate = ticketWholesalersInfoModel.SuccessRate;
         Model.ICPNumber       = ticketWholesalersInfoModel.ICPNumber;
         Model.ContactName     = ticketWholesalersInfoModel.ContactName;
         Model.ContactTel      = ticketWholesalersInfoModel.ContactTel;
         Model.RefundAvgTime   = ticketWholesalersInfoModel.RefundAvgTime;
         Model.NoRefundAvgTime = ticketWholesalersInfoModel.NoRefundAvgTime;
         Model.HandleNum       = ticketWholesalersInfoModel.HandleNum;
         Model.SubmitNum       = ticketWholesalersInfoModel.SubmitNum;
         Model.ServicePrice    = ticketWholesalersInfoModel.ServicePrice;
         Model.WorkStartTime   = ticketWholesalersInfoModel.WorkStartTime;
         Model.WorkEndTime     = ticketWholesalersInfoModel.WorkEndTime;
         Model.DeliveryPrice   = ticketWholesalersInfoModel.DeliveryPrice;
         Model.IntoRatio       = ticketWholesalersInfoModel.IntoRatio;
     }
     if (companyModel != null)
     {
         Model.WebSite       = companyModel.WebSite;
         Model.CompanyRemark = companyModel.Remark;
         Model.AttachInfo    = companyModel.AttachInfo;
         Model.ContactMQ     = companyModel.ContactInfo.MQ;
     }
     if (Model != null)
     {
         return(Model);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 4
0
        protected EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo supplierInfo; //供应商信息
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Master.Naviagtion = AirTicketNavigation.团队预定散拼;
            this.Title             = "预定-组团预定/散拼-机票";
            string method = Utils.GetFormValue("method"); //当前操作

            if (method == "")                             //初次进来显示运价信息
            {
                startDate     = Utils.GetQueryStringValue("startDate");
                backDate      = Utils.GetQueryStringValue("backDate");
                startCity     = Utils.GetQueryStringValue("startCity");
                toCity        = Utils.GetQueryStringValue("toCity");
                airType       = Utils.GetQueryStringValue("airType");
                peopleTypeInt = Utils.GetInt(Utils.GetQueryStringValue("peopleType"));
                peopleType    = (EyouSoft.Model.TicketStructure.TravellerType)peopleTypeInt;
                id            = Utils.GetQueryStringValue("id");
                info          = EyouSoft.BLL.TicketStructure.TicketFreightInfo.CreateInstance().GetModel(id);//获取运价信息实体

                if (info != null)
                {
                    freightDate     = GetDate(info);
                    freightDateBack = GetBackDate(info);
                    startCityName   = info.NoGadHomeCityIdName;
                    toCityName      = info.NoGadDestCityName;
                    supplierInfo    = EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance().GetSupplierInfo(info.Company.ID);
                    //touristCount = info.MaxPCount;
                    touristCount = 100;
                    companyId    = SiteUserInfo.CompanyID;
                }
            }
            if (method == "save") //下订单
            {
                id           = Utils.GetFormValue("id");
                info         = EyouSoft.BLL.TicketStructure.TicketFreightInfo.CreateInstance().GetModel(id);
                supplierInfo = EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance().GetSupplierInfo(info.Company.ID);
                string[] touristNames = Utils.GetFormValues("tb_tourName1");
                string[] tourTypes    = Utils.GetFormValues("tb_tourType1");
                string[] tourSex      = Utils.GetFormValues("tb_tourSex1");
                string[] cerTypes     = Utils.GetFormValues("tb_cerType1");
                string[] cerNos       = Utils.GetFormValues("tb_cerNo1");
                int      length       = touristNames.Length;
                List <EyouSoft.Model.TicketStructure.TicketVistorInfo>   visitorList      = new List <EyouSoft.Model.TicketStructure.TicketVistorInfo>();
                List <EyouSoft.Model.TicketStructure.OrderTravellerInfo> orderVisitorList = new List <EyouSoft.Model.TicketStructure.OrderTravellerInfo>();
                int isTableNum = 0;//是否购买行程单的人数
                EyouSoft.IBLL.TicketStructure.ITicketVisitor visitorBll = EyouSoft.BLL.TicketStructure.TicketVisitor.CreateInstance();
                for (int i = 0; i < length; i++)
                {
                    EyouSoft.Model.TicketStructure.TicketVistorInfo   visitorInfo      = new EyouSoft.Model.TicketStructure.TicketVistorInfo();
                    EyouSoft.Model.TicketStructure.OrderTravellerInfo orderVisitorInfo = new EyouSoft.Model.TicketStructure.OrderTravellerInfo();
                    //添加订单旅客
                    orderVisitorInfo.TravellerName  = touristNames[i];
                    orderVisitorInfo.CertNo         = cerNos[i];
                    orderVisitorInfo.TravellerId    = Guid.NewGuid().ToString();
                    orderVisitorInfo.CertType       = (EyouSoft.Model.TicketStructure.TicketCardType)Utils.GetInt(cerTypes[i]);
                    orderVisitorInfo.Gender         = (EyouSoft.Model.CompanyStructure.Sex)Utils.GetInt(tourSex[i]);
                    orderVisitorInfo.InsPrice       = 0;
                    orderVisitorInfo.TravellerType  = (EyouSoft.Model.TicketStructure.TicketVistorType)Utils.GetInt(tourTypes[i]);
                    orderVisitorInfo.IsBuyIns       = Utils.GetFormValue("tb_isInsure1_" + (i + 1)) == "1";
                    orderVisitorInfo.IsBuyItinerary = Utils.GetFormValue("tb_isTable1_" + (i + 1)) == "1";
                    if (orderVisitorInfo.IsBuyItinerary)
                    {
                        isTableNum++;
                    }
                    orderVisitorInfo.TravellerState = EyouSoft.Model.TicketStructure.TravellerState.正常;
                    orderVisitorList.Add(orderVisitorInfo);

                    if (Utils.GetFormValue("tb_isOften1_" + (i + 1)) == "1")
                    {
                        //添加常旅客
                        if (IsLetter(touristNames[i]))
                        {
                            visitorInfo.EnglishName = touristNames[i];
                        }
                        else
                        {
                            visitorInfo.ChinaName = touristNames[i];
                        }
                        visitorInfo.Id         = orderVisitorInfo.TravellerId;
                        visitorInfo.CardType   = (EyouSoft.Model.TicketStructure.TicketCardType)Utils.GetInt(cerTypes[i]);
                        visitorInfo.CardNo     = cerNos[i];
                        visitorInfo.VistorType = (EyouSoft.Model.TicketStructure.TicketVistorType)Utils.GetInt(tourTypes[i]);
                        visitorInfo.IssueTime  = DateTime.Now;
                        visitorInfo.ContactSex = orderVisitorInfo.Gender;
                        visitorInfo.CompanyId  = SiteUserInfo.CompanyID;
                        if (!visitorBll.VisitorIsExists(visitorInfo.CardNo, SiteUserInfo.CompanyID, ""))
                        {
                            visitorList.Add(visitorInfo);
                        }
                    }
                }
                //添加常旅客到数据库

                visitorBll.AddTicketVisitorList(visitorList);

                //构造订单信息
                EyouSoft.IBLL.TicketStructure.ITicketOrder orderBll  = EyouSoft.BLL.TicketStructure.TicketOrder.CreateInstance();
                EyouSoft.Model.TicketStructure.OrderInfo   orderInfo = new EyouSoft.Model.TicketStructure.OrderInfo();
                orderInfo.Travellers    = orderVisitorList;
                orderInfo.TravellerType = (EyouSoft.Model.TicketStructure.TravellerType)Utils.GetInt(Utils.GetFormValue("peopleType"));
                if (info.FreightType == EyouSoft.Model.TicketStructure.FreightType.来回程)
                {
                    orderInfo.TotalAmount = (info.FromSetPrice + info.ToSetPrice + info.FromFuelPrice + info.ToFuelPrice + info.ToBuildPrice + info.FromBuildPrice) * length + supplierInfo.ServicePrice * isTableNum;
                }
                else
                {
                    orderInfo.TotalAmount = (info.FromSetPrice + info.FromFuelPrice + info.FromBuildPrice) * length + supplierInfo.ServicePrice * isTableNum;
                }
                if (isTableNum > 0)
                {
                    orderInfo.TotalAmount += supplierInfo.DeliveryPrice;
                }
                orderInfo.BuyerCId            = SiteUserInfo.CompanyID;
                orderInfo.BuyerCName          = SiteUserInfo.CompanyName;
                orderInfo.BuyerContactAddress = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID).CompanyAddress;
                orderInfo.BuyerContactMobile  = SiteUserInfo.ContactInfo.Mobile;
                orderInfo.BuyerContactMQ      = SiteUserInfo.ContactInfo.MQ;
                orderInfo.BuyerContactName    = SiteUserInfo.ContactInfo.ContactName;
                orderInfo.BuyerRemark         = Utils.InputText(Utils.GetFormValue("tb_remark"), 250);//特殊要求备注
                orderInfo.BuyerUId            = SiteUserInfo.ID;
                orderInfo.DestCityId          = info.NoGadDestCityId;
                orderInfo.DestCityName        = info.NoGadDestCityName;
                orderInfo.EMSPrice            = supplierInfo.DeliveryPrice;
                orderInfo.FlightId            = info.FlightId;
                orderInfo.FreightType         = info.FreightType;
                orderInfo.HomeCityId          = info.NoGadHomeCityId;
                orderInfo.HomeCityName        = info.NoGadHomeCityIdName;
                orderInfo.ItineraryPrice      = supplierInfo.ServicePrice;
                orderInfo.LeaveTime           = DateTime.Parse(Utils.GetFormValue("startDate"));
                EyouSoft.Model.TicketStructure.OrderRateInfo rateInfo = new EyouSoft.Model.TicketStructure.OrderRateInfo();
                rateInfo.DestCityId     = info.NoGadDestCityId;
                rateInfo.DestCityName   = info.NoGadDestCityName;
                rateInfo.FlightId       = info.FlightId;
                rateInfo.FreightType    = info.FreightType;
                rateInfo.HomeCityId     = info.NoGadHomeCityId;
                rateInfo.HomeCityName   = info.NoGadHomeCityIdName;
                rateInfo.LBuildPrice    = info.FromBuildPrice;
                rateInfo.LeaveDiscount  = info.FromReferRate;
                rateInfo.LeaveFacePrice = info.FromReferPrice;
                rateInfo.LeavePrice     = info.FromSetPrice;
                //计算去程运价有效期
                rateInfo.LeaveTimeLimit  = GetDate(info);
                rateInfo.LFuelPrice      = info.FromFuelPrice;
                rateInfo.MaxPCount       = info.MaxPCount;
                rateInfo.RBuildPrice     = info.ToBuildPrice;
                rateInfo.ReturnDiscount  = info.ToReferRate;
                rateInfo.ReturnFacePrice = info.ToReferPrice;
                rateInfo.ReturnPrice     = info.ToSetPrice;
                //计算回程运价有效期
                rateInfo.ReturnTimeLimit = GetBackDate(info);
                rateInfo.RFuelPrice      = info.ToFuelPrice;
                rateInfo.SupplierRemark  = info.SupplierRemark;
                orderInfo.OrderRateInfo  = rateInfo;
                string act = Utils.GetFormValue("act");
                if (act == "0")
                {
                    orderInfo.OrderState = EyouSoft.Model.TicketStructure.OrderState.等待审核;
                }
                else
                {
                    orderInfo.OrderState = EyouSoft.Model.TicketStructure.OrderState.审核通过;
                }
                orderInfo.OrderTime     = DateTime.Now;
                orderInfo.PCount        = length;
                orderInfo.RateType      = info.RateType;
                orderInfo.ReturnTime    = Utils.GetDateTime(Utils.GetFormValue("backDate"), DateTime.Now);
                orderInfo.SupplierCId   = info.Company.ID;
                orderInfo.SupplierCName = info.Company.CompanyName;

                orderInfo.OrderId = Guid.NewGuid().ToString();
                if (orderBll.CreateOrder(orderInfo))
                {
                    Utils.ResponseMeg(true, orderInfo.OrderId);
                }
                else
                {
                    Utils.ResponseMegError();
                }
            }
        }
Exemplo n.º 5
0
        private void LoadBindData(string orderId)
        {
            EyouSoft.Model.TicketStructure.OrderInfo orderInfo = EyouSoft.BLL.TicketStructure.TicketOrder.CreateInstance().GetOrderInfoById(orderId);
            if (orderInfo != null)
            {
                hidOrderId.Value = orderInfo.OrderId;
                #region 航班信息
                EyouSoft.Model.TicketStructure.TicketFlightCompany companyModel = EyouSoft.BLL.TicketStructure.TicketFlightCompany.CreateInstance().GetTicketFlightCompany(orderInfo.FlightId);
                if (companyModel != null)
                {
                    ltr_gysCompanyName.Text = companyModel.AirportName; //航空公司名
                    companyModel            = null;
                }
                ltr_gysGoDate.Text = orderInfo.LeaveTime.ToString("yyyy-MM-dd");
                //ltr_gysGoRun.Text = orderInfo.HomeCityName + "(" + orderInfo.ReturnTime.ToString("hh:mm") + ")-->" + orderInfo.DestCityName + "(" + orderInfo.LeaveTime.ToString("hh:mm") + ")";
                ltr_gysGoRun.Text      = orderInfo.HomeCityName + "-->" + orderInfo.DestCityName;
                ltr_gyshbType.Text     = orderInfo.FreightType.ToString();
                ltr_gyslkType.Text     = orderInfo.TravellerType.ToString();
                ltr_gysPlaneNum.Text   = orderInfo.LFlightCode; //航班号
                ltr_gysLinkPerson.Text = "";
                ltr_gysdllevel.Text    = "";

                ltr_OrderNo.Text         = orderInfo.OrderNo;
                ltr_OrderPnr.Text        = string.IsNullOrEmpty(orderInfo.PNR) == true ? orderInfo.OPNR : "";
                ltr_IsChangePnr.Text     = string.IsNullOrEmpty(orderInfo.PNR) == true ? "" : orderInfo.PNR;
                ltr_gysCompanyName1.Text = orderInfo.SupplierCName;
                ltr_TeamType.Text        = orderInfo.RateType.ToString(); //团队类型

                #endregion
                #region 供应商详细信息
                EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo gysInfo = EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance().GetSupplierInfo(orderInfo.SupplierCId);//orderInfo.SupplierCId
                if (gysInfo != null)
                {
                    GysContactMQ               = gysInfo.ContactMQ;
                    ltr_gysLinkPerson.Text     = gysInfo.ContactName;
                    ltr_gysWorkDate.Text       = gysInfo.WorkStartTime + "-" + gysInfo.WorkEndTime;
                    ltr_gysMainPage.Text       = string.IsNullOrEmpty(gysInfo.WebSite) == true?"":"<a target=\"_blank\" href=\"http://" + gysInfo.WebSite + "\">http://" + gysInfo.WebSite + "</a>"; //供应商主页
                    ltr_gysLinkPhone.Text      = gysInfo.ContactTel;
                    ltr_gysOutTickets.Text     = (gysInfo.SuccessRate * 100).ToString("F1") + "%";
                    ltr_gysdllevel.Text        = gysInfo.ProxyLev;
                    ltr_gysBackTicAgvDate.Text = "自愿/非自愿:" + gysInfo.RefundAvgTime.ToString() + "/" + gysInfo.NoRefundAvgTime.ToString();//平均退票时间
                    gysInfo = null;
                }
                ltr_gysRemark.Text = orderInfo.OrderRateInfo.SupplierRemark;

                string CgsPayInfo = "";
                //运价信息
                string strhtml = "<tr><td align=\"center\" height=\"25\">{0}</td><td align=\"center\">¥{1}</td><td align=\"center\"><font color=\"#ff6600\">{2}</font></td><td align=\"center\">{3}</td><td align=\"center\"><span class=\"jiesuanjia\">¥{4}</span></td><td align=\"center\">{5}</td><td align=\"center\">¥{6}</td></tr>";
                //回程显示的html
                string backrunhtml = "<td align=\"center\" height=\"25\">回程:</td> <td align=\"left\">{0}</td><td align=\"left\">返回时间:{1}</td><td width=\"12%\" align=\"center\">航班号:{2}</td><td align=\"left\">旅客类型:{3}</td>";
                //单程信息
                OrderRateInfo = string.Format(strhtml, "去程", Utils.GetMoney(orderInfo.OrderRateInfo.LeaveFacePrice), Utils.GetMoney(orderInfo.OrderRateInfo.LeaveDiscount) + "%", orderInfo.OrderRateInfo.LeaveTimeLimit, Utils.GetMoney(orderInfo.OrderRateInfo.LeavePrice), orderInfo.OrderRateInfo.MaxPCount.ToString(), Utils.GetMoney(orderInfo.OrderRateInfo.LFuelPrice) + "/" + Utils.GetMoney(orderInfo.OrderRateInfo.LBuildPrice));
                if (orderInfo.FreightType == EyouSoft.Model.TicketStructure.FreightType.来回程)
                {
                    CgsPayInfo = "航班信息(往返程):去程" + orderInfo.LeaveTime.ToString("yyyy-MM-dd") + "/" + orderInfo.HomeCityName + "至" + orderInfo.DestCityName + ";" + " 回程" + orderInfo.ReturnTime.ToString("yyyy-MM-dd") + "/" + orderInfo.DestCityName + "至" + orderInfo.HomeCityName;
                    //航班回程信息
                    OrderRateInfo += string.Format(strhtml, "回程", Utils.GetMoney(orderInfo.OrderRateInfo.ReturnFacePrice), Utils.GetMoney(orderInfo.OrderRateInfo.ReturnDiscount) + "%", orderInfo.OrderRateInfo.ReturnTimeLimit, Utils.GetMoney(orderInfo.OrderRateInfo.ReturnPrice), orderInfo.OrderRateInfo.MaxPCount, Utils.GetMoney(orderInfo.OrderRateInfo.RFuelPrice) + "/" + Utils.GetMoney(orderInfo.OrderRateInfo.RBuildPrice));
                    //显示回程信息
                    //string cityinfo = orderInfo.DestCityName + "(" + orderInfo.ReturnTime.ToString("hh:mm") + ")-->" + orderInfo.HomeCityName + "(" + orderInfo.LeaveTime.ToString("hh:mm") + ")";  //回程格式
                    string cityinfo = orderInfo.DestCityName + "-->" + orderInfo.HomeCityName;  //回程格式
                    BackRunInfo = string.Format(backrunhtml, cityinfo, orderInfo.ReturnTime.ToString("yyyy-MM-dd"), orderInfo.RFlightCode, orderInfo.TravellerType.ToString());
                }
                if (orderInfo.FreightType == EyouSoft.Model.TicketStructure.FreightType.单程)
                {
                    CgsPayInfo = "航班信息(单程):" + orderInfo.LeaveTime.ToString("yyyy-MM-dd") + "/" + orderInfo.HomeCityName + "至" + orderInfo.DestCityName;
                }
                #endregion
                #region 旅客信息
                ltr_perCount.Text = orderInfo.PCount.ToString();
                IList <EyouSoft.Model.TicketStructure.OrderTravellerInfo> traveller = orderInfo.Travellers;
                if (traveller != null && traveller.Count > 0)
                {
                    crptPassengersList.DataSource = traveller;
                    crptPassengersList.DataBind();
                }
                BuySafetyCount  = orderInfo.Travellers.Where(i => i.IsBuyIns).Count();       //保险数
                BuyRoutingCount = orderInfo.Travellers.Where(i => i.IsBuyItinerary).Count(); //行程单数

                #endregion

                #region 支付方式和支付金额
                ltr_PassCount.Text  = orderInfo.PCount.ToString();
                ltr_TotalPrice.Text = orderInfo.TotalAmount.ToString("0.00");
                #endregion

                #region 采购商联系方式
                txtcgsAddress.Value      = orderInfo.BuyerContactAddress;//SiteUserInfo.ContactInfo//联系人地址
                txtcgsComapanyName.Value = orderInfo.BuyerCName;
                txtcgsLinkName.Value     = orderInfo.BuyerContactName;
                txtcgsTel.Value          = orderInfo.BuyerContactMobile;
                txaExpressRemark.Value   = orderInfo.BuyerRemark; //特殊备注
                #endregion
                #region 订单处理状态
                IList <EyouSoft.Model.TicketStructure.TicketOrderLog> orderLogs = EyouSoft.BLL.TicketStructure.TicketOrder.CreateInstance().GetTicketOrderState(orderInfo.OrderId);
                if (orderLogs.Count > 0 && orderLogs != null)
                {
                    crptOrdState.DataSource = orderLogs;
                    crptOrdState.DataBind();
                    OrderStateLog = orderLogs[orderLogs.Count - 1].State;  //当前订单状态赋值
                    if (OrderStateLog != "申请改期" && OrderStateLog != "申请退票" && OrderStateLog != "申请作废" && OrderStateLog != "申请改签")
                    {
                        OrderStateLog = string.Empty;
                    }
                    foreach (EyouSoft.Model.TicketStructure.TicketOrderLog item in orderLogs)
                    {
                        item.Remark = CutStr(item.Remark, 50);
                    }
                    orderLogs = null;
                }
                #endregion

                switch (orderInfo.OrderState)
                {
                case EyouSoft.Model.TicketStructure.OrderState.等待审核:
                case EyouSoft.Model.TicketStructure.OrderState.拒绝审核:
                    divOperateOrder.Visible = false; //支付操作div
                    divPayType.Visible      = false; //支付类型div
                    divSpecRemark.Visible   = false; //特殊备注div
                    break;

                case EyouSoft.Model.TicketStructure.OrderState.出票完成:
                    divPayType.Visible      = false; //支付类型div
                    divOperateOrder.Visible = true;
                    #region 绑定退作废控件值
                    sltBlack.Items.Add(new ListItem("-请选择-", "0"));
                    sltBlankOut.Items.Add(new ListItem("-请选择-", "0"));
                    string[] arrback = Enum.GetNames(typeof(EyouSoft.Model.TicketStructure.RefundTicketType));
                    if (arrback.Length > 0 && arrback != null)
                    {
                        foreach (string item in arrback)
                        {
                            if ((EyouSoft.Model.TicketStructure.RefundTicketType)Enum.Parse(typeof(EyouSoft.Model.TicketStructure.RefundTicketType), item) == EyouSoft.Model.TicketStructure.RefundTicketType.当日作废)
                            {
                                sltBlankOut.Items.Add(new ListItem(item, item));
                                break;
                            }
                            else
                            {
                                sltBlack.Items.Add(new ListItem(item, item));
                            }
                        }
                    }

                    #endregion

                    break;

                case EyouSoft.Model.TicketStructure.OrderState.审核通过:
                    divOperateOrder.Visible = false;
                    //根据当前采购商用户绑定的支付类型显示支付链接
                    ShowCgSPayType(orderInfo.OrderNo, orderInfo.TotalAmount, CgsPayInfo, orderInfo.SupplierCId, orderInfo.OrderId);
                    OrderNo     = orderInfo.OrderNo;
                    SupplierCId = orderInfo.SupplierCId;
                    TotalAmount = orderInfo.TotalAmount.ToString();
                    break;

                case EyouSoft.Model.TicketStructure.OrderState.拒绝出票:
                case EyouSoft.Model.TicketStructure.OrderState.支付成功:
                    divOperateOrder.Visible = false; //支付操作div
                    divPayType.Visible      = false; //支付类型div
                    break;

                case EyouSoft.Model.TicketStructure.OrderState.无效订单:
                    divOperateOrder.Visible = false; //支付操作div
                    divPayType.Visible      = false; //支付类型div
                    divSpecRemark.Visible   = false; //特殊备注div
                    divcgsInfo.Visible      = false;
                    break;

                default:

                    break;
                }
                traveller = null;
                orderInfo = null;
            }
            else
            {
                Response.Redirect("CurrentOrderList.aspx");
                return;
            }
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string requestType = Request.QueryString["type"] != null ? Request.QueryString["type"].ToString().ToLower() : "";

            if (requestType == "save")
            {
                Save();
            }
            // 判断用户是否登录,如果没有登录跳转到登录页面
            if (!IsLogin)
            {
                EyouSoft.Security.Membership.UserProvider.RedirectLogin(Domain.UserBackCenter + "/TicketsCenter/Default.aspx");
                return;
            }

            //判断用户所在公司,在运营后台是否通过了审核
            if (!IsCompanyCheck)//没有通过审核
            {
                Utils.ShowError("对不起,您还没通过审核,不能进入机票供应商后台!", "ticketscenter");
                return;
            }

            //判断用户是否是机票供应商用户
            if (!IsAirTicketSupplyUser)//不是
            {
                Utils.ShowError("对不起,您不是机票供应商用户,不能进入机票供应商后台!", "ticketscenter");
                return;
            }

            //判断用户绑定的支付帐户信息 是否已经成功加入支付圈
            EyouSoft.IBLL.TicketStructure.ITicketCompanyAccount bll =
                EyouSoft.BLL.TicketStructure.TicketCompanyAccount.CreateInstance();

            //当前只能判断支付宝接口和财付通接口的帐户
            IList <EyouSoft.Model.TicketStructure.TicketCompanyAccount> accountList =
                bll.GetTicketCompanyAccountList(SiteUserInfo.CompanyID);

            if (accountList != null && accountList.Count > 0)
            {
                foreach (EyouSoft.Model.TicketStructure.TicketCompanyAccount account in accountList)
                {
                    if (account.InterfaceType == EyouSoft.Model.TicketStructure.TicketAccountType.支付宝)
                    {
                        if (account.IsSign)//已经签约
                        {
                            continue;
                        }
                        //通过 支付宝查询是否签约接口,获取该帐户是否已经签约
                        Query_Customer queryCustomer = new Query_Customer(
                            AlipayParameters.Partner,
                            AlipayParameters.Key,
                            AlipayParameters.SignType,
                            AlipayParameters.Input_Charset,
                            account.AccountNumber);
                        Query_Customer_Result queryCustomerResult = queryCustomer.GetResult();
                        if (queryCustomerResult.IsSuccess_Refund_Charge)//已经签约
                        {
                            //将成功签约的状态保存到数据库中
                            account.IsSign = true;
                            bll.SetIsSign(account.CompanyId, account.InterfaceType, true);
                        }
                    }
                    else if (account.InterfaceType == EyouSoft.Model.TicketStructure.TicketAccountType.财付通)
                    {
                        if (account.IsSign)//已经建立委托退款关系
                        {
                            continue;
                        }
                        //通过 财付通查询是否建立委托退款关系接口,获取该帐户是否已经建立委托关系
                        trustRefundQuerys querys = new trustRefundQuerys(
                            TenpayParameters.Bargainor_ID,
                            account.AccountNumber,
                            TenpayParameters.Key,
                            Context);
                        bool isTrust = querys.IsTrustRefund();
                        if (isTrust == true)//已经建立关系
                        {
                            //将成功建立关系的状态保存到数据库中
                            account.IsSign = true;
                            bll.SetIsSign(account.CompanyId, account.InterfaceType, true);
                        }
                    }
                }
            }

            //初始化订单管理列表
            diclist = EyouSoft.BLL.TicketStructure.TicketOrder.CreateInstance().GetSupplierHandelStats(SiteUserInfo.CompanyID);

            //初始化公司信息
            ltrCompanyName.Text = SiteUserInfo.CompanyName;
            EyouSoft.IBLL.CompanyStructure.ICompanyInfo       CompanyInfo      = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo CompanyInfoModel = CompanyInfo.GetModel(SiteUserInfo.CompanyID);
            if (CompanyInfoModel != null)
            {
                if (!String.IsNullOrEmpty(CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath))
                {
                    this.imgLogo.Src = Domain.FileSystem + CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath;
                }
                else
                {
                    this.imgLogo.Src = ImageServerUrl + "/images/logo.gif";
                }
            }
            ltrUserName.Text = SiteUserInfo.UserName;

            //初始化  现有运价数 ,平台用户数
            int gongYingUserCount = 0;

            EyouSoft.Model.SystemStructure.SummaryCount scount =
                EyouSoft.BLL.SystemStructure.SummaryCount.CreateInstance().GetSummary();
            if (scount != null)
            {
                gongYingUserCount = scount.TicketCompanyVirtual;
            }
            ltrGongYingCompanyCount.Text = gongYingUserCount.ToString();

            //初始化用户资料
            EyouSoft.IBLL.TicketStructure.ITicketSupplierInfo isupplierInfoBll =
                EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance();
            EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo allInfo =
                isupplierInfoBll.GetSupplierInfo(SiteUserInfo.CompanyID);
            if (allInfo != null)
            {
                Default_ContactPeople.Value = allInfo.ContactName;                              //联系人
                Default_Phone.Value         = allInfo.ContactTel;                               //联系电话
                ltrUserLevel.Text           = allInfo.ProxyLev;                                 //代理级别
                ltrTicketSuccess.Text       = (allInfo.SuccessRate * 100).ToString("F1") + "%"; //出票成功率
                Default_ICP.Value           = allInfo.ICPNumber;                                //ICP备案号
                Default_Url.Value           = allInfo.WebSite;                                  //网址

                string licenceImg = allInfo.AttachInfo.BusinessCertif.LicenceImg;               //营业执照
                //判断是否有上传了营业执照
                if (!string.IsNullOrEmpty(licenceImg))                                          //有
                {
                    //显示 查看图片链接
                    ltrFile1.Text = string.Format("<a href='{0}' target='_blank'>查看</a>", Domain.FileSystem + licenceImg);
                }
                else
                {
                    ltrFile1.Text = "暂无营业执照";
                }

                string bronze = allInfo.AttachInfo.Bronze; //铜牌
                //判断是否有上传了铜牌
                if (!string.IsNullOrEmpty(bronze))         //有
                {
                    //显示 查看图片链接
                    ltrFile2.Text = string.Format("<a href='{0}' target='_blank'>查看</a>", Domain.FileSystem + bronze);
                }
                else
                {
                    ltrFile2.Text = "暂无铜牌图片";
                }

                string tradeAward = allInfo.AttachInfo.TradeAward; //行业奖项
                //判断是否有上传了行业奖项
                if (!string.IsNullOrEmpty(tradeAward))             //有
                {
                    //显示 查看图片链接
                    ltrFile3.Text = string.Format("<a href='{0}' target='_blank'>查看</a>", Domain.FileSystem + tradeAward);
                }
                else
                {
                    ltrFile3.Text = "暂无行业奖项图片";
                }

                Default_Remark.Value = allInfo.CompanyRemark;//备注
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 保存用户信息
        /// </summary>
        protected void Save()
        {
            //如果没有登录则返回没有登录的信息
            if (!IsLogin)
            {
                Response.Clear();
                Response.Write("{Islogin:false}");
                Response.End();
            }

            //获取用户信息,需设置每一个信息在服务端能接受的最大长度值。
            string contactPeople = Utils.GetFormValue("Default_ContactPeople");          //联系人
            string phone         = Utils.GetFormValue("Default_Phone");                  //联系电话
            string jcp           = Utils.GetFormValue("Default_ICP");                    //ICP备案号
            string url           = Utils.GetFormValue("Default_Url");                    //网址
            string filepath1     = Utils.GetFormValue("fileUploadControl1$hidFileName"); //营业执照
            string filepath2     = Utils.GetFormValue("fileUploadControl2$hidFileName"); //铜牌图片
            string filepath3     = Utils.GetFormValue("fileUploadControl3$hidFileName"); //行业奖项
            string remark        = Utils.GetFormValue("Default_Remark", 250);            //备注

            //验证数据有效性
            string errMsg = string.Empty;//错误信息

            //联系人是否为空
            if (contactPeople == string.Empty)//为空
            {
                errMsg += "联系人不能为空\n";
            }
            //联系电话是否为空
            if (phone == string.Empty)//为空
            {
                errMsg += "联系电话不能为空\n";
            }
            else//不为空
            {
                //验证联系电话是否有效
                if (!Utils.IsPhone(phone))//无效
                {
                    errMsg += "联系电话格式不正确";
                }
            }
            //ICP备案号不能为空
            if (jcp == string.Empty)//为空
            {
                errMsg += "ICP备案号不能为空\n";
            }
            //网址不能为空
            if (url == string.Empty)//为空
            {
                errMsg += "网址不能为空\n";
            }

            //判断 是否 错误信息
            if (errMsg != string.Empty)//有
            {
                //返回错误信息
                Utils.ResponseMeg(false, errMsg);
                return;
            }

            //保存到数据库中
            EyouSoft.IBLL.TicketStructure.ITicketSupplierInfo bll =
                EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance();
            EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo allInfo =
                bll.GetSupplierInfo(SiteUserInfo.CompanyID);

            allInfo.ContactName = contactPeople;
            allInfo.ContactTel  = phone;
            allInfo.ICPNumber   = jcp;
            allInfo.WebSite     = url;
            if (filepath1 != string.Empty)//营业执照
            {
                allInfo.AttachInfo.BusinessCertif.LicenceImg = filepath1;
            }
            if (filepath2 != string.Empty)//铜牌
            {
                allInfo.AttachInfo.Bronze = filepath2;
            }
            if (filepath3 != string.Empty)//行业奖项
            {
                allInfo.AttachInfo.TradeAward = filepath3;
            }
            allInfo.CompanyRemark = remark;

            bool result = bll.UpatetSupplierDetailsInfo(allInfo);

            if (result)
            {
                Utils.ResponseMeg(true, "保存成功");
            }
            else
            {
                Utils.ResponseMeg(false, "保存失败,请稍后再试");
            }
        }