Beispiel #1
0
        /// <summary>
        /// 写入酒店供应商信息,正值时成功,负值或0时失败
        /// </summary>
        /// <param name="info">酒店供应商信息业务实体</param>
        /// <returns>正值:成功 负值或0:失败</returns>
        public int InsertHotelInfo(EyouSoft.Model.SupplierStructure.SupplierHotelInfo info)
        {
            using (TransactionScope AddTran = new TransactionScope())
            {
                bool dalResult = false;
                EyouSoft.BLL.CompanyStructure.SupplierBaseHandle basicbll = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle();
                info.Id  = basicbll.AddSupplierBase(info);
                basicbll = null;

                if (info.Id < 1)
                {
                    return(-1);
                }

                dalResult = dal.InsertHotelPertain(info);
                if (!dalResult)
                {
                    return(-2);
                }

                dalResult = dal.InsertRoomTypes(info.Id, info.RoomTypes);
                if (!dalResult)
                {
                    return(-3);
                }

                AddTran.Complete();
            }

            return(1);
        }
Beispiel #2
0
        /// <summary>
        /// 更新餐馆供应商信息,正值时成功,负值或0时失败
        /// </summary>
        /// <param name="info">餐馆供应商信息业务实体</param>
        /// <returns>正值:成功 负值或0:失败</returns>
        public int UpdateRestaurantInfo(EyouSoft.Model.SupplierStructure.SupplierRestaurantInfo info)
        {
            if (info.Id < 1)
            {
                return(0);
            }

            using (TransactionScope AddTran = new TransactionScope())
            {
                bool dalResult = false;
                EyouSoft.BLL.CompanyStructure.SupplierBaseHandle basicbll = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle();
                int updateBasicinfoResult = basicbll.UpdateSupplierBase(info);
                basicbll = null;

                if (updateBasicinfoResult != 1)
                {
                    return(-1);
                }

                dalResult = dal.UpdateRestaurantPertain(info);
                if (!dalResult)
                {
                    return(-2);
                }

                AddTran.Complete();
            }

            return(1);
        }
Beispiel #3
0
        /// <summary>
        /// 获取酒店供应商信息业务实体
        /// </summary>
        /// <param name="supplierId">供应商编号</param>
        /// <returns></returns>
        public EyouSoft.Model.SupplierStructure.SupplierHotelInfo GetHotelInfo(int supplierId)
        {
            if (supplierId < 1)
            {
                return(null);
            }

            EyouSoft.Model.SupplierStructure.SupplierHotelInfo info      = dal.GetHotelPertainInfo(supplierId);
            EyouSoft.BLL.CompanyStructure.SupplierBaseHandle   basicbll  = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle();
            EyouSoft.Model.CompanyStructure.SupplierBasic      basicinfo = basicbll.GetSupplierBase(supplierId);
            basicbll = null;

            if (basicinfo != null && info != null)
            {
                info.CityId          = basicinfo.CityId;
                info.CityName        = basicinfo.CityName;
                info.CompanyId       = basicinfo.CompanyId;
                info.Id              = basicinfo.Id;
                info.IsDelete        = basicinfo.IsDelete;
                info.IssueTime       = basicinfo.IssueTime;
                info.OperatorId      = basicinfo.OperatorId;
                info.ProvinceId      = basicinfo.ProvinceId;
                info.ProvinceName    = basicinfo.ProvinceName;
                info.Remark          = basicinfo.Remark;
                info.SupplierContact = basicinfo.SupplierContact;
                info.SupplierPic     = basicinfo.SupplierPic;
                info.SupplierType    = basicinfo.SupplierType;
                info.TradeNum        = basicinfo.TradeNum;
                info.UnitAddress     = basicinfo.UnitAddress;
                info.UnitName        = basicinfo.UnitName;

                return(info);
            }

            return(null);
        }
Beispiel #4
0
        protected void GetSingleServer(string Tourid, string planId)
        {
            EyouSoft.BLL.TourStructure.Tour             tourBll   = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo);
            EyouSoft.Model.TourStructure.TourSingleInfo EditModel = null;
            EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(Tourid);
            if (EditModel != null)
            {
                //计划人数
                this.PelpeoNumber.Value = EditModel.PlanPeopleNumber.ToString();
                //确认时间
                this.ConfirmDate.Value = System.DateTime.Now.ToString("yyyy-MM-dd");
                //供应商信息集合
                IList <EyouSoft.Model.TourStructure.PlanSingleInfo> planlist = EditModel.Plans;

                if (planId != "")
                {
                    EyouSoft.Model.TourStructure.PlanSingleInfo singleModel = new EyouSoft.BLL.TourStructure.Tour().GetSinglePlanInfo(planId);
                    if (singleModel != null)
                    {
                        //获取供应商信息--供应商名称
                        this.txtTo.Value = singleModel.SupplierName;
                        //获取供应商信息--供应商Id
                        int supplierid = singleModel.SupplierId;
                        //实例化供应商基础信息BLL
                        EyouSoft.BLL.CompanyStructure.SupplierBaseHandle csBLL = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle();
                        //实例化供应商基础信息Model
                        EyouSoft.Model.CompanyStructure.SupplierBasic model = new EyouSoft.Model.CompanyStructure.SupplierBasic();
                        //根据供应商基础信息ID获取供应商实体
                        model = csBLL.GetSupplierBase(supplierid);
                        //供应商基础信息不为空并且联系人不为空
                        if (model != null && model.SupplierContact != null)
                        {
                            //供应商 联系人电话
                            this.txtTel.Value = model.SupplierContact[0].ContactTel;
                            //供应商联系人Fax
                            this.txtFax.Value = model.SupplierContact[0].ContactFax;
                        }


                        this.lblServiceType.Text  = "<strong>服务类别:</strong>" + singleModel.ServiceType.ToString();
                        this.lblSupplierName.Text = "<strong>供应商:</strong>" + singleModel.SupplierName;
                        this.lblArrange.Text      = "<strong>具体安排:</strong>" + singleModel.Arrange;
                    }
                    else
                    {
                        this.pnlIsShow.Visible       = false;
                        this.Repeaterlist.DataSource = planlist;
                        this.Repeaterlist.DataBind();
                    }
                }
                else
                {
                    //客户单位名称
                    this.txtTo.Value = EditModel.BuyerCName;
                    EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(EditModel.BuyerCId);
                    if (cusModel != null)
                    {
                        //组团 联系人电话
                        this.txtTel.Value = cusModel.Phone;
                        //组团联系人Fax
                        this.txtFax.Value = cusModel.Fax;
                    }
                    this.pnlIsShow.Visible       = false;
                    this.Repeaterlist.DataSource = planlist;
                    this.Repeaterlist.DataBind();
                }



                #region 专线
                EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(EditModel.OperatorId);
                if (userInfoModel != null)
                {
                    //主要联系人电话
                    this.txtTelS.Value = userInfoModel.ContactTel;
                    //专线FAX
                    this.txtFaxS.Value = userInfoModel.ContactFax;

                    EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(EditModel.CompanyId, SiteUserInfo.SysId);
                    if (companyModel != null)
                    {
                        this.txtFr.Value = companyModel.CompanyName;
                    }
                }
                #endregion


                //游客信息
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customer = EditModel.Customers.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                ;
                if (customer.Count > 0 && customer != null)
                {
                    this.repCustomer.DataSource = customer;
                    this.repCustomer.DataBind();
                }
            }
        }