예제 #1
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            string    msg   = string.Empty;
            MRegister model = new MRegister();

            switch (Utils.GetQueryStringValue("doType"))
            {
            case "Add":
                if (GetVal(model, ref msg))
                {
                    var intRtn = new BFinance().AddRegister(model);
                    switch (intRtn)
                    {
                    case 0:
                        AjaxResponse(UtilsCommons.AjaxReturnJson("0", "添加失败!"));
                        break;

                    case -1:
                        AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "超额付款!"));
                        break;

                    default:
                        AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
                        break;
                    }
                    //AjaxResponse(UtilsCommons.AjaxReturnJson(new BFinance().AddRegister(model) > 0 ? "1" : "-1", "添加失败!"));
                }
                else
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", msg));
                }

                break;

            case "Updata":
                if (GetVal(model, ref msg))
                {
                    var intRtn = new BFinance().UpdRegister(model);
                    switch (intRtn)
                    {
                    case 0:
                        AjaxResponse(UtilsCommons.AjaxReturnJson("0", "添加失败!"));
                        break;

                    case -1:
                        AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "超额付款!"));
                        break;

                    default:
                        AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
                        break;
                    }
                    //AjaxResponse(UtilsCommons.AjaxReturnJson(new BFinance().UpdRegister(model) ? "1" : "-1", "修改失败!"));
                }
                else
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", msg));
                }
                break;

            case "Delete":
                AjaxResponse(UtilsCommons.AjaxReturnJson(new BFinance().DelRegister(CurrentUserCompanyID, Utils.GetInt(Utils.GetFormValue("registerId"))) ? "1" : "-1", "删除失败!"));
                break;
            }


            AjaxResponse(UtilsCommons.AjaxReturnJson("-1"));
        }
예제 #2
0
        protected string PageSave(string name, string guideid)
        {
            string msg         = string.Empty;
            string seterrorMsg = string.Empty;

            #region 表单赋值
            //线路名称
            string routename = Utils.GetFormValue(LineSelect1.LineNameClient);
            //导游姓名
            string guidName = Utils.GetFormValue(this.GuidControl1.GuidNameClient);
            //电话
            string tel = Utils.GetFormValue(this.txttel.UniqueID);
            //出团时间
            string StartTime = Utils.GetFormValue(this.txtDate_Start.UniqueID);
            //接待行程
            string treval = Utils.GetFormValue(this.txttravel.UniqueID);
            //返回时间
            string endTime = Utils.GetFormValue(this.txtDate_End.UniqueID);
            //上团地点
            string StartAddress = Utils.GetFormValue(this.txtStartAddress.UniqueID);
            //任务类型
            string guidJobType = Utils.GetFormValue("seleJobType");
            //下团地点
            string EndAddress = Utils.GetFormValue(this.txtEndAddress.UniqueID);
            //费用明细
            string CostDesc = Utils.GetFormValue(this.txtCostDesc.UniqueID);
            //备注
            string remark = Utils.GetFormValue(this.txtrmark.UniqueID);
            //服务标准
            string Service = Utils.GetFormValue(this.txtService.UniqueID);
            //结算费用
            string PaidCost = Utils.GetFormValue(this.txtPaidCost.UniqueID);
            //团号
            string TourCode = Utils.GetFormValue(this.txtTourCode.UniqueID);

            #endregion
            #region 后台验证
            if (string.IsNullOrEmpty(guidName))
            {
                msg += "请选择导游!<br/>";
            }
            if (string.IsNullOrEmpty(StartAddress))
            {
                msg += "请输入上团地点!<br/>";
            }
            if (string.IsNullOrEmpty(StartTime.ToString()))
            {
                msg += "请选择上团时间!<br/>";
            }
            if (string.IsNullOrEmpty(EndAddress))
            {
                msg += "请输入下团地点!<br/>";
            }
            if (string.IsNullOrEmpty(endTime.ToString()))
            {
                msg += "请选择下团时间!<br/>";
            }
            if (string.IsNullOrEmpty(guidJobType))
            {
                msg += "请选择导游任务类型!<br/>";
            }
            if (Utils.GetDecimal(PaidCost) <= 0)
            {
                msg += "请填写结算费用!<br/>";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                return(UtilsCommons.AjaxReturnJson("0", "" + msg + ""));
            }
            #endregion

            #region 实体赋值
            EyouSoft.Model.PlanStructure.MPlanBaseInfo baseInfo = new EyouSoft.Model.PlanStructure.MPlanBaseInfo();
            baseInfo.AddStatus    = EyouSoft.Model.EnumType.PlanStructure.PlanAddStatus.计调安排时添加;
            baseInfo.CompanyId    = this.SiteUserInfo.CompanyId;
            baseInfo.Confirmation = Utils.GetDecimal(PaidCost);
            baseInfo.ContactPhone = tel;
            baseInfo.CostDetail   = CostDesc;
            baseInfo.IssueTime    = System.DateTime.Now;
            TimeSpan ts1 = new TimeSpan(Utils.GetDateTime(endTime).Ticks);
            TimeSpan ts2 = new TimeSpan(Utils.GetDateTime(StartTime).Ticks);
            baseInfo.Num       = ts1.Subtract(ts2).Duration().Days;
            baseInfo.PlanGuide = new EyouSoft.Model.PlanStructure.MPlanGuide();
            baseInfo.PlanGuide.NextLocation = EndAddress;
            baseInfo.PlanGuide.OnLocation   = StartAddress;
            baseInfo.PlanGuide.TaskType     = (EyouSoft.Model.EnumType.PlanStructure.PlanGuideTaskType)Enum.Parse(typeof(EyouSoft.Model.EnumType.PlanStructure.PlanGuideTaskType), guidJobType);
            baseInfo.SourceId        = guideid;
            baseInfo.SourceName      = guidName;
            baseInfo.TourId          = Utils.GetFormValue("hidTourID");
            baseInfo.ReceiveJourney  = treval;
            baseInfo.Remarks         = remark;
            baseInfo.ServiceStandard = Service;
            baseInfo.StartDate       = Utils.GetDateTimeNullable(StartTime);
            baseInfo.EndDate         = Utils.GetDateTimeNullable(endTime);
            baseInfo.Type            = EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游;
            baseInfo.OperatorId      = this.SiteUserInfo.UserId;
            baseInfo.OperatorName    = this.SiteUserInfo.Name;
            baseInfo.DeptId          = this.SiteUserInfo.DeptId;
            baseInfo.Status          = (EyouSoft.Model.EnumType.PlanStructure.PlanState)Utils.GetInt(Utils.GetFormValue(this.ddlState.UniqueID));
            #endregion

            #region 提交操作

            if (new EyouSoft.BLL.PlanStructure.BPlan().AddPlan(baseInfo) > 0)
            {
                msg        += "保存成功!";
                seterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
            }
            else
            {
                msg        += "保存失败!";
                seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
            }

            #endregion
            return(seterrorMsg);
        }
예제 #3
0
        /// <summary>
        /// 保存按钮点击事件执行方法
        /// </summary>
        protected string PageSave()
        {
            #region 表单赋值
            string setsrrorMsg = string.Empty;
            string msg         = string.Empty;
            //酒店名称
            string hotelName = Utils.GetFormValue(this.supplierControl1.ClientText);
            //酒店id
            string hotelId = Utils.GetFormValue(this.supplierControl1.ClientValue);
            //星级
            string hotelStart = Utils.GetFormValue(this.ddlHotelStart.UniqueID);
            //联系人 联系电话 联系传真
            string contectName  = Utils.GetFormValue(this.txtContectName.UniqueID);
            string contectPhone = Utils.GetFormValue(this.txtContectPhone.UniqueID);
            string contectFax   = Utils.GetFormValue(this.txtContectFax.UniqueID);
            //入住时间 离店时间 天数
            DateTime?startTime = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtStartTime.UniqueID));
            DateTime?endTime   = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtEndTime.UniqueID));
            string   days      = Utils.GetFormValue(this.txtroomDays.UniqueID);
            //房型 单价 计算方式 数量 小计
            string[] roomType        = Utils.GetFormValues("ddlRoomType");
            string[] unitPirces      = Utils.GetFormValues("txtunitPrice");
            string[] selectType      = Utils.GetFormValues("select");
            string[] numbers         = Utils.GetFormValues("txtRoomNumber");
            string[] roomItemDays    = Utils.GetFormValues("txtRoomItemDays");
            string[] TotalMoney      = Utils.GetFormValues("txtTotalMoney");
            string[] txtCheckInDate  = Utils.GetFormValues("txtCheckInDate");
            string[] txtCheckOutDate = Utils.GetFormValues("txtCheckOutDate");

            //付房数量 免房数量
            string payRoomNum = Utils.GetFormValue(this.txtPayRoomNumbers.UniqueID);
            string FreRoomNum = Utils.GetFormValue(this.txtFreRoomNumber.UniqueID);
            //是否含早
            string ContainsEarly = Utils.GetFormValue(this.ddlContainsEarly.UniqueID);
            //早餐费用 单价 人数 次数
            decimal unitPricesEarly  = Utils.GetDecimal(Utils.GetFormValue(this.txtunitPricesEarly.UniqueID));
            string  earlyPeopleNum   = Utils.GetFormValue(this.txtPeopleNumEarly.UniqueID);
            string  sequenceNumEarly = Utils.GetFormValue(this.txtsequenceNumEarly.UniqueID);
            //结算费用 费用明细
            decimal totalMoney  = Utils.GetDecimal(Utils.GetFormValue(this.txtTotalPrices.UniqueID));
            string  CostParticu = Utils.GetFormValue(this.txtCostParticu.UniqueID);

            //导游须知 其它备注
            string guidNotes  = Utils.GetFormValue(this.txtGuidNotes.UniqueID);
            string otherMarks = Utils.GetFormValue(this.txtOtherRemark.UniqueID);
            //返利 状态
            bool profit = Utils.GetFormValue(this.Selprofit1.UniqueID) == "0" ? true : false;
            #endregion

            #region 后台验证
            if (string.IsNullOrEmpty(hotelName) && string.IsNullOrEmpty(hotelId))
            {
                msg += "请选择酒店名称!<br/>";
            }
            if (string.IsNullOrEmpty(startTime.ToString()))
            {
                msg += "请填写入住时间!<br/>";
            }
            if (string.IsNullOrEmpty(endTime.ToString()))
            {
                msg += "请填写离店时间!<br/>";
            }
            if (string.IsNullOrEmpty(days))
            {
                msg += "请填写入住天数!<br/>";
            }

            if (roomType.Length > 0)
            {
                for (int i = 0; i < roomType.Length; i++)
                {
                    if (string.IsNullOrEmpty(roomType[i]))
                    {
                        msg += "第" + (i + 1) + "行请选择房型!<br/>";
                    }
                }
            }

            if (unitPirces.Length > 0)
            {
                for (int i = 0; i < unitPirces.Length; i++)
                {
                    if (string.IsNullOrEmpty(unitPirces[i]))
                    {
                        msg += "第" + (i + 1) + "行请输入单价!<br/>";
                    }
                }
            }
            if (numbers.Length > 0)
            {
                for (int i = 0; i < numbers.Length; i++)
                {
                    if (string.IsNullOrEmpty(numbers[i]))
                    {
                        msg += "第" + (i + 1) + "行请输入数量!<br/>";
                    }
                }
            }
            string[] totalPrices = Utils.GetFormValues("txtTotalMoney");
            if (totalPrices.Length > 0)
            {
                for (int i = 0; i < totalPrices.Length; i++)
                {
                    if (string.IsNullOrEmpty(totalPrices[i]) && Utils.GetDecimal(totalPrices[i]) <= 0)
                    {
                        msg += "第" + totalPrices[i] + "行请输入小计费用!<br/>";
                    }
                }
            }

            if (string.IsNullOrEmpty(ContainsEarly))
            {
                msg += "请选择是否含早餐!<br/>";
            }

            if (totalMoney <= 0)
            {
                msg += "请填写结算费用!<br/>";
            }

            if (profit.ToString() == "-1")
            {
                msg += "请选择是否返利!<br/>";
            }
            string status = Utils.GetFormValue("SelStatus");
            if (string.IsNullOrEmpty(status))
            {
                msg += "请选择状态!<br/>";
            }
            if (string.IsNullOrEmpty(Utils.GetFormValue("SelPanyMent")))
            {
                msg += "请选择支付方式!<br/>";
            }
            if (msg != "")
            {
                setsrrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                return(setsrrorMsg);
            }
            #endregion

            #region 实体赋值
            EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.Model.PlanStructure.MPlanBaseInfo();
            baseinfo.AddStatus                   = EyouSoft.Model.EnumType.PlanStructure.PlanAddStatus.计调安排时添加;
            baseinfo.CompanyId                   = this.SiteUserInfo.CompanyId;
            baseinfo.Confirmation                = totalMoney;
            baseinfo.PlanCost                    = totalMoney;
            baseinfo.ContactFax                  = contectFax;
            baseinfo.ContactName                 = contectName;
            baseinfo.ContactPhone                = contectPhone;
            baseinfo.EndDate                     = endTime;
            baseinfo.GuideNotes                  = guidNotes;
            baseinfo.IsRebate                    = profit;
            baseinfo.IssueTime                   = System.DateTime.Now;
            baseinfo.Num                         = Utils.GetInt(payRoomNum);
            baseinfo.PaymentType                 = (EyouSoft.Model.EnumType.PlanStructure.Payment)Utils.GetInt(Utils.GetFormValue("SelPanyMent"));
            baseinfo.PlanHotel                   = new EyouSoft.Model.PlanStructure.MPlanHotel();
            baseinfo.PlanHotel.Days              = Utils.GetInt(days);
            baseinfo.PlanHotel.FreeNumber        = Utils.GetInt(FreRoomNum);
            baseinfo.PlanHotel.IsMeal            = (EyouSoft.Model.EnumType.PlanStructure.PlanHotelIsMeal)Enum.Parse(typeof(EyouSoft.Model.EnumType.PlanStructure.PlanHotelIsMeal), ContainsEarly);
            baseinfo.PlanHotel.MealFrequency     = Utils.GetInt(sequenceNumEarly);
            baseinfo.PlanHotel.MealNumber        = Utils.GetInt(earlyPeopleNum);
            baseinfo.PlanHotel.MealPrice         = unitPricesEarly;
            baseinfo.PlanHotel.Star              = (EyouSoft.Model.EnumType.SourceStructure.HotelStar)Enum.Parse(typeof(EyouSoft.Model.EnumType.SourceStructure.HotelStar), hotelStart);
            baseinfo.PlanHotel.QianTaiTelephone  = Utils.GetFormValue(txtQianTaiTelephone.UniqueID);
            baseinfo.PlanHotel.PlanHotelRoomList = new List <EyouSoft.Model.PlanStructure.MPlanHotelRoom>();
            for (int i = 0; i < roomType.Length; i++)
            {
                var roomHotel = new EyouSoft.Model.PlanStructure.MPlanHotelRoom();

                roomHotel.RoomType     = roomType[i].Split(',')[1];
                roomHotel.RoomId       = roomType[i].Split(',')[0];
                roomHotel.UnitPrice    = Utils.GetDecimal(unitPirces[i]);
                roomHotel.Days         = Utils.GetInt(roomItemDays[i]);
                roomHotel.PriceType    = (EyouSoft.Model.EnumType.PlanStructure.PlanHotelPriceType)Enum.Parse(typeof(EyouSoft.Model.EnumType.PlanStructure.PlanHotelPriceType), selectType[i]);
                roomHotel.Quantity     = Utils.GetInt(numbers[i]);
                roomHotel.Total        = Utils.GetDecimal(TotalMoney[i]);
                roomHotel.CheckInDate  = Utils.GetDateTimeNullable(txtCheckInDate[i]);
                roomHotel.CheckOutDate = Utils.GetDateTimeNullable(txtCheckOutDate[i]);

                baseinfo.PlanHotel.PlanHotelRoomList.Add(roomHotel);
            }
            baseinfo.Remarks    = otherMarks;
            baseinfo.SourceId   = hotelId;
            baseinfo.SourceName = hotelName;
            baseinfo.StartDate  = startTime;
            baseinfo.Status     = (EyouSoft.Model.EnumType.PlanStructure.PlanState)Utils.GetInt(Utils.GetFormValue("SelStatus"));
            if (Utils.GetFormValue(this.supplierControl1.ClientIsyukong) == "1")
            {
                baseinfo.SueId = Utils.GetFormValue(this.supplierControl1.ClientzyykValue);
            }
            baseinfo.TourId       = Utils.GetQueryStringValue("tourId");
            baseinfo.Type         = EyouSoft.Model.EnumType.PlanStructure.PlanProject.酒店;
            baseinfo.OperatorId   = this.SiteUserInfo.UserId;
            baseinfo.OperatorName = this.SiteUserInfo.Name;
            baseinfo.CostDetail   = CostParticu;
            #endregion

            #region 提交操作
            //酒店id
            string planID = Utils.GetQueryStringValue("planId");
            int    result = 0;
            EyouSoft.BLL.PlanStructure.BPlan bll = new EyouSoft.BLL.PlanStructure.BPlan();
            if (planID != null && planID != "")
            {
                baseinfo.PlanId           = planID;
                baseinfo.PlanHotel.PlanId = planID;
                result = bll.UpdPlan(baseinfo);
                if (result == 1)
                {
                    msg        += "修改成功!";
                    setsrrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
                }
                else if (result == 0)
                {
                    msg        += "修改失败!";
                    setsrrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
                else if (result == -2)
                {
                    msg        += "预控数量不足,修改失败!";
                    setsrrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
            }
            else
            {
                result = bll.AddPlan(baseinfo);
                if (result == 1)
                {
                    msg        += "添加成功!";
                    setsrrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
                }
                else if (result == 0)
                {
                    msg        += "添加失败!";
                    setsrrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
                else if (result == -2)
                {
                    msg        += "预控数量不足,添加失败!";
                    setsrrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
            }

            #endregion

            return(setsrrorMsg);
        }
예제 #4
0
        /// <summary>
        /// 获取表单信息
        /// </summary>
        /// <returns></returns>
        MPlanBaseInfo GetFormInfo()
        {
            var    anPaiLeiXing = (PlanProject?)Utils.GetEnumValueNull(typeof(PlanProject), Utils.GetFormValue("type"));
            string tourId       = Utils.GetFormValue("TourID");
            var    uinfo        = EyouSoft.Security.Membership.UserProvider.GetUserInfo();

            if (!anPaiLeiXing.HasValue)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("-1"));
            }
            if (string.IsNullOrEmpty(tourId))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("-1"));
            }

            MPlanBaseInfo info = null;

            if (!string.IsNullOrEmpty(AnPaiId))
            {
                info = new BPlan().GetModel(PlanProject.导游, AnPaiId);
            }
            if (info == null)
            {
                info = new MPlanBaseInfo();
            }

            info.CompanyId    = uinfo.CompanyId;
            info.DeptId       = uinfo.DeptId;
            info.OperatorId   = uinfo.UserId;
            info.OperatorName = uinfo.Name;
            info.Confirmation = Utils.GetDecimal(Utils.GetFormValue("txt_confirmation"));
            info.CostDetail   = Utils.GetFormValue("txt_costDetail").Trim();
            info.IssueTime    = DateTime.Now;
            info.Num          = Utils.GetInt(Utils.GetFormValue("txt_num"));
            info.DNum         = Utils.GetDecimal(Utils.GetFormValue("txt_num"));
            info.PaymentType  = (Payment)Utils.GetInt(Utils.GetFormValue("sel_payment"));
            info.ContactName  = Utils.GetFormValue("ContactName");
            info.ContactPhone = Utils.GetFormValue("ContactPhone");
            info.SourceName   = Utils.GetFormValue("txt_sourceName").Trim();
            info.SourceId     = Utils.GetFormValue("hd_sourceId");
            info.TourId       = tourId;
            info.Type         = anPaiLeiXing.Value;
            info.Status       = PlanState.已落实;
            switch (info.Type)
            {
            case PlanProject.领料:
                info.SourceName          = Utils.GetFormValue("txt_sourceName");
                info.ContactName         = Utils.GetFormValue("txt_contactName");
                info.PlanGood            = new EyouSoft.Model.GovStructure.MGovGoodUse();
                info.PlanGood.GoodId     = info.SourceId;
                info.PlanGood.CompanyId  = info.CompanyId;
                info.PlanGood.DeptId     = info.DeptId;
                info.PlanGood.GoodName   = Utils.GetFormValue("txt_sourceName");
                info.PlanGood.IssueTime  = DateTime.Now;
                info.PlanGood.Number     = info.Num;
                info.PlanGood.Operator   = info.OperatorName;
                info.PlanGood.OperatorId = info.OperatorId;
                info.PlanGood.PlanId     = info.PlanId;
                info.PlanGood.Price      = Utils.GetDecimal(info.CostDetail);
                info.PlanGood.UserId     = Utils.GetFormValue("txt_UserId");
                info.PlanGood.UserName   = Utils.GetFormValue("txt_contactName");
                break;

            case PlanProject.火车:
                info.PlanLargeTime = new List <MPlanLargeTime>();
                var item = new MPlanLargeTime();
                item.PlanId     = info.PlanId;
                item.PayNumber  = info.Num;
                item.FreeNumber = Utils.GetInt(Utils.GetFormValue("txt_freeNumber"));
                info.PlanLargeTime.Add(item);
                break;

            case PlanProject.景点:
                info.PlanAttractions             = new MPlanAttractions();
                info.PlanAttractions.PlanId      = info.PlanId;
                info.PlanAttractions.AdultNumber = Utils.GetInt(Utils.GetFormValue("txt_adultNumber"));
                info.PlanAttractions.ChildNumber = Utils.GetInt(Utils.GetFormValue("txt_childNumber"));
                break;

            case PlanProject.涉外游轮:
            case PlanProject.国内游轮:
                info.PlanShip                   = new MPlanShip();
                info.PlanShip.PlanId            = info.PlanId;
                info.PlanShip.PlanShipPriceList = new List <MPlanShipPrice>();
                var item1 = new MPlanShipPrice();
                item1.PlanId      = info.PlanId;
                item1.DNum        = Utils.GetDecimal(Utils.GetFormValue("txt_adultNumber"));
                item1.AdultNumber = Utils.GetInt(Utils.GetFormValue("txt_adultNumber"));
                item1.AdultNumber = Convert.ToInt32(item1.DNum);
                item1.ChildNumber = Utils.GetInt(Utils.GetFormValue("txt_childNumber"));
                info.PlanShip.PlanShipPriceList.Add(item1);
                info.Num = Convert.ToInt32(info.DNum);
                break;

            case PlanProject.酒店:
                info.PlanHotel            = new MPlanHotel();
                info.PlanHotel.PlanId     = info.PlanId;
                info.PlanHotel.FreeNumber = Utils.GetInt(Utils.GetFormValue("txt_freeNumber"));
                break;
            }

            return(info);
        }
예제 #5
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        void PageSave()
        {
            #region 表单赋值
            string msgArr      = string.Empty;
            string SeterrorMsg = string.Empty;
            //地接社id
            string AyencyNameid = Utils.GetFormValue(this.supplierControl1.ClientValue);
            //地接社名称
            string AyencyName = Utils.GetFormValue(this.supplierControl1.ClientText);
            //联系人
            string contectName = Utils.GetFormValue(this.txtContentName.UniqueID);
            //联系电话
            string contectPhone = Utils.GetFormValue(this.txtContentPhone.UniqueID);
            //联系传真
            string contectFax = Utils.GetFormValue(this.txtContentFax.UniqueID);
            //接待行程
            string Travel = Utils.GetFormValue(this.txtTravel.UniqueID);
            //服务标准
            string ServerStand = Utils.GetFormValue(this.txtServerStand.UniqueID);
            //游客信息
            string CustomerInfo = Utils.GetFormValue(this.txtCustomer.UniqueID);
            //人数
            string peopleNumber = Utils.GetFormValue(this.txtPeopleNumber.UniqueID);
            //费用明细
            string CostParticu = Utils.GetFormValue(this.txtCostParticu.UniqueID);
            //结算费用
            decimal CostAccount = Utils.GetDecimal(Utils.GetFormValue(this.txtCostAccount.UniqueID));
            //接团日期
            DateTime?TourStarTime = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtStartTime.UniqueID));
            //送团日期
            DateTime TourEndTime = Utils.GetDateTime(Utils.GetFormValue(this.txtEndTime.UniqueID));
            //导游需知
            string guidNeet = Utils.GetFormValue("txtguidNotes");
            //其它备注
            string remark = Utils.GetFormValue(this.txtOtherRemark.UniqueID);
            #endregion

            #region 后台验证
            if (string.IsNullOrEmpty(AyencyName) && string.IsNullOrEmpty(AyencyNameid))
            {
                msgArr += "请选择地接社名称!<br/>";
            }
            if (CostAccount <= 0)
            {
                msgArr += "请填写结算费用!<br/>";
            }
            if (string.IsNullOrEmpty(TourStarTime.ToString()))
            {
                msgArr += "请选择接团日期!<br/>";
            }
            if (string.IsNullOrEmpty(TourEndTime.ToString()))
            {
                msgArr += "请选择送团日期!<br/>";
            }
            if (msgArr != "")
            {
                SeterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msgArr + "");

                RCWE(SeterrorMsg);
            }
            #endregion

            #region 实体赋值
            EyouSoft.Model.PlanStructure.MPlan Ayencymodel = new EyouSoft.Model.PlanStructure.MPlan();
            Ayencymodel.AddStatus       = EyouSoft.Model.EnumType.PlanStructure.PlanAddStatus.计调安排时添加;
            Ayencymodel.CompanyId       = this.SiteUserInfo.CompanyId;
            Ayencymodel.Confirmation    = CostAccount;
            Ayencymodel.PlanCost        = CostAccount;
            Ayencymodel.ContactFax      = contectFax;
            Ayencymodel.ContactName     = contectName;
            Ayencymodel.ContactPhone    = contectPhone;
            Ayencymodel.CostDetail      = CostParticu;
            Ayencymodel.CustomerInfo    = CustomerInfo;
            Ayencymodel.GuideNotes      = guidNeet;
            Ayencymodel.IsRebate        = Utils.GetFormValue(this.ddlProfit1.UniqueID) == "0" ? true : false;
            Ayencymodel.IssueTime       = System.DateTime.Now;
            Ayencymodel.Num             = Utils.GetInt(peopleNumber);
            Ayencymodel.PaymentType     = (Payment)Utils.GetInt(Utils.GetFormValue("panyMent"));
            Ayencymodel.ReceiveJourney  = Travel;
            Ayencymodel.Remarks         = remark;
            Ayencymodel.SourceId        = AyencyNameid;
            Ayencymodel.SourceName      = AyencyName;
            Ayencymodel.Status          = (PlanState)Utils.GetInt(Utils.GetFormValue("states"));
            Ayencymodel.TourId          = Utils.GetQueryStringValue("tourId");
            Ayencymodel.Type            = EyouSoft.Model.EnumType.PlanStructure.PlanProject.地接;
            Ayencymodel.ServiceStandard = ServerStand;
            Ayencymodel.StartDate       = TourStarTime;
            Ayencymodel.EndDate         = TourEndTime;
            Ayencymodel.SueId           = "";
            Ayencymodel.OperatorId      = this.SiteUserInfo.UserId;
            Ayencymodel.OperatorName    = this.SiteUserInfo.Name;
            Ayencymodel.DeptId          = this.SiteUserInfo.DeptId;
            #endregion

            #region 提交操作
            //地接id
            string editid = Utils.GetQueryStringValue("PlanID");
            //修改
            if (editid != "" && editid != null)
            {
                Ayencymodel.PlanId = editid;
                if (new EyouSoft.BLL.PlanStructure.BPlan().UpdPlan(Ayencymodel) > 0)
                {
                    msgArr     += "修改成功!";
                    SeterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msgArr + "");
                }
                else
                {
                    msgArr     += "修改失败!";
                    SeterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msgArr + "");
                }
            }
            else //添加
            {
                if (new EyouSoft.BLL.PlanStructure.BPlan().AddPlan(Ayencymodel) > 0)
                {
                    msgArr     += "添加成功!";
                    SeterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msgArr + "");
                }
                else
                {
                    msgArr     += "添加失败!";
                    SeterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msgArr + "");
                }
            }
            #endregion

            RCWE(SeterrorMsg);
        }
예제 #6
0
        /// <summary>
        /// 保存
        /// </summary>
        protected void PageSave(string doType)
        {
            #region 表单取值
            //会议编号
            string num = Utils.GetFormValue(txtNum.UniqueID);
            //会议类型
            string type = Utils.GetFormValue(selType.UniqueID);
            //会议主题
            string title = Utils.GetFormValue(txtTitle.UniqueID);
            //参会人员
            string people = Utils.GetFormValue(HrSelect1.HrSelectNameClient);
            //参会人员编号
            string peopleid = Utils.GetFormValue(HrSelect1.HrSelectIDClient);
            //开始时间
            string starttime = Utils.GetFormValue(txtStartTime.UniqueID);
            //结束时间
            string endtime = Utils.GetFormValue(txtEndTime.UniqueID);
            //会议地点
            string place = Utils.GetFormValue(txtPlace.UniqueID);
            //会议纪要
            string content = Utils.GetFormValue(txtContent.UniqueID);
            //主键编号
            string hidid = Utils.GetFormValue(hidId.UniqueID);
            #endregion

            #region 表单验证
            string msg    = "";
            bool   result = false;
            Response.Clear();
            if (string.IsNullOrEmpty(num))
            {
                msg += "-请输入会议编号!<br/>";
            }
            if (string.IsNullOrEmpty(title))
            {
                msg += "-请输入会议主题!<br/>";
            }
            if (string.IsNullOrEmpty(type))
            {
                msg += "-请选择会议类型!<br/>";
            }
            if (string.IsNullOrEmpty(place))
            {
                msg += "-请输入会议地点!<br/>";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                result = false;
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
                return;
            }
            #endregion

            #region 实体赋值
            MGovMeeting Model = new MGovMeeting();
            Model.Category         = (Category)Utils.GetInt(type);
            Model.CompanyID        = this.SiteUserInfo.CompanyId;
            Model.EndTime          = Utils.GetDateTime(endtime);
            Model.IssueTime        = DateTime.Now;
            Model.MeetingStaff     = people;
            Model.Minutes          = content;
            Model.Number           = num;
            Model.OperatorId       = this.SiteUserInfo.UserId;
            Model.StartTime        = Utils.GetDateTime(starttime);
            Model.Theme            = title;
            Model.Venue            = place;
            Model.MGovMeetingStaff = GetMeetingStaff(people, peopleid, hidid);
            Model.MeetingId        = hidid;
            #endregion

            #region 提交回应
            BMeeting BLL = new BMeeting();
            if (doType == "add")
            {
                result = BLL.AddGovMeeting(Model);
                msg    = result ? "添加成功!" : "添加失败!";
            }
            if (doType == "update")
            {
                result = BLL.UpdateGovMeeting(Model);
                msg    = result ? "修改成功!" : "修改失败!";
            }
            Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
            Response.End();
            #endregion
        }
예제 #7
0
        protected void pageSave(string doType)
        {
            string id    = Utils.GetQueryStringValue("id");
            var    model = new Eyousoft_yhq.Model.Product();

            #region 实体赋值

            model.ProductName = Utils.GetFormValue(txtproductName.UniqueID);
            model.ProductType = 0;
            model.TourDate    = Utils.GetDateTimeNullable(Utils.GetFormValue(txtsendDate.UniqueID));
            model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue(txtmarkPrice.UniqueID));
            model.AppPrice    = Utils.GetDecimal(Utils.GetFormValue(txtappPrice.UniqueID));
            //model.FavourCode = Utils.GetFormValue(txtcoupons.UniqueID);
            model.FavourCode    = Utils.GetFormValue(txtWXcode.UniqueID);
            model.LinkTel       = Utils.GetFormValue(txttel.UniqueID);
            model.ProductDis    = Utils.GetFormValue(txtdescript.UniqueID);
            model.TourDis       = Utils.GetFormValue(txtStation.UniqueID);
            model.SendTourKnow  = Utils.GetFormValue(txtjoury.UniqueID);
            model.ValidiDate    = Utils.GetDateTime(Utils.GetFormValue(txtValidate.UniqueID));
            model.ProductState  = 0;
            model.AttachList    = NewGetAttach();
            model.IsEveryDay    = false;
            model.IsHot         = 0;
            model.ServiceQQ     = Utils.GetFormValue(txtkfqq.UniqueID);
            model.ContractType  = Model.ContractType.车票;
            model.ControlPeople = Utils.GetInt(Utils.GetFormValue(txtPeopleNum.UniqueID));


            model.ProductSdate   = Utils.GetDateTime(Utils.GetFormValue(txtsendsDate.UniqueID));
            model.ProductOpState = (Model.ProductOp)Utils.GetInt(Utils.GetFormValue(ddl_proType.UniqueID));
            model.ZCodeViaDate   = Utils.GetDateTime(Utils.GetFormValue(txtZxingdate.UniqueID));
            model.PType          = 2;
            #endregion

            cn.myvo.smc.Service sms = new cn.myvo.smc.Service();
            string IsContact        = sms.IsIncludeKeyWord(model.ProductName);

            #region 提交保存
            bool   result = false;
            string msg    = "";

            if (string.IsNullOrEmpty(IsContact))
            {
                Response.Clear();
                Eyousoft_yhq.BLL.Product BLL = new Eyousoft_yhq.BLL.Product();
                if (doType == "add")
                {
                    result = BLL.Add(model);
                    msg    = result ? "添加成功!" : "添加失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                else
                {
                    model.ProductID = id;
                    result          = BLL.Update(model);
                    msg             = result ? "修改成功!" : "修改失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                Response.End();
            }
            else
            {
                msg = "产品名称包含敏感字符[" + IsContact + "],请修改后再保存!";
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
            }
            #endregion
        }
예제 #8
0
 protected void Save()
 {
     EyouSoft.Model.ComStructure.MComUser model = new EyouSoft.Model.ComStructure.MComUser();
     //内部用户为string.Empty,客户单位或供应商就是相就的公司编号
     model.TourCompanyId = string.Empty;
     model.CompanyId     = SiteUserInfo.CompanyId;
     model.UserName      = txtUserName.Text;
     model.Password      = Utils.GetFormValue("txtPwd");
     model.ContactName   = Utils.GetFormValue(HrSelect1.HrSelectNameClient);
     model.GovFileId     = Utils.GetFormValue(HrSelect1.HrSelectIDClient);
     model.ContactSex    = Convert.ToChar(ddlSex.SelectedValue);
     model.DeptId        = Utils.GetInt(Utils.GetFormValue(BelongDepart.SelectIDClient));
     model.DeptIdJG      = Utils.GetInt(Utils.GetFormValue(ManageDepart.SelectIDClient));
     model.Arrears       = Utils.GetDecimal(txtDebt.Value);
     model.ContactTel    = txtPhone.Value;
     model.ContactFax    = txtFax.Value;
     model.ContactMobile = txtMobile.Value;
     model.QQ            = txtQQ.Value;
     model.MSN           = txtMSN.Value;
     model.ContactEmail  = txtEmail.Value;
     model.PeopProfile   = txtIntroduction.Text;
     model.Remark        = txtRemark.Text;
     model.RoleId        = Utils.GetInt(Utils.GetFormValue(ddlRoleList.ClientID));
     model.Operator      = SiteUserInfo.Name;
     model.OperatorId    = SiteUserInfo.UserId;
     model.OperDeptId    = SiteUserInfo.DeptId;
     //model.UserStatus = chkState.Checked;
     Response.Clear();
     if (string.IsNullOrEmpty(UserID))
     {
         model.UserType = EyouSoft.Model.EnumType.ComStructure.UserType.内部员工;
         if (!new EyouSoft.BLL.ComStructure.BComUser().IsExistsUserName(model.UserName, SiteUserInfo.CompanyId, string.Empty))
         {
             if (new EyouSoft.BLL.ComStructure.BComUser().Add(model))
             {
                 Response.Write(UtilsCommons.AjaxReturnJson("1", "添加成功!"));
             }
             else
             {
                 Response.Write(UtilsCommons.AjaxReturnJson("0", "添加失败!"));
             }
         }
         else
         {
             Response.Write(UtilsCommons.AjaxReturnJson("0", "用户名已存在!"));
         }
     }
     else
     {
         model.UserId = UserID;
         if (new EyouSoft.BLL.ComStructure.BComUser().Update(model))
         {
             Response.Write(UtilsCommons.AjaxReturnJson("1", "修改成功!"));
         }
         else
         {
             Response.Write(UtilsCommons.AjaxReturnJson("0", "修改失败!"));
         }
     }
     Response.End();
 }
예제 #9
0
 /// <summary>
 /// 保存
 /// </summary>
 private void Save()
 {
     string[] strList = Utils.GetFormValue("list").Split(',');
     if (strList != null && strList.Count() > 0)
     {
         List <MBill> ls = new List <MBill>();
         foreach (string item in strList)
         {
             string[] subData = item.Split('|');
             if (subData.Length == 11)
             {
                 ls.Add(new MBill
                 {
                     //系统公司编号
                     CompanyId = CurrentUserCompanyID,
                     BillTime  = DateTime.Now,
                     //操作时间
                     IssueTime  = DateTime.Now,
                     Dealer     = SiteUserInfo.Name,
                     DealerId   = SiteUserInfo.UserId,
                     Operator   = SiteUserInfo.Name,
                     OperatorId = SiteUserInfo.UserId,
                     //订单编号
                     OrderId = subData[0],
                     //开票单位编号
                     CustomerId = subData[1],
                     //开票单位编号
                     Customer = subData[2],
                     //销售员编号
                     SellerId = subData[3],
                     //备注
                     Remark = subData[4],
                     //开票金额
                     BillAmount   = Utils.GetDecimal(subData[5]),
                     SellerName   = subData[6],
                     TourCode     = subData[7],
                     TourId       = subData[8],
                     ContactName  = subData[9],
                     ContactPhone = subData[10]
                 });
             }
         }
         IList <MBill> retls = new BFinance().AddOrUpdBill(ls);
         if (retls == null || retls.Count <= 0)
         {
             AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
         }
         else
         {
             string strMsg = string.Empty;
             foreach (var item in retls)
             {
                 strMsg += item.OrderCode + "<br/>";
             }
             strMsg += "开票失败!";
             AjaxResponse(UtilsCommons.AjaxReturnJson("-1", strMsg));
         }
     }
     else
     {
         AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "无开票信息!"));
     }
 }
예제 #10
0
        /// <summary>
        /// 获取实体
        /// </summary>
        protected void GetModelSpot()
        {
            string planId = Utils.GetQueryStringValue("PlanId");

            //初始化修改信息
            if (!string.IsNullOrEmpty(planId))
            {
                EyouSoft.Model.PlanStructure.MPlanBaseInfo spotModel = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.景点, planId);
                if (spotModel != null)
                {
                    this.supplierControl1.HideID = spotModel.SourceId;
                    this.supplierControl1.Name   = spotModel.SourceName;
                    SourceID = spotModel.SourceId;
                    if (!string.IsNullOrEmpty(spotModel.SueId.Trim()))
                    {
                        this.supplierControl1.HideID_zyyk = spotModel.SueId;
                        this.supplierControl1.isyukong    = "1";
                        SueID = spotModel.SueId;
                        var sue = new EyouSoft.BLL.SourceStructure.BSourceControl().GetModelBySightId(spotModel.SueId, this.SiteUserInfo.CompanyId);
                        if (sue != null)
                        {
                            this.hidUserNum.Value = (sue.ControlNum - sue.AlreadyNum + spotModel.Num).ToString();
                        }
                    }
                    else
                    {
                        this.supplierControl1.isyukong = "0";
                    }

                    this.txtContectName.Text  = spotModel.ContactName;
                    this.txtContectPhone.Text = spotModel.ContactPhone;
                    this.txtContectFax.Text   = spotModel.ContactFax;
                    if (spotModel.PlanAttractions != null)
                    {
                        this.txtAdultNums.Text    = spotModel.PlanAttractions.AdultNumber.ToString();
                        this.txtChildrenNums.Text = spotModel.PlanAttractions.ChildNumber.ToString();
                        //景点名称
                        if (spotModel.SourceId != "")
                        {
                            EyouSoft.Model.SourceStructure.MSourceSpot model = new EyouSoft.BLL.SourceStructure.BSource().GetSpotModel(spotModel.SourceId);
                            if (model != null)
                            {
                                if (model.PriceSystemList != null && model.PriceSystemList.Count > 0)
                                {
                                    if (!string.IsNullOrEmpty(SueID))
                                    {
                                        model.PriceSystemList = model.PriceSystemList.Where(m => m.Id == spotModel.PlanAttractions.AttractionsId).ToList();
                                    }
                                    for (int i = 0; i < model.PriceSystemList.Count; i++)
                                    {
                                        if (spotModel.PlanAttractions.AttractionsId == model.PriceSystemList[i].Id)
                                        {
                                            SpotNameList.Append("<option selected=\"selected\" value='" + model.PriceSystemList[i].Id + "," + model.PriceSystemList[i].SpotName + "'>" + model.PriceSystemList[i].SpotName + "</option>");
                                        }
                                        else
                                        {
                                            SpotNameList.Append("<option value='" + model.PriceSystemList[i].Id + "," + model.PriceSystemList[i].SpotName + "'>" + model.PriceSystemList[i].SpotName + "</option>");
                                        }
                                    }
                                }
                            }
                        }
                    }
                    this.txtLookAbout1.Text  = UtilsCommons.GetDateString(spotModel.StartDate, ProviderToDate);
                    this.txtLookAbout2.Text  = UtilsCommons.GetDateString(spotModel.EndDate, ProviderToDate);
                    this.txtScanTime1.Text   = spotModel.StartTime;
                    this.txtScanTime2.Text   = spotModel.EndTime;
                    this.txtCostParticu.Text = spotModel.CostDetail;
                    this.txttotalMoney.Text  = Utils.FilterEndOfTheZeroDecimal(spotModel.Confirmation);
                    panyMent = ((int)spotModel.PaymentType).ToString();
                    this.txtGuidNotes.Text    = spotModel.GuideNotes;
                    this.txtOtherRemarks.Text = spotModel.Remarks;
                    this.ddlProfit1.Items.FindByValue(spotModel.IsRebate == true ? "0" : "1").Selected = true;
                    Status = ((int)spotModel.Status).ToString();
                }
            }
        }
예제 #11
0
        void PageSave()
        {
            #region 表单赋值
            string msg         = string.Empty;
            string seterrorMsg = string.Empty;
            //景点公司name id
            string spotComName = Utils.GetFormValue(this.supplierControl1.ClientText);
            string spotComID   = Utils.GetFormValue(this.supplierControl1.ClientValue);
            //联系人 电话 传真
            string contectName  = Utils.GetFormValue(this.txtContectName.UniqueID);
            string contectPhone = Utils.GetFormValue(this.txtContectPhone.UniqueID);
            string contectFax   = Utils.GetFormValue(this.txtContectFax.UniqueID);
            //景点名称 人数(成人 儿童)
            string spotName    = Utils.GetFormValue("spotList").Split(',')[1];
            string adultNum    = Utils.GetFormValue(this.txtAdultNums.UniqueID);
            string childrenNum = Utils.GetFormValue(this.txtChildrenNums.UniqueID);
            //游览时间
            DateTime?lookAbout1 = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtLookAbout1.UniqueID));
            string   scanTime1  = Utils.GetFormValue(this.txtScanTime1.UniqueID);
            DateTime?lookAbout2 = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtLookAbout2.UniqueID));
            string   scanTime2  = Utils.GetFormValue(this.txtScanTime2.UniqueID);
            //费用明细 结算费用
            string  CostParticu = Utils.GetFormValue(this.txtCostParticu.UniqueID);
            decimal totalMoney  = Utils.GetDecimal(Utils.GetFormValue(this.txttotalMoney.UniqueID));
            //导游需知 其它备注
            string guidNotes   = Utils.GetFormValue(this.txtGuidNotes.UniqueID);
            string otherRemark = Utils.GetFormValue(this.txtOtherRemarks.UniqueID);
            #endregion

            #region 后台验证
            if (string.IsNullOrEmpty(spotComID) && string.IsNullOrEmpty(spotComName))
            {
                msg += "请选择景点公司!<br/>";
            }
            if (string.IsNullOrEmpty(spotName))
            {
                msg += "请选择景点名称!<br/>";
            }
            if (string.IsNullOrEmpty(adultNum))
            {
                msg += "请输入成人数!<br/>";
            }
            if (!lookAbout1.HasValue)
            {
                msg += "请输入浏览开始时间!<br>";
            }

            /*if (string.IsNullOrEmpty(scanTime1.ToString()))
             * {
             *  msg += "请输入浏览时间!<br/>";
             * }*/
            /*if (string.IsNullOrEmpty(lookAbout2.ToString()))
             * {
             *  msg += "请输入浏览时间!<br/>";
             * }*/
            /*if (string.IsNullOrEmpty(scanTime2.ToString()))
             * {
             *  msg += "请输入浏览时间!<br/>";
             * }*/
            if (totalMoney <= 0)
            {
                msg += "请输入结算费用!<br/>";
            }
            if (string.IsNullOrEmpty(Utils.GetFormValue("SelStatus")))
            {
                msg += "请选择状态!<br/>";
            }
            if (string.IsNullOrEmpty(Utils.GetFormValue(this.ddlProfit1.UniqueID)))
            {
                msg += "请选择是否返利!<br/>";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                RCWE(seterrorMsg);
            }
            #endregion

            #region 实体赋值
            EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.Model.PlanStructure.MPlanBaseInfo();
            baseinfo.AddStatus    = EyouSoft.Model.EnumType.PlanStructure.PlanAddStatus.计调安排时添加;
            baseinfo.CompanyId    = SiteUserInfo.CompanyId;
            baseinfo.Confirmation = totalMoney;
            baseinfo.PlanCost     = totalMoney;
            baseinfo.ContactFax   = contectFax;
            baseinfo.ContactName  = contectName;
            baseinfo.ContactPhone = contectPhone;
            baseinfo.EndDate      = lookAbout2;
            baseinfo.EndTime      = scanTime2;
            baseinfo.GuideNotes   = guidNotes;
            baseinfo.IsRebate     = Utils.GetFormValue(this.ddlProfit1.UniqueID) == "0" ? true : false;
            baseinfo.IssueTime    = System.DateTime.Now;
            baseinfo.Num          = Utils.GetInt(adultNum) + Utils.GetInt(childrenNum);
            baseinfo.PaymentType  = (EyouSoft.Model.EnumType.PlanStructure.Payment)Utils.GetInt(Utils.GetFormValue("SelPanyMent"));
            baseinfo.Remarks      = otherRemark;
            baseinfo.SourceId     = spotComID;
            baseinfo.SourceName   = spotComName;
            baseinfo.StartDate    = lookAbout1;
            baseinfo.StartTime    = scanTime1;
            baseinfo.Status       = (EyouSoft.Model.EnumType.PlanStructure.PlanState)Utils.GetInt(Utils.GetFormValue("SelStatus"));
            if (Utils.GetFormValue(this.supplierControl1.ClientIsyukong) == "1")
            {
                baseinfo.SueId = Utils.GetFormValue(this.supplierControl1.ClientzyykValue);
            }
            baseinfo.TourId                        = Utils.GetQueryStringValue("tourId");
            baseinfo.Type                          = EyouSoft.Model.EnumType.PlanStructure.PlanProject.景点;
            baseinfo.PlanAttractions               = new EyouSoft.Model.PlanStructure.MPlanAttractions();
            baseinfo.PlanAttractions.ChildNumber   = Utils.GetInt(childrenNum);
            baseinfo.PlanAttractions.AdultNumber   = Utils.GetInt(adultNum);
            baseinfo.PlanAttractions.Attractions   = spotName;
            baseinfo.PlanAttractions.AttractionsId = Utils.GetFormValue("spotList").Split(',')[0];
            baseinfo.OperatorId                    = this.SiteUserInfo.UserId;
            baseinfo.OperatorName                  = this.SiteUserInfo.Name;
            baseinfo.CostDetail                    = CostParticu;
            #endregion

            #region 表单提交
            //景点id
            string editid = Utils.GetQueryStringValue("PlanId");
            if (editid != "" && editid != null) //修改
            {
                baseinfo.PlanAttractions.PlanId = editid;
                baseinfo.PlanId = editid;
                var r = new EyouSoft.BLL.PlanStructure.BPlan().UpdPlan(baseinfo);
                if (r == 1)
                {
                    msg        += "修改成功!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
                }
                else if (r == 0)
                {
                    msg        += "修改失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
                else if (r == -2)
                {
                    msg        += "预控数量不足,修改失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
            }
            else //添加
            {
                var r = new EyouSoft.BLL.PlanStructure.BPlan().AddPlan(baseinfo);
                if (r == 1)
                {
                    msg        += "添加成功!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
                }
                else if (r == 0)
                {
                    msg        += "添加失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
                else if (r == -2)
                {
                    msg        += "预控数量不足,修改失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
            }

            RCWE(seterrorMsg);

            #endregion
        }
예제 #12
0
        private void GetContent()
        {
            MTuanGouChaXunInfo search = new MTuanGouChaXunInfo();

            search.IsYouXiao = true;

            string jiage = Utils.GetQueryStringValue("jiage");

            if (!string.IsNullOrEmpty(jiage))
            {
                search.JiaGe1 = int.Parse(jiage.Split('-')[0]);
                if (jiage.Split('-').Length == 2)
                {
                    search.JiaGe2 = int.Parse(jiage.Split('-')[1]);
                }
            }
            string youlun_leixing = Utils.GetQueryStringValue("youlunleixing");

            if (!string.IsNullOrEmpty(youlun_leixing))
            {
                search.LeiXing = (EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing) int.Parse(youlun_leixing);
            }
            string xingcheng = Utils.GetQueryStringValue("xingcheng");

            if (!string.IsNullOrEmpty(xingcheng))
            {
                search.TianShu1 = int.Parse(xingcheng.Split('-')[0]);
                if (xingcheng.Split('-').Length == 2)
                {
                    search.TianShu2 = int.Parse(xingcheng.Split('-')[1]);
                }
            }
            string chufadi = Utils.GetQueryStringValue("chufadi");

            if (!string.IsNullOrEmpty(chufadi))
            {
                search.ChuFaGangKouId = int.Parse(chufadi.Trim());
            }

            string hangxian = Utils.GetQueryStringValue("hangxian");

            if (!string.IsNullOrEmpty(hangxian))
            {
                search.HangXianId = int.Parse(hangxian);
            }
            var isasc = Utils.GetQueryStringValue("desc").ToLower() == "asc";

            switch (Utils.GetQueryStringValue("sort").ToLower())
            {
            case "xiaoliang":
                search.PaiXu = isasc ? 9 : 8;
                break;

            case "jiage":
                search.PaiXu = isasc ? 3 : 2;
                break;

            case "fabushijian":
                search.PaiXu = isasc ? 1 : 0;
                break;

            default:
                search.PaiXu = 8;
                break;
            }

            BHangQi bll = new BHangQi();

            int pageSize              = 18;
            int pageIndex             = UtilsCommons.GetPadingIndex();
            int recordCount           = 0;
            IList <MTuanGouInfo> list = bll.GetTuanGous(YuMingInfo.CompanyId, pageSize, pageIndex, ref recordCount, search);

            if (list != null && list.Count() > 0)
            {
                Repeater1.DataSource = list;
                Repeater1.DataBind();

                RegisterScript(string.Format("pConfig.pageSize={0};pConfig.pageIndex={1};pConfig.recordCount={2};", pageSize, pageIndex, recordCount));
            }

            YouLunHangXiang();
            DengChuan();
        }
예제 #13
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        protected string PageSave()
        {
            #region 表单赋值
            string msg         = string.Empty;
            string seterrorMsg = string.Empty;
            //车队
            string CarName = Utils.GetFormValue(this.SupplierControl1.ClientText);
            string CarId   = Utils.GetFormValue(this.SupplierControl1.ClientValue);
            //联系人 联系电话 联系传真
            string contectName  = Utils.GetFormValue(this.txtContectName.UniqueID);
            string contectPhone = Utils.GetFormValue(this.txtContectPhone.UniqueID);
            string contectFax   = Utils.GetFormValue(this.txtContectFax.UniqueID);
            //用车时间开始 开始时间点 结束 结束时间点
            DateTime startTime  = Utils.GetDateTime(Utils.GetFormValue(this.txtUseCarTime.UniqueID));
            string   timeHours1 = Utils.GetFormValue(this.txttime1.UniqueID);
            DateTime endTime    = Utils.GetDateTime(Utils.GetFormValue(this.txtUseCarTime2.UniqueID));
            string   timeHours2 = Utils.GetFormValue(this.txttime2.UniqueID);
            //用车类型 车型 车牌号
            string useCarType = Utils.GetFormValue(this.ddlUserCarType.UniqueID);
            string carTypeId  = Utils.GetFormValue("selCarModel").Split(',')[0];
            string carType    = Utils.GetFormValue("selCarModel").Split(',')[1];
            string carNumber  = Utils.GetFormValue(this.txtCarNumber.UniqueID);
            //司机 司机电话
            string driverName  = Utils.GetFormValue(this.txtDirverName.UniqueID);
            string driverPhone = Utils.GetFormValue(this.txDirverPhone.UniqueID);
            //费用明细 用车数量  结算费用
            string  CostParticu = Utils.GetFormValue(this.txtCostParticu.UniqueID);
            string  useCarnums  = Utils.GetFormValue(this.txtUseCarNums.UniqueID);
            decimal totalMoney  = Utils.GetDecimal(Utils.GetFormValue(this.txttotalMoney.UniqueID));

            //接待行程 导游需知 其它备注 返利 支付方式 状态
            string travel      = Utils.GetFormValue(this.txtTravel.UniqueID);
            string guidNotes   = Utils.GetFormValue(this.txtGuidNotes.UniqueID);
            string otherRemark = Utils.GetFormValue(this.txtOtherRemark.UniqueID);
            bool   profit      = Utils.GetFormValue(this.ddlProfit.UniqueID) == "0" ? true : false;
            #endregion

            #region 表单验证
            if (string.IsNullOrEmpty(CarId) && string.IsNullOrEmpty(CarName))
            {
                msg += "请选择车队!<br/>";
            }
            if (string.IsNullOrEmpty(startTime.ToString()))
            {
                msg += "请输入用车开始时间天!<br/>";
            }

            /*if (string.IsNullOrEmpty(timeHours1) || timeHours1 == "点时间")
             * {
             *  msg += "请输入用车开始时间点!<br/>";
             * }*/
            /*if (string.IsNullOrEmpty(endTime.ToString()))
             * {
             *  msg += "请输入用车结束时间天!<br/>";
             * }*/
            /*if (string.IsNullOrEmpty(timeHours2) || timeHours2 == "点时间")
             * {
             *  msg += "请输入用车结束时间点!<br/>";
             * }*/
            if (useCarType.ToString() == "-1")
            {
                msg += "请选择用车类型!<br/>";
            }
            if (string.IsNullOrEmpty(CostParticu))
            {
                msg += "请输入费用明细!<br/>";
            }
            if (totalMoney <= 0)
            {
                msg += "请输入结算费用!<br/>";
            }
            if (string.IsNullOrEmpty(Utils.GetFormValue("selPenyMent")))
            {
                msg += "请选择支付方式!<br/>";
            }
            if (string.IsNullOrEmpty(Utils.GetFormValue("SelStatus")))
            {
                msg += "请选择状态!<br/>";
            }
            if (string.IsNullOrEmpty(Utils.GetFormValue(this.ddlProfit.UniqueID)))
            {
                msg += "请选择是否返利!<br/>";
            }
            if (msg != "")
            {
                seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                return(seterrorMsg);
            }
            #endregion

            #region 实体赋值
            EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.Model.PlanStructure.MPlanBaseInfo();
            baseinfo.AddStatus    = EyouSoft.Model.EnumType.PlanStructure.PlanAddStatus.计调安排时添加;
            baseinfo.CompanyId    = this.SiteUserInfo.CompanyId;
            baseinfo.Confirmation = totalMoney;
            baseinfo.PlanCost     = totalMoney;
            baseinfo.ContactFax   = contectFax;
            baseinfo.ContactName  = contectName;
            baseinfo.ContactPhone = contectPhone;
            baseinfo.CostDetail   = CostParticu;
            baseinfo.StartTime    = (timeHours1 == "点时间" ? "" : timeHours1);
            baseinfo.StartDate    = startTime;
            baseinfo.EndTime      = (timeHours2 == "点时间" ? "" : timeHours2);
            baseinfo.EndDate      = endTime;
            baseinfo.GuideNotes   = guidNotes;
            baseinfo.IsRebate     = profit;
            baseinfo.IssueTime    = System.DateTime.Now;
            baseinfo.Num          = Utils.GetInt(useCarnums);
            baseinfo.PaymentType  = (EyouSoft.Model.EnumType.PlanStructure.Payment)Utils.GetInt(Utils.GetFormValue("selPenyMent"));
            baseinfo.Status       = (EyouSoft.Model.EnumType.PlanStructure.PlanState)Utils.GetInt(Utils.GetFormValue("SelStatus"));
            baseinfo.SourceId     = Utils.GetFormValue(this.SupplierControl1.ClientValue);
            baseinfo.SourceName   = Utils.GetFormValue(this.SupplierControl1.ClientText);
            if (Utils.GetFormValue(this.SupplierControl1.ClientIsyukong) == "1")
            {
                baseinfo.SueId = Utils.GetFormValue(this.SupplierControl1.ClientzyykValue);
            }
            baseinfo.Type                = EyouSoft.Model.EnumType.PlanStructure.PlanProject.用车;
            baseinfo.TourId              = Utils.GetQueryStringValue("tourId");
            baseinfo.ReceiveJourney      = travel;
            baseinfo.PlanCar             = new EyouSoft.Model.PlanStructure.MPlanCar();
            baseinfo.PlanCar.VehicleType = (EyouSoft.Model.EnumType.PlanStructure.PlanCarType)Enum.Parse(typeof(EyouSoft.Model.EnumType.PlanStructure.PlanCarType), useCarType);
            baseinfo.PlanCar.Models      = carType;
            baseinfo.PlanCar.CarId       = carTypeId;
            baseinfo.PlanCar.Driver      = driverName;
            baseinfo.PlanCar.DriverPhone = driverPhone;
            baseinfo.PlanCar.CarNumber   = carNumber;
            baseinfo.Remarks             = otherRemark;
            baseinfo.OperatorId          = this.SiteUserInfo.UserId;
            baseinfo.OperatorName        = this.SiteUserInfo.Name;
            #endregion

            #region 提交操作
            string editid = Utils.GetQueryStringValue("planId");
            EyouSoft.BLL.PlanStructure.BPlan bll = new EyouSoft.BLL.PlanStructure.BPlan();
            int result = 0;
            if (editid != "" && editid != null)
            {
                baseinfo.PlanId         = editid;
                baseinfo.PlanCar.PlanId = editid;
                result = bll.UpdPlan(baseinfo);
                if (result == 1)
                {
                    msg        += "修改成功!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
                }
                else if (result == 0)
                {
                    msg        += "修改失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
                else if (result == -2)
                {
                    msg        += "预控数量不足,修改失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
            }
            else
            {
                result = bll.AddPlan(baseinfo);
                if (result == 1)
                {
                    msg        += "添加成功!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("1", "" + msg + "");
                }
                else if (result == 0)
                {
                    msg        += "添加失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
                else if (result == -2)
                {
                    msg        += "预控数量不足,添加失败!";
                    seterrorMsg = UtilsCommons.AjaxReturnJson("0", "" + msg + "");
                }
            }
            #endregion

            return(seterrorMsg);
        }
예제 #14
0
        /// <summary>
        /// 获取车辆实体
        /// </summary>
        protected void GetCarModel()
        {
            string planId = Utils.GetQueryStringValue("PlanId");

            if (!string.IsNullOrEmpty(planId))
            {
                EyouSoft.Model.PlanStructure.MPlanBaseInfo baseinfo = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用车, planId);
                if (baseinfo != null)
                {
                    this.hidSueID.Value          = baseinfo.SueId;
                    this.hidSueNum.Value         = baseinfo.Num.ToString();
                    this.SupplierControl1.HideID = baseinfo.SourceId;
                    this.SupplierControl1.Name   = baseinfo.SourceName;
                    if (!string.IsNullOrEmpty(baseinfo.SueId.Trim()))
                    {
                        this.SupplierControl1.HideID_zyyk = baseinfo.SueId;
                        this.SupplierControl1.isyukong    = "1";
                    }
                    else
                    {
                        this.SupplierControl1.isyukong = "0";
                    }
                    this.txtContectName.Text  = baseinfo.ContactName;
                    this.txtContectPhone.Text = baseinfo.ContactPhone;
                    this.txtContectFax.Text   = baseinfo.ContactFax;
                    this.txtUseCarTime.Text   = UtilsCommons.GetDateString(baseinfo.StartDate, ProviderToDate);
                    this.txtUseCarTime2.Text  = UtilsCommons.GetDateString(baseinfo.EndDate, ProviderToDate);
                    this.txttime1.Text        = baseinfo.StartTime;
                    this.txttime2.Text        = baseinfo.EndTime;
                    if (baseinfo.PlanCar != null)
                    {
                        this.ddlUserCarType.Items.FindByValue(((int)baseinfo.PlanCar.VehicleType).ToString()).Selected = true;
                        this.txtCarNumber.Text  = baseinfo.PlanCar.CarNumber;
                        this.txtDirverName.Text = baseinfo.PlanCar.Driver;
                        this.txDirverPhone.Text = baseinfo.PlanCar.DriverPhone;
                        if (!string.IsNullOrEmpty(baseinfo.SueId.Trim()))
                        {
                            CarModelList.Append("<option value='" + baseinfo.PlanCar.CarId + "," + baseinfo.PlanCar.Models + "'>" + baseinfo.PlanCar.Models + "</option>");
                            EyouSoft.Model.SourceStructure.MSourceSueCar carSueModel = new EyouSoft.BLL.SourceStructure.BSourceControl().GetModelByCarId(baseinfo.SueId, this.SiteUserInfo.CompanyId);
                            if (carSueModel != null)
                            {
                                int nums = carSueModel.ControlNum - carSueModel.AlreadyNum;
                                this.hidCarNum.Value = (nums + baseinfo.Num).ToString();
                            }
                        }
                        else
                        {
                            EyouSoft.Model.SourceStructure.MSourceMotorcade carModel = new EyouSoft.BLL.SourceStructure.BSource().GetMotorcadeModel(baseinfo.SourceId);
                            if (carModel != null)
                            {
                                if (carModel.CarList != null && carModel.CarList.Count > 0)
                                {
                                    for (int i = 0; i < carModel.CarList.Count; i++)
                                    {
                                        if (carModel.CarList[i].CarId == baseinfo.PlanCar.CarId)
                                        {
                                            CarModelList.Append("<option selected='selected' value='" + carModel.CarList[i].CarId + "," + carModel.CarList[i].TypeName + "'>" + carModel.CarList[i].TypeName + "</option>");
                                        }
                                        else
                                        {
                                            CarModelList.Append("<option value='" + carModel.CarList[i].CarId + "," + carModel.CarList[i].TypeName + "'>" + carModel.CarList[i].TypeName + "</option>");
                                        }
                                        this.hiddriverInfo.Value += carModel.CarList[i].CarId + "," + carModel.CarList[i].CarNumber + "," + carModel.CarList[i].Driver + "," + carModel.CarList[i].DriverTel + "|";
                                    }
                                }
                            }
                        }
                    }
                    this.txtCostParticu.Text = baseinfo.CostDetail;
                    this.txtUseCarNums.Text  = baseinfo.Num.ToString();
                    this.txttotalMoney.Text  = Utils.FilterEndOfTheZeroDecimal(baseinfo.Confirmation);
                    this.txtTravel.Text      = baseinfo.ReceiveJourney;
                    this.txtGuidNotes.Text   = baseinfo.GuideNotes;
                    this.txtOtherRemark.Text = baseinfo.Remarks;
                    this.ddlProfit.Items.FindByValue(baseinfo.IsRebate == true ? "0" : "1").Selected = true;
                    panyMent = ((int)baseinfo.PaymentType).ToString();
                    status   = ((int)baseinfo.Status).ToString();
                }
            }
        }
예제 #15
0
        /// <summary>
        /// 保存新的报价
        /// </summary>
        /// <returns></returns>
        private string PageSave()
        {
            string msg = string.Empty;

            #region 获取表单
            //线路区域编号
            int areaID = Utils.GetInt(Utils.GetFormValue("sltArea"));
            //线路编号
            string routeID = Utils.GetFormValue(this.hideRouteID.UniqueID);
            //线路名称
            string routeName = Utils.GetFormValue(this.txt_RouteName.UniqueID);
            //天数
            int days = Utils.GetInt(Utils.GetFormValue(this.txt_Days.UniqueID));
            //客源地 国家
            int countryID = Utils.GetInt(Utils.GetFormValue("sltCountry"));
            //客源地 省份
            int provinceID = Utils.GetInt(Utils.GetFormValue("sltProvince"));
            //询价单位 编号
            string buyCompanyID = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHBH);
            //询价单位 名称
            string buyCompanyName = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHMC);
            //联系人
            string contactName = Utils.GetFormValue(this.txt_Contact.UniqueID);
            //联系电话
            string contactTel = Utils.GetFormValue(this.txt_ConTel.UniqueID);
            //销售员编号
            string sellsID = Utils.GetFormValue(this.UC_SellsSelect.SellsIDClient);
            //销售员名称
            string sellsName = Utils.GetFormValue(this.UC_SellsSelect.SellsNameClient);
            //报价员 取当前登录用户
            EyouSoft.Model.TourStructure.MOperatorInfo operatorModel = new EyouSoft.Model.TourStructure.MOperatorInfo();
            operatorModel.OperatorId = this.SiteUserInfo.UserId;
            operatorModel.Name       = this.SiteUserInfo.Name;
            operatorModel.Phone      = this.SiteUserInfo.Telephone;
            //成人数
            int adultCount = Utils.GetInt(Utils.GetFormValue(this.txt_Adult.UniqueID));
            //成人价格
            decimal adultPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAdultPrice.UniqueID));
            //儿童数
            int childCount = Utils.GetInt(Utils.GetFormValue(this.txt_Child.UniqueID));
            //儿童价格
            decimal childPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtChildPrice.UniqueID));
            //其它价格
            decimal otherPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtOtherPrice.UniqueID));
            //行程特色
            string planContent = Utils.EditInputText(Request.Form[this.txtPlanContent.UniqueID]);
            //价格备注
            string quoteRemark = Utils.GetFormValue(this.txtQuoteRemark.UniqueID);
            //合计金额
            decimal sumPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSumPrice.UniqueID));

            //询价员
            string toOper = Utils.GetFormValue("hideToOperID");

            #region 未超限表单获取
            //出团时间
            DateTime successDateBegin = Utils.GetDateTime(Utils.GetFormValue(this.txtSuccessDateBegin.UniqueID), DateTime.Now);
            //出发交通
            string successsStraffBegin = Utils.GetFormValue(this.txtSuccesssStraffBegin.UniqueID);
            //返回交通
            string successsStraffEnd = Utils.GetFormValue(this.txtSuccesssStraffEnd.UniqueID);
            //集合方式
            string successGather = Utils.GetFormValue(this.txtSuccessGather.UniqueID);
            //增加费用
            decimal successAddPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessAddPrice.UniqueID), 0);
            //增加费用备注
            string successAddPriceRemark = Utils.GetFormValue(this.txtSuccessAddPriceRemark.UniqueID);
            //减少费用
            decimal successReducePrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessReducePrice.UniqueID));
            //减少费用备注
            string successReducePriceRemark = Utils.GetFormValue(this.txtSuccessReducePriceRemark.UniqueID);
            //导游现收
            decimal successGuideIncome = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessGuideIncome.UniqueID));
            //订单备注
            string successOrderRemark = Utils.GetFormValue(this.txtSuccessOrderRemark.UniqueID);
            //是否询价
            bool isPlanerQuote = Utils.GetFormValue(this.cbxJdxj.UniqueID) == "on" ? true : false;
            //签证附件(新)
            string[] visaUpload    = Utils.GetFormValues(this.UploadControl1.ClientHideID);
            string[] oldVisaUpload = Utils.GetFormValues("hideVisaFile");
            //联系人部门编号
            string contactDeptId = Utils.GetFormValue(this.hideContactDeptId.UniqueID);
            #endregion

            #endregion
            //1=保存,2=报价超限,3=报价未超,4=保存新报价
            string saveType = Utils.GetQueryStringValue("saveType");

            //如果是保存和保存新报价 则不做控制
            if (saveType == "1" || saveType == "4")
            {
                #region 表单后台验证
                if (areaID == 0)
                {
                    msg = "请选择线路区域!";
                }
                if (routeName == "")
                {
                    msg += "<br />请输入线路名称!";
                }
                if (days == 0)
                {
                    msg += "<br />请输入天数!";
                }
                if (buyCompanyID == "")
                {
                    msg += "<br />请输入询价单位!";
                }
                if (sellsID == "")
                {
                    msg += "<br />请输入销售员!";
                }
                if (adultCount == 0)
                {
                    msg += "<br />请输入成人数!";
                }
                if (adultPrice == 0)
                {
                    msg += "<br />请输入成人价!";
                }

                if (msg != "")
                {
                    return(UtilsCommons.AjaxReturnJson("0", msg));
                }

                #endregion
            }

            EyouSoft.BLL.TourStructure.BQuote           bll   = new EyouSoft.BLL.TourStructure.BQuote();
            EyouSoft.Model.TourStructure.MTourQuoteInfo model = new EyouSoft.Model.TourStructure.MTourQuoteInfo();
            string act = Utils.GetQueryStringValue("act");
            string qid = Utils.GetQueryStringValue("id");

            model.AdultPrice     = adultPrice;
            model.Adults         = adultCount;
            model.AdvanceApp     = null;
            model.AreaId         = areaID;
            model.BuyCompanyID   = buyCompanyID;
            model.BuyCompanyName = buyCompanyName;
            model.IsPlanerQuote  = isPlanerQuote;
            model.ChildPrice     = childPrice;
            model.Childs         = childCount;
            model.CompanyId      = SiteUserInfo.CompanyId;
            model.CompanyInfo    = new EyouSoft.Model.TourStructure.MCompanyInfo()
            {
                CompanyId = buyCompanyID, CompanyName = buyCompanyName, Contact = contactName, Phone = contactTel
            };
            model.Contact = contactName;
            string costCalculation = string.Empty;
            EyouSoft.Model.TourStructure.MTourService tourService = UtilsCommons.GetTourService(out costCalculation);
            model.TourService             = tourService;
            model.CostCalculation         = costCalculation;
            model.CountryId               = countryID;
            model.Days                    = days;
            model.InquiryTime             = DateTime.Now;
            model.IsPlanerQuote           = false;
            model.MTourQuoteTourInfo      = null;
            model.OperatorInfo            = new EyouSoft.Model.TourStructure.MOperatorInfo();
            model.OperatorInfo.OperatorId = this.SiteUserInfo.UserId;
            model.OperatorInfo.Name       = this.SiteUserInfo.Name;
            model.OperatorInfo.Phone      = this.SiteUserInfo.Telephone;
            model.OtherCost               = otherPrice;
            if (isPlanerQuote)
            {
                model.PlanerId = toOper;
            }
            #region 签证附件
            IList <EyouSoft.Model.ComStructure.MComAttach> visaList = null;
            if (visaUpload.Length > 0)
            {
                visaList = new List <EyouSoft.Model.ComStructure.MComAttach>();
                for (int i = 0; i < visaUpload.Length; i++)
                {
                    if (visaUpload[i].Trim() != "")
                    {
                        if (visaUpload[i].Split('|').Length > 1)
                        {
                            EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach();
                            visaModel.Downloads = 0;
                            visaModel.FilePath  = visaUpload[i].Split('|')[1];
                            visaModel.ItemType  = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料;
                            visaModel.Name      = visaUpload[i].Split('|')[0];
                            visaModel.Size      = 0;
                            visaList.Add(visaModel);
                        }
                    }
                }
            }
            if (oldVisaUpload.Length > 0)
            {
                if (visaList == null)
                {
                    visaList = new List <EyouSoft.Model.ComStructure.MComAttach>();
                }
                for (int i = 0; i < oldVisaUpload.Length; i++)
                {
                    EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach();
                    visaModel.Downloads = Utils.GetInt(oldVisaUpload[i].Split('|')[2]);
                    visaModel.FilePath  = oldVisaUpload[i].Split('|')[1];
                    visaModel.ItemType  = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料;
                    visaModel.Name      = oldVisaUpload[i].Split('|')[0];
                    visaModel.Size      = 0;
                    visaList.Add(visaModel);
                }
            }
            model.VisaFileList = visaList;
            #endregion

            Dictionary <string, object> quoteType = UtilsCommons.GetServiceType();
            bool IsTourOrSubentry = (bool)quoteType["IsTourOrSubentry"];

            if (IsTourOrSubentry)
            {
                //整团
                model.ServiceStandard = quoteType["Service"].ToString();
                model.OutQuoteType    = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团;
            }
            else
            {
                //分项
                model.TourTeamPrice = (IList <EyouSoft.Model.TourStructure.MTourTeamPrice>)quoteType["Service"];
                model.OutQuoteType  = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项;
            }
            model.Phone           = contactTel;
            model.ContactDepartId = contactDeptId;
            model.PlanFeature     = planContent;
            model.ProvinceId      = provinceID;
            model.QuotePlan       = UtilsCommons.GetPlanList();
            model.QuoteRemark     = quoteRemark;
            model.QuoteState      = EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理;
            model.QuoteType       = (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1);
            model.RouteId         = routeID;
            model.RouteName       = routeName;
            model.TotalPrice      = sumPrice;
            model.QuoteId         = qid;
            //获得销售员信息实体
            EyouSoft.Model.ComStructure.MComUser sellsModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(sellsID, SiteUserInfo.CompanyId);
            if (sellsModel != null)
            {
                model.SaleInfo          = new EyouSoft.Model.TourStructure.MSaleInfo();
                model.SaleInfo.SellerId = sellsID;
                model.SaleInfo.Name     = sellsName;
                model.SaleInfo.Phone    = sellsModel.ContactMobile;
                model.SaleInfo.DeptId   = sellsModel.DeptId;
            }

            bool result = false;
            //新增,修改,复制
            if (saveType == "1")
            {
                if (act == "add" || act == "copy")
                {
                    model.ParentId = "0";
                    result         = bll.AddTourQuote(model);
                    msg            = UtilsCommons.AjaxReturnJson("1", "新增报价成功,正在跳转..");
                }
                if (act == "update")
                {
                    model.QuoteId    = qid;
                    model.UpdateTime = DateTime.Now;
                    result           = bll.UpdateTourQuote(model);
                    msg = UtilsCommons.AjaxReturnJson("1", "修改成功,正在跳转..");
                }
            }

            //超限实体赋值
            if (saveType == "2")
            {
                model.AdvanceApp           = new EyouSoft.Model.TourStructure.MAdvanceApp();
                model.AdvanceApp.Applier   = this.SiteUserInfo.Name;
                model.AdvanceApp.ApplierId = this.SiteUserInfo.UserId;
                //model.AdvanceApp.DisburseAmount = applyPrice;
                //model.AdvanceApp.ApplyTime = applyDateTime;
                model.AdvanceApp.DeptId = this.SiteUserInfo.DeptId;
                //model.AdvanceApp.Remark = applyRemarks;
                model.MTourQuoteTourInfo = null;
                int r = bll.SuccessTourQuote(model);
                result = (r == 1 || r == 3) ? true : false;
                msg    = UtilsCommons.AjaxReturnJson("1", "成功提交垫付申请,等待审核!");
            }
            //未超限实体赋值
            if (saveType == "3")
            {
                model.MTourQuoteTourInfo = new EyouSoft.Model.TourStructure.MTourQuoteTourInfo();
                model.MTourQuoteTourInfo.AddCostRemark    = successAddPriceRemark;
                model.MTourQuoteTourInfo.Gather           = successGather;
                model.MTourQuoteTourInfo.GuideIncome      = successGuideIncome;
                model.MTourQuoteTourInfo.LDate            = successDateBegin;
                model.MTourQuoteTourInfo.LTraffic         = successsStraffBegin;
                model.MTourQuoteTourInfo.OrderRemark      = successOrderRemark;
                model.MTourQuoteTourInfo.ReduceCostRemark = successReducePriceRemark;
                model.MTourQuoteTourInfo.RTraffic         = successsStraffEnd;
                model.MTourQuoteTourInfo.SaleAddCost      = successAddPrice;
                model.MTourQuoteTourInfo.SaleReduceCost   = successReducePrice;
                model.MTourQuoteTourInfo.SalerIncome      = sumPrice - successGuideIncome;
                model.AdvanceApp = null;

                switch (type)
                {
                case 1:
                    model.MTourQuoteTourInfo.TourType  = EyouSoft.Model.EnumType.TourStructure.TourType.组团团队;
                    model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelList();
                    break;

                case 2:
                    model.MTourQuoteTourInfo.TourType  = EyouSoft.Model.EnumType.TourStructure.TourType.地接团队;
                    model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelList();
                    break;

                case 3:
                    model.MTourQuoteTourInfo.TourType  = EyouSoft.Model.EnumType.TourStructure.TourType.出境团队;
                    model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelListS();
                    break;
                }
                model.MTourQuoteTourInfo.TourStatus = EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划;
                model.UpdateTime = DateTime.Now;

                int successState = bll.SuccessTourQuote(model);

                switch (successState)
                {
                case 2:
                    msg    = UtilsCommons.AjaxReturnJson("1", "报价成功!");
                    result = true;
                    break;

                case 4:
                    msg = UtilsCommons.AjaxReturnJson("0", "操作失败!");
                    break;

                case 5:
                    msg    = UtilsCommons.AjaxReturnJson("2", "报价成功,但销售员超限!,是否需要进行收款操作?");
                    result = true;
                    break;

                case 6:
                    msg    = UtilsCommons.AjaxReturnJson("2", "报价成功,但客户单位超限!,是否需要进行收款操作?");
                    result = true;
                    break;

                case 7:
                    msg    = UtilsCommons.AjaxReturnJson("2", "报价成功,但销售员和客户单位超限!,是否需要进行收款操作?");
                    result = true;
                    break;

                default:
                    msg = UtilsCommons.AjaxReturnJson("0", "操作失败!");
                    break;
                }

                if (successState == 1)
                {
                    msg = UtilsCommons.AjaxReturnJson("0", "超限、垫付申请中,不能报价!");
                }
                if (successState == 2)
                {
                    msg    = UtilsCommons.AjaxReturnJson("1", "报价成功!");
                    result = true;
                }
            }

            if (saveType == "4")
            {
                model.ParentId = Utils.GetFormValue(this.hideFristQuoteId.UniqueID);
                result         = bll.AddNewTourQuote(model);
                msg            = UtilsCommons.AjaxReturnJson("1", "新增新报价成功,正在跳转..");
            }
            if (saveType == "5")
            {
                result = bll.CalcelTourQuote(qid, Utils.GetFormValue("txtCanelRemark"));
                msg    = UtilsCommons.AjaxReturnJson("1", "取消成功,正在跳转..");
            }

            if (!result)
            {
                msg = UtilsCommons.AjaxReturnJson("0", "操作失败,请稍后尝试!");
            }
            return(msg);
            //model.CancelReason = "";
            //model.IsLatest
            //model.OrderCode = "";
            //model.OrderId = "";
            //model.Planer
            //model.TimeCount
            //model.TotalPrice
            //model.TourPrice
            //model.TourQuoteNo
            //model.UpdateTime
            //model.VisaFileList
        }
예제 #16
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            string Msg = string.Empty;

            EyouSoft.Model.SmsStructure.MSmsSetting model = new EyouSoft.Model.SmsStructure.MSmsSetting();
            model.CompanyId  = CurrentUserCompanyID;
            model.OperatorId = SiteUserInfo.UserId;
            model.IssueTime  = DateTime.Now;
            string SaveType = Utils.GetQueryStringValue("SaveType");

            if (SaveType == "1")
            {
                model.Message   = Utils.GetFormValue(txtCTContent.UniqueID);
                model.BeforeDay = Utils.GetInt(Utils.GetFormValue(txtCTDay.UniqueID));
                model.Hour      = Utils.GetInt(Utils.GetFormValue(txtCTHour.UniqueID));
                model.IsEnabled = chkCTState.Checked;
                model.Type      = EyouSoft.Model.EnumType.SmsStructure.SettingType.出团通知;
                if (!string.IsNullOrEmpty(model.Message))
                {
                    Msg += "发送内容不能为空!<br/>";
                }
                if (model.BeforeDay == 0)
                {
                    Msg += "发送时间天数不能为空!<br/>";
                }
                if (model.Hour == 0)
                {
                    Msg += "发送时间小时不能为空!<br/>";
                }
                if (!string.IsNullOrEmpty(Msg))
                {
                    int Result = new EyouSoft.BLL.SmsStructure.BSmsSetting().SetSmsSetting(model);
                    if (Result == 1)
                    {
                        Msg = UtilsCommons.AjaxReturnJson("1", "保存成功!");
                    }
                    else
                    {
                        Msg = UtilsCommons.AjaxReturnJson("0", "保存失败!");
                    }
                }
            }
            else if (SaveType == "2")
            {
                model.Message   = Utils.GetFormValue(txtHTContent.UniqueID);
                model.BeforeDay = Utils.GetInt(Utils.GetFormValue(txtHTDay.UniqueID));
                model.Hour      = Utils.GetInt(Utils.GetFormValue(txtHTHour.UniqueID));
                model.IsEnabled = chkHTState.Checked;
                model.Type      = EyouSoft.Model.EnumType.SmsStructure.SettingType.回团通知;
                if (!string.IsNullOrEmpty(model.Message))
                {
                    Msg += "发送内容不能为空!<br/>";
                }
                if (model.BeforeDay == 0)
                {
                    Msg += "发送时间天数不能为空!<br/>";
                }
                if (model.Hour == 0)
                {
                    Msg += "发送时间小时不能为空!<br/>";
                }
                if (!string.IsNullOrEmpty(Msg))
                {
                    int Result = new EyouSoft.BLL.SmsStructure.BSmsSetting().SetSmsSetting(model);
                    if (Result == 1)
                    {
                        Msg = UtilsCommons.AjaxReturnJson("1", "保存成功!");
                    }
                    else
                    {
                        Msg = UtilsCommons.AjaxReturnJson("0", "保存失败!");
                    }
                }
            }
            else if (SaveType == "3")
            {
                model.Message   = Utils.GetFormValue(txtSRContent.UniqueID);
                model.BeforeDay = Utils.GetInt(Utils.GetFormValue(txtSRDay.UniqueID));
                model.Hour      = Utils.GetInt(Utils.GetFormValue(txtSRHour.UniqueID));
                model.IsEnabled = chkSRState.Checked;
                model.Type      = EyouSoft.Model.EnumType.SmsStructure.SettingType.生日提醒;
                if (!string.IsNullOrEmpty(model.Message))
                {
                    Msg += "发送内容不能为空!<br/>";
                }
                if (model.BeforeDay == 0)
                {
                    Msg += "发送时间天数不能为空!<br/>";
                }
                if (model.Hour == 0)
                {
                    Msg += "发送时间小时不能为空!<br/>";
                }
                if (!string.IsNullOrEmpty(Msg))
                {
                    int Result = new EyouSoft.BLL.SmsStructure.BSmsSetting().SetSmsSetting(model);
                    if (Result == 1)
                    {
                        Msg = UtilsCommons.AjaxReturnJson("1", "保存成功!");
                    }
                    else
                    {
                        Msg = UtilsCommons.AjaxReturnJson("0", "保存失败!");
                    }
                }
            }
            Response.Clear();
            Response.Write(Msg);
            Response.End();
        }
예제 #17
0
        /// <summary>
        /// 获得超限信息
        /// </summary>
        /// <returns></returns>
        private string GetAmount()
        {
            EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote();
            string msg = string.Empty;
            //询价单位编号
            string buyID = Utils.GetQueryStringValue("buyID");
            //销售员编号
            string sellsID = Utils.GetQueryStringValue("sellsID");
            //合计金额
            decimal price = Utils.GetDecimal(Utils.GetQueryStringValue("price"));
            //返回状态1、2、3
            string state = string.Empty;
            //是否超限
            bool isOverrun = true;
            //报价编号
            string id = Utils.GetQueryStringValue("id");

            string cHtml = string.Empty;
            string sHtml = string.Empty;

            EyouSoft.Model.FinStructure.MCustomerWarning customerWarningModel = bll.GetCustomerOverrunDetail(buyID, price, SiteUserInfo.CompanyId);
            EyouSoft.Model.FinStructure.MSalesmanWarning salesmanWarningModel = bll.GetSaleOverrunDetail(sellsID, price, SiteUserInfo.CompanyId);
            if (customerWarningModel != null)
            {
                cHtml = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Customer + "</td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(customerWarningModel.AmountOwed, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><a class='link1'><strong>" + UtilsCommons.GetMoneyString(customerWarningModel.Arrear, this.ProviderToMoney) + "</strong></a></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(customerWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(customerWarningModel.TransfiniteTime, this.ProviderToDate) + "</td><td bgcolor='#FFFFFF' align='center'>" + customerWarningModel.Deadline.ToString() + "</td><td bgcolor='#FFFFFF' align='center'>" + (customerWarningModel.DeadDay <= 0 ? 0 : customerWarningModel.DeadDay) + "</td></tr>";

                isOverrun = false;
            }

            if (salesmanWarningModel != null)
            {
                sHtml = "<tr><td height='28' bgcolor='#FFFFFF' align='center'>" + salesmanWarningModel.SellerName + "</td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.AmountOwed, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.ConfirmAdvances, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><strong>" + UtilsCommons.GetMoneyString(salesmanWarningModel.PreIncome, this.ProviderToMoney) + "</strong></td><td bgcolor='#FFFFFF' align='center'><b class='fontblue'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.SumPay, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontbsize12'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Arrear, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'><b class='fontgreen'>" + UtilsCommons.GetMoneyString(salesmanWarningModel.Transfinite, this.ProviderToMoney) + "</b></td><td bgcolor='#FFFFFF' align='center'>" + UtilsCommons.GetDateString(salesmanWarningModel.TransfiniteTime, this.ProviderToDate) + "</td></tr>";

                isOverrun = false;
            }


            if (isOverrun)
            {
                //未超限处理
                msg = "{\"type\":\"3\",\"chtml\":\"" + cHtml + "\",\"shtml\":\"" + sHtml + "\"}";
            }
            else
            {
                //超限 未申请

                msg = "{\"type\":\"1\",\"chtml\":\"" + cHtml + "\",\"shtml\":\"" + sHtml + "\"}";
            }
            return(msg);
        }
예제 #18
0
        /// <summary>
        /// 保存
        /// </summary>
        protected void PageSave(string doType)
        {
            #region 表单取值
            string name      = Utils.GetFormValue(txtName.UniqueID);
            string number    = Utils.GetFormValue(txtCount.UniqueID);
            string price     = Utils.GetFormValue(txtPrice.UniqueID);
            string time      = Utils.GetFormValue(txtInTime.UniqueID);
            string use       = Utils.GetFormValue(txtUse.UniqueID);
            string remark    = Utils.GetFormValue(txtRemark.UniqueID);
            string goodId    = Utils.GetFormValue(hidGoodId.UniqueID);
            string stock     = Utils.GetFormValue(hidGoodStock.UniqueID);
            string oldnumber = Utils.GetFormValue(hidGoodCount.UniqueID);
            #endregion

            #region 数据验证
            string msg    = "";
            bool   result = false;
            if (string.IsNullOrEmpty(name))
            {
                msg += "-请输入物品名称!";
            }
            if (string.IsNullOrEmpty(number))
            {
                msg += "-请输入物品数量!";
            }
            if (string.IsNullOrEmpty(time))
            {
                msg += "请输入物品入库时间!";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
                return;
            }
            #endregion

            #region 实体赋值
            MGovGood model = new MGovGood();
            model.Name       = name;
            model.CompanyId  = this.SiteUserInfo.CompanyId;
            model.GoodId     = goodId;
            model.IssueTime  = DateTime.Now;
            model.Number     = Utils.GetInt(number);
            model.Operator   = this.SiteUserInfo.Name;
            model.OperatorId = this.SiteUserInfo.UserId;
            model.Price      = Utils.GetDecimal(price);
            model.Remark     = remark;
            model.Time       = Utils.GetDateTimeNullable(time);
            model.Stock      = Utils.GetInt(number) - Utils.GetInt(oldnumber) + Convert.ToInt32(string.IsNullOrEmpty(stock) ? "0" : stock);
            model.Use        = use;
            #endregion

            #region 提交保存
            BGood BLL = new BGood();
            if (doType == "add")
            {
                result = BLL.AddGovGood(model);
                msg    = result ? "添加成功!" : "添加失败!";
            }
            if (doType == "update")
            {
                result = BLL.UpdateGovGood(model);
                msg    = result ? "修改成功!" : "修改失败!";
            }
            Response.Clear();
            Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
            Response.End();
            #endregion
        }
예제 #19
0
        /// <summary>
        /// 根据预控类型显示预控时间(总控显示开始日期,单控显示起、止日期)
        /// </summary>
        /// <param name="PeriodType"></param>
        /// <returns></returns>
        protected string GetPeriodTime(object PeriodType, object StartTime, object EndTime)
        {
            EyouSoft.Model.EnumType.SourceStructure.SourceControlType type = (EyouSoft.Model.EnumType.SourceStructure.SourceControlType)PeriodType;
            string str = string.Empty;

            str = UtilsCommons.GetDateString(DateTime.Parse(StartTime.ToString()), ProviderToDate);
            if (type == EyouSoft.Model.EnumType.SourceStructure.SourceControlType.单控)
            {
                str = UtilsCommons.GetDateString(DateTime.Parse(StartTime.ToString()), ProviderToDate) + "-" + UtilsCommons.GetDateString(DateTime.Parse(EndTime.ToString()), ProviderToDate);
            }
            return(str);
        }
예제 #20
0
 /// <summary>
 /// 删除利润分配
 /// </summary>
 private void Del()
 {
     AjaxResponse(UtilsCommons.AjaxReturnJson(new EyouSoft.BLL.FinStructure.BFinance().DelProfitDis(Utils.GetInt(Utils.GetQueryStringValue("id")), CurrentUserCompanyID) ? "1" : "-1", "删除失败!"));
 }
예제 #21
0
        /// <summary>
        /// 写入计调安排
        /// </summary>
        void InsertAnPai()
        {
            var info = GetFormInfo();

            info.PlanCost  = 0;
            info.AddStatus = (PlanAddStatus)Utils.GetInt(Utils.GetFormValue("addStatusPlan"));

            int     renShu  = info.Num;
            decimal dRenShu = info.DNum;
            decimal jinE    = info.Confirmation;

            info.Num          = 0;
            info.DNum         = 0;
            info.Confirmation = 0;

            int bllRetCode = new EyouSoft.BLL.PlanStructure.BPlan().AddPlan(info);

            if (bllRetCode != 1)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("-1"));
            }

            //写入变更
            var info1 = new EyouSoft.Model.PlanStructure.MPlanCostChange();

            if (jinE < 0)
            {
                info1.ChangeCost = jinE * -1;
            }
            else
            {
                info1.ChangeCost = jinE;
            }
            info1.ChangeType = EyouSoft.Model.EnumType.PlanStructure.PlanChangeChangeClass.导游报账;
            if (info.AddStatus == PlanAddStatus.销售报账时添加)
            {
                info1.ChangeType = EyouSoft.Model.EnumType.PlanStructure.PlanChangeChangeClass.销售报账;
            }
            if (info.AddStatus == PlanAddStatus.计调报账时添加)
            {
                info1.ChangeType = EyouSoft.Model.EnumType.PlanStructure.PlanChangeChangeClass.计调报账;
            }

            info1.IssueTime     = DateTime.Now;
            info1.PeopleNumber  = renShu;
            info1.PlanId        = info.PlanId;
            info1.Remark        = string.Empty;
            info1.Type          = jinE >= 0;
            info1.FeiYongMingXi = string.Empty;

            if (info.Type == EyouSoft.Model.EnumType.PlanStructure.PlanProject.国内游轮 || info.Type == EyouSoft.Model.EnumType.PlanStructure.PlanProject.涉外游轮)
            {
                info1.DNum         = dRenShu;
                info1.PeopleNumber = Convert.ToInt32(dRenShu);
            }
            else
            {
                info1.PeopleNumber = renShu;
                info1.DNum         = renShu;
            }

            bool bllRetCode1 = new EyouSoft.BLL.PlanStructure.BPlan().AddOrUpdPlanCostChange(info1);

            if (bllRetCode1)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("-1", "操作失败"));
            }
        }
예제 #22
0
 /// <summary>
 /// 页面保存
 /// </summary>
 protected void PageSave(string doType)
 {
     #region 表单取值
     string documentid  = Utils.GetFormValue(hidKeyId.UniqueID);
     string fontsize    = Utils.GetFormValue(txtfileSize.UniqueID);
     string company     = Utils.GetFormValue(txtcompany.UniqueID);
     string title       = Utils.GetFormValue(txttitle.UniqueID);
     string attnid      = Utils.GetFormValue(HrSelect1.HrSelectIDClient);
     string attnname    = Utils.GetFormValue(HrSelect1.HrSelectNameClient);
     string approveid   = Utils.GetFormValue(SellsSelect1.SellsIDClient);
     string approvename = Utils.GetFormValue(SellsSelect1.SellsNameClient);
     string isPass      = Utils.GetFormValue("isPass");
     #endregion
     #region 表单验证
     string msg    = "";
     bool   result = false;
     if (string.IsNullOrEmpty(fontsize))
     {
         msg += "-请输入文件字号!";
     }
     if (string.IsNullOrEmpty(company))
     {
         msg += "-请输入文件发布单位!";
     }
     if (string.IsNullOrEmpty(title))
     {
         msg += "-请输入文件标题!";
     }
     if (string.IsNullOrEmpty(approveid) || string.IsNullOrEmpty(approvename))
     {
         msg += "-请选择审批或者传阅人!";
     }
     if (string.IsNullOrEmpty(attnid) || string.IsNullOrEmpty(attnname))
     {
         msg += "-请选择经办人!";
     }
     if (!string.IsNullOrEmpty(msg))
     {
         Response.Clear();
         Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
         Response.End();
     }
     #endregion
     #region 实体赋值
     EyouSoft.Model.GovStructure.MGovDocuments model = new EyouSoft.Model.GovStructure.MGovDocuments();
     model.AttnId                  = attnid;
     model.AttnName                = attnname;
     model.Company                 = company;
     model.CompanyId               = this.SiteUserInfo.CompanyId;
     model.DocumentsId             = documentid;
     model.FileType                = isPass == "shenpi" ? FileType.审批 : FileType.阅;
     model.FontSize                = fontsize;
     model.GovDocumentsApproveList = GetList(approveid, approvename);
     model.IssueTime               = DateTime.Now;
     model.OperatorID              = this.SiteUserInfo.UserId;
     model.Title         = title;
     model.ComAttachList = NewGetAttach();
     #endregion
     #region 保存提交
     EyouSoft.BLL.GovStructure.BDocuments BLL = new EyouSoft.BLL.GovStructure.BDocuments();
     if (doType == "add")
     {
         result = BLL.AddGovDocuments(model);
         msg    = result ? "添加成功!" : "添加失败!";
     }
     else
     {
         result = BLL.UpdateGovDocuments(model, AttachItemType.文件管理);
         msg    = result ? "修改成功!" : "修改失败!";
     }
     Response.Clear();
     Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
     Response.End();
     #endregion
 }
예제 #23
0
        /// <summary>
        /// 删除供应商信息
        /// </summary>
        void DeleteGys()
        {
            string s = Utils.GetQueryStringValue("deletegysids");

            if (string.IsNullOrEmpty(s))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            string[] items = s.Split(',');
            if (items == null || items.Length == 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            EyouSoft.Model.SSOStructure.MUserInfo uinfo = null;
            bool isLogin = EyouSoft.Security.Membership.UserProvider.IsLogin(out uinfo);

            if (!isLogin)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            int privs = -9;

            var gysLeXing = new EyouSoft.BLL.GysStructure.BGys().GetGysLeiXing(items[0]);

            if (!gysLeXing.HasValue)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            switch (gysLeXing.Value)
            {
            case EyouSoft.Model.EnumType.SourceStructure.SourceType.餐馆: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_餐馆_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.车队: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_车队_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.地接社: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_地接社_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.购物: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_购物_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.景点: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_景点_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.酒店: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_酒店_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.票务: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_票务_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.其他: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_其它_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.游轮: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_游轮_删除; break;

            default: break;
            }

            if (privs == -9)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            if (!EyouSoft.Security.Membership.UserProvider.IsGrant(uinfo.Privs, privs))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "没有删除权限!"));
            }

            int f1 = 0;
            int f2 = 0;

            var bll = new EyouSoft.BLL.GysStructure.BGys();

            foreach (var item in items)
            {
                if (bll.Delete(uinfo.CompanyId, item) == 1)
                {
                    f1++;
                }
                else
                {
                    f2++;
                }
            }

            bll = null;

            if (f1 > 0 && f2 == 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "删除成功!"));
            }
            if (f1 > 0 && f2 > 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", f1 + "个信息删除成功," + f2 + "个信息不允许删除。"));
            }
            if (f1 == 0 && f2 > 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", f2 + "个信息不允许删除。"));
            }

            Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "删除失败"));
        }
예제 #24
0
        /// <summary>
        /// 保存按钮点击事件执行方法
        /// </summary>
        protected string PageSave(string doType, string id)
        {
            string msg = string.Empty;
            //t为false为编辑,true时为新增
            bool t = String.Equals(doType, "update", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(id) ? false : true;
            //国家
            string country = Utils.GetFormValue(this.ddlCountry.UniqueID);
            //省份
            string provice = Utils.GetFormValue(this.ddlProvice.UniqueID);
            //城市
            string city = Utils.GetFormValue(this.ddlCity.UniqueID);
            //县区
            string area = Utils.GetFormValue(this.ddlArea.UniqueID);
            //地址
            string address = Utils.GetFormValue(this.txtaddress.UniqueID);
            //单位名称
            string UnitName = Utils.GetFormValue(this.txtUnitName.UniqueID).Trim();
            //备注
            string remarks = Utils.GetFormValue(this.txtRemarks.UniqueID);
            //合同开始时间
            string ContractStartDate = Utils.GetFormValue(this.txtContractDate_Start.UniqueID);
            //合同有到期时间
            string ContractDate = Utils.GetFormValue(this.txtContractDate.UniqueID);
            //合同号
            string ContractNum = Utils.GetFormValue(this.txtContractNum.UniqueID);

            EyouSoft.Model.SourceStructure.MSourceOther Model     = new EyouSoft.Model.SourceStructure.MSourceOther();
            EyouSoft.Model.SourceStructure.MSource      source    = new EyouSoft.Model.SourceStructure.MSource();
            EyouSoft.BLL.SourceStructure.BSource        bllsource = new EyouSoft.BLL.SourceStructure.BSource();
            if (!String.IsNullOrEmpty(id))
            {
                source.SourceId = id;
            }
            //合作协议
            string[] agrUpload    = Utils.GetFormValues(this.UploadControl2.ClientHideID);
            string[] oldagrUpload = Utils.GetFormValues("hideagreement");
            #region 合作协议上传
            string agreement = string.Empty;
            if (oldagrUpload.Length > 0)
            {
                for (int i = 0; i < oldagrUpload.Length; i++)
                {
                    agreement = oldagrUpload[i].Split('|')[1];
                }
            }
            if (agrUpload.Length > 0)
            {
                for (int i = 0; i < agrUpload.Length; i++)
                {
                    if (agrUpload[i].Trim() != "")
                    {
                        if (agrUpload[i].Split('|').Length > 1)
                        {
                            if (agrUpload[i].Length > 1)
                            {
                                agreement = agrUpload[i].Split('|')[1];
                            }
                        }
                    }
                }
            }

            #endregion

            //合同附件
            //合同附件(新)
            string[] visaUpload    = Utils.GetFormValues(this.UploadControl1.ClientHideID);
            string[] oldVisaUpload = Utils.GetFormValues("hideFileInfo");
            #region 合同附件
            EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach();

            if (oldVisaUpload.Length > 0)
            {
                for (int i = 0; i < oldVisaUpload.Length; i++)
                {
                    visaModel.FilePath = oldVisaUpload[i].Split('|')[1];
                    visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.供应商合同附件;
                    visaModel.Name     = oldVisaUpload[i].Split('|')[0];
                    visaModel.Size     = 0;
                }
            }
            if (visaUpload.Length > 0)
            {
                for (int i = 0; i < visaUpload.Length; i++)
                {
                    if (visaUpload[i].Trim() != "")
                    {
                        if (visaUpload[i].Split('|').Length > 1)
                        {
                            visaModel.Downloads = 0;
                            visaModel.FilePath  = visaUpload[i].Split('|')[1];
                            visaModel.ItemType  = EyouSoft.Model.EnumType.ComStructure.AttachItemType.供应商合同附件;
                            visaModel.Name      = visaUpload[i].Split('|')[0];
                            visaModel.Size      = 0;
                        }
                    }
                }
            }

            #endregion
            source.ContractAttach      = visaModel;
            source.AgreementFile       = agreement;
            source.Address             = address;
            source.Remark              = remarks;
            source.CountryId           = Utils.GetInt(country);
            source.ProvinceId          = Utils.GetInt(provice);
            source.CityId              = Utils.GetInt(city);
            source.CountyId            = Utils.GetInt(area);
            source.IssueTime           = DateTime.Now;
            source.CompanyId           = this.SiteUserInfo.CompanyId;
            source.OperatorId          = this.SiteUserInfo.UserId;
            source.DeptId              = this.SiteUserInfo.DeptId;
            source.LastModifierId      = this.SiteUserInfo.Name;
            source.LastModifyTime      = DateTime.Now;
            source.Name                = UnitName;
            source.ContractPeriodEnd   = string.IsNullOrEmpty(ContractDate) ? null : (DateTime?)DateTime.Parse(ContractDate);
            source.ContractPeriodStart = string.IsNullOrEmpty(ContractStartDate) ? null : (DateTime?)DateTime.Parse(ContractStartDate);
            //是否签单
            source.IsPermission = false;
            if (RadSign_yes.Checked)
            {
                source.IsPermission = true;
            }
            source.CompanyId = this.SiteUserInfo.CompanyId;

            //是否推荐
            source.IsRecommend = false;
            if (RadRecommend_yes.Checked)
            {
                source.IsRecommend = true;
            }
            //是否签订合同
            source.IsSignContract = false;
            if (Radio_hd_yes.Checked)
            {
                source.IsSignContract = true;
                source.ContractCode   = Utils.GetFormValue(this.txtContractNum.UniqueID);
            }

            Model.SourceModel   = source;
            Model.LinkManList   = UtilsCommons.GetDataList();
            Model.OtherTypeList = GetDataList();
            int result = 0;
            if (t)
            {//新增
                result = bllsource.AddOtherModel(Model);
                if (result == -1)
                {
                    msg = UtilsCommons.AjaxReturnJson("0", "单位名称已存在");
                    return(msg);
                }
            }
            else
            { //编辑
                result = bllsource.UpdateOtherModel(Model);
                if (result == -1)
                {
                    msg = UtilsCommons.AjaxReturnJson("0", "单位名称已存在");
                    return(msg);
                }
            }
            string type = t ? "新增" : "修改";
            if (result > 0)
            {
                msg = UtilsCommons.AjaxReturnJson("1", type + "成功");
                return(msg);
            }
            else
            {
                msg = UtilsCommons.AjaxReturnJson("0", type + "失败");
                return(msg);
            }
        }
예제 #25
0
        /// <summary>
        /// 保存按钮点击事件执行方法
        /// </summary>
        protected void PageSave()
        {
            //ajax返回信息
            string resultmsg = "";
            //实例化工作汇报实体
            MWorkReport modelMWorkReport = new MWorkReport();
            //实例化业务层
            BIndividual bllBIndividual = new BIndividual();

            if (!string.IsNullOrEmpty(hidId.Value))
            {
                //修改状态根据id获取汇报实体
                modelMWorkReport = bllBIndividual.GetWorkReport(Utils.GetInt(hidId.Value));
            }
            else
            {
                //汇报时间
                modelMWorkReport.IssueTime = DateTime.Now;
            }
            #region 显性属性(页面直接和用户交互)
            //标题
            string title = this.txtTitle.Text;
            //汇报人
            string userName = this.txtUserName.Text;
            //部门id
            string departID = Utils.GetFormValue(this.SelectSection1.SelectIDClient);
            //部门名称
            string departName = Utils.GetFormValue(this.SelectSection1.SelectNameClient);
            //汇报时间
            string dateTime = this.txtDateTime.Text;
            //汇报内容
            string content = this.txtContent.Text;
            //附件上传
            string strUploadUrl = Utils.GetFormValue(this.UploadControl1.ClientHideID);

            #region  审批人列表
            //审批人
            string   strapprover = Utils.GetFormValue(this.SelectSection2.SellsNameClient);
            string[] approver    = { "" };
            if (strapprover != null && strapprover.Contains(','))
            {
                approver = strapprover.Split(',');
            }
            else
            {
                approver[0] = strapprover;
            }
            //审核人id
            string   strapproverId = Utils.GetFormValue(this.SelectSection2.SellsIDClient);
            string[] approverId    = { "" };
            if (strapproverId != null && strapproverId.Contains(','))
            {
                approverId = strapproverId.Split(',');
            }
            else
            {
                approverId[0] = strapproverId;
            }
            List <MWorkReportCheck> list = new List <MWorkReportCheck>();
            if (approver.Length > 0)
            {
                for (int i = 0; i < approver.Length; i++)
                {
                    MWorkReportCheck modelMWorkReportCheck = new MWorkReportCheck();
                    if (approverId[i] != null)
                    {
                        //审批人id
                        modelMWorkReportCheck.ApproverId = approverId[i];
                    }
                    //审批人姓名
                    modelMWorkReportCheck.Approver = approver[i];
                    list.Add(modelMWorkReportCheck);
                }
            }
            #endregion

            #region 实体赋值
            modelMWorkReport.Title        = title;
            modelMWorkReport.OperatorName = userName;
            modelMWorkReport.OperatorId   = "";
            modelMWorkReport.DepartmentId = Utils.GetInt(departID);
            modelMWorkReport.Department   = departName;
            modelMWorkReport.IssueTime    = Utils.GetDateTime(dateTime);
            modelMWorkReport.Content      = content;
            modelMWorkReport.Status       = Status.审批中;
            #region 附件
            if (!string.IsNullOrEmpty(strUploadUrl))
            {
                //验证数据
                string[] strUploadList = strUploadUrl.Split('|');
                if (strUploadList.Length == 2)
                {
                    strUploadUrl = strUploadList[0] + "|" + strUploadList[1];
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(Utils.GetFormValue("hideOtherFile")))
                {
                    strUploadUrl = Utils.GetFormValue("hideOtherFile");
                }
            }
            modelMWorkReport.UploadUrl = strUploadUrl;
            #endregion
            modelMWorkReport.list = list;
            #endregion
            #endregion

            #region 隐性属性(id之类)
            //系统公司id
            string companyid = SiteUserInfo.CompanyId;
            modelMWorkReport.CompanyId = companyid;
            //汇报人编号
            modelMWorkReport.OperatorId = SiteUserInfo.UserId;
            #endregion
            //操作之后返回结果
            bool result = false;
            if (!string.IsNullOrEmpty(hidId.Value))
            {
                result = bllBIndividual.UpdWorkReport(modelMWorkReport);
                if (result)
                {
                    resultmsg = UtilsCommons.AjaxReturnJson("true", "修改成功");
                }
                else
                {
                    resultmsg = UtilsCommons.AjaxReturnJson("false", "修改失败,检查选用的数据是否正确");
                }
            }
            else
            {
                result = bllBIndividual.AddWorkReport(modelMWorkReport);
                if (result)
                {
                    resultmsg = UtilsCommons.AjaxReturnJson("true", "添加成功");
                }
                else
                {
                    resultmsg = UtilsCommons.AjaxReturnJson("false", "添加失败,检查选用的数据是否正确");
                }
            }
            Response.Clear();
            Response.Write(resultmsg);
            Response.End();
        }
예제 #26
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(string id, string dotype)
        {
            this.UploadControl1.CompanyID = this.SiteUserInfo.CompanyId;
            this.UploadControl2.CompanyID = this.SiteUserInfo.CompanyId;
            if (String.Equals(dotype, "update", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(id))
            {
                EyouSoft.BLL.SourceStructure.BSource        bll   = new EyouSoft.BLL.SourceStructure.BSource();
                EyouSoft.Model.SourceStructure.MSourceOther model = bll.GetOtherModel(id);
                if (model != null)
                {
                    if (model.OtherTypeList != null && model.OtherTypeList.Count > 0)
                    {
                        SetListCount      = model.OtherTypeList.Count;
                        this.SetOtherList = model.OtherTypeList;
                    }
                    if (model.LinkManList != null && model.LinkManList.Count > 0)
                    {
                        this.Contact1.SetTravelList = model.LinkManList;
                    }
                    if (model.SourceModel != null)
                    {
                        //签单
                        RadSign_no.Checked = true;
                        if (model.SourceModel.IsPermission)
                        {
                            RadSign_yes.Checked = true;
                            RadSign_no.Checked  = false;
                        }
                        //推荐
                        RadRecommend_no.Checked = true;
                        if (model.SourceModel.IsRecommend)
                        {
                            RadRecommend_yes.Checked = true;
                            RadRecommend_no.Checked  = false;
                        }
                        //合同
                        Radio_hd_no.Checked = true;
                        if (model.SourceModel.IsSignContract)
                        {
                            Radio_hd_yes.Checked        = true;
                            Radio_hd_no.Checked         = false;
                            this.txtContractNum.Visible = true;
                            this.txtContractNum.Text    = model.SourceModel.ContractCode;
                            this.txtContractDate.Text   = model.SourceModel.ContractCode;
                        }

                        Countryindex  = model.SourceModel.CountryId;
                        Provinceindex = model.SourceModel.ProvinceId;
                        Cityindex     = model.SourceModel.CityId;
                        Areaindex     = model.SourceModel.CountyId;
                        this.txtContractDate_Start.Text = UtilsCommons.SetDateTimeFormart(model.SourceModel.ContractPeriodStart);
                        this.txtContractDate.Text       = UtilsCommons.SetDateTimeFormart(model.SourceModel.ContractPeriodEnd);
                        this.txtLastHuman.Text          = model.SourceModel.LastModifierId;
                        this.txtLastDate.Text           = model.SourceModel.LastModifyTime.ToString();
                        this.txtaddress.Text            = model.SourceModel.Address;
                        this.txtUnitName.Text           = model.SourceModel.Name;
                        this.txtRemarks.Text            = model.SourceModel.Remark;
                        if (model.SourceModel.ContractAttach != null)
                        {
                            StringBuilder strFile = new StringBuilder();
                            if (model.SourceModel.ContractAttach.FilePath != "")
                            {
                                strFile.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"OtherEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", model.SourceModel.ContractAttach.FilePath, model.SourceModel.ContractAttach.Name);
                            }
                            this.lbhd.Text = strFile.ToString();
                        }
                        if (model.SourceModel.AgreementFile != "")
                        {
                            StringBuilder agreement = new StringBuilder();
                            agreement.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"OtherEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideagreement\" value='{1}|{0}'/></span>", model.SourceModel.AgreementFile, getfilename(model.SourceModel.AgreementFile));
                            this.lbFiles.Text = agreement.ToString();
                        }
                    }
                }
                else
                {
                    Utils.ResponseGoBack();
                }
            }
            this.txtLastDate.Enabled  = false;
            this.txtLastHuman.Enabled = false;
        }
예제 #27
0
        /// <summary>
        /// 获取酒店实体
        /// </summary>
        protected void GetHotelModel()
        {
            string planId = Utils.GetQueryStringValue("planId");

            if (!string.IsNullOrEmpty(planId))
            {
                EyouSoft.Model.PlanStructure.MPlanBaseInfo baseInfo = new EyouSoft.BLL.PlanStructure.BPlan().GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.酒店, planId);
                if (baseInfo != null)
                {
                    SourceID = baseInfo.SourceId;
                    this.supplierControl1.HideID = baseInfo.SourceId;
                    this.supplierControl1.Name   = baseInfo.SourceName;
                    if (!string.IsNullOrEmpty(baseInfo.SueId.Trim()))
                    {
                        this.supplierControl1.HideID_zyyk = baseInfo.SueId;
                        this.supplierControl1.isyukong    = "1";
                        SueID = baseInfo.SueId;
                        EyouSoft.Model.SourceStructure.MSourceSueHotel sueHotel = new EyouSoft.BLL.SourceStructure.BSourceControl().GetModelByHotelId(baseInfo.SueId, this.SiteUserInfo.CompanyId);
                        if (sueHotel != null)
                        {
                            this.hidUserNum.Value = (sueHotel.ControlNum - sueHotel.AlreadyNum + baseInfo.Num).ToString();
                        }
                    }
                    else
                    {
                        this.supplierControl1.isyukong = "0";
                    }

                    if (!string.IsNullOrEmpty(baseInfo.SourceId))
                    {
                        EyouSoft.Model.SourceStructure.MSourceHotel HotelModel = new EyouSoft.BLL.SourceStructure.BSource().GetOneHotelModel(baseInfo.SourceId);
                        if (HotelModel != null)
                        {
                            if (HotelModel.HotelRoomList != null && HotelModel.HotelRoomList.Count > 0)
                            {
                                for (int i = 0; i < HotelModel.HotelRoomList.Count; i++)
                                {
                                    this.hidroomTypePrices.Value += "" + HotelModel.HotelRoomList[i].RoomId + "," + EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal(HotelModel.HotelRoomList[i].PricePJ) + "|";
                                }
                            }
                        }
                    }

                    if (baseInfo.PlanHotel != null)
                    {
                        this.ddlHotelStart.Items.FindByValue(((int)baseInfo.PlanHotel.Star).ToString()).Selected = true;
                        this.txtroomDays.Text = baseInfo.PlanHotel.Days.ToString();

                        if (baseInfo.PlanHotel.PlanHotelRoomList != null && baseInfo.PlanHotel.PlanHotelRoomList.Count > 0)
                        {
                            this.holderView.Visible = false;
                            IList <EyouSoft.Model.PlanStructure.MPlanHotelRoom> hotelRoom = baseInfo.PlanHotel.PlanHotelRoomList;
                            if (hotelRoom != null && hotelRoom.Count > 0)
                            {
                                this.reproomtypelist.DataSource = hotelRoom;
                                this.reproomtypelist.DataBind();
                            }
                        }
                        else
                        {
                            this.holderView.Visible = true;
                        }
                        this.txtFreRoomNumber.Text    = baseInfo.PlanHotel.FreeNumber.ToString();
                        this.txtunitPricesEarly.Text  = Utils.FilterEndOfTheZeroDecimal(baseInfo.PlanHotel.MealPrice);
                        this.txtPeopleNumEarly.Text   = baseInfo.PlanHotel.MealNumber.ToString();
                        this.txtsequenceNumEarly.Text = baseInfo.PlanHotel.MealFrequency.ToString();
                        this.ddlContainsEarly.Items.FindByValue(((int)baseInfo.PlanHotel.IsMeal).ToString()).Selected = true;

                        txtQianTaiTelephone.Text = baseInfo.PlanHotel.QianTaiTelephone;
                    }

                    this.txtContectName.Text    = baseInfo.ContactName;
                    this.txtContectPhone.Text   = baseInfo.ContactPhone;
                    this.txtContectFax.Text     = baseInfo.ContactFax;
                    this.txtStartTime.Text      = UtilsCommons.GetDateString(baseInfo.StartDate, ProviderToDate);
                    this.txtEndTime.Text        = UtilsCommons.GetDateString(baseInfo.EndDate, ProviderToDate);
                    this.txtPayRoomNumbers.Text = baseInfo.Num.ToString();
                    this.txtTotalPrices.Text    = Utils.FilterEndOfTheZeroDecimal(baseInfo.Confirmation);
                    PanyMent = ((int)baseInfo.PaymentType).ToString();
                    this.txtCostParticu.Text = baseInfo.CostDetail;
                    this.txtGuidNotes.Text   = baseInfo.GuideNotes;
                    this.txtOtherRemark.Text = baseInfo.Remarks;
                    this.Selprofit1.Items.FindByValue(baseInfo.IsRebate == true ? "0" : "1").Selected = true;
                    Status = ((int)baseInfo.Status).ToString();
                }
            }
        }
예제 #28
0
        /// <summary>
        /// 添加订单
        /// </summary>
        /// <returns></returns>
        private string saveOrder()
        {
            Eyousoft_yhq.Model.OrderState Orderstate = Eyousoft_yhq.Model.OrderState.未处理;
            int    orderNums = Utils.GetInt(Utils.GetFormValue("orderNum"));
            string id        = Utils.GetFormValue("id");
            var    model     = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model != null)
            {
                if (model.ResidueNum - orderNums >= 0)
                {
                    Orderstate = Eyousoft_yhq.Model.OrderState.待付款;
                }
                Eyousoft_yhq.BLL.Order OrderBll = new Eyousoft_yhq.BLL.Order();
                var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
                if (MemberModel != null)
                {
                    Eyousoft_yhq.Model.Order OrderModel = new Eyousoft_yhq.Model.Order()
                    {
                        ProductID   = id,
                        OrderCode   = DateTime.Now.ToString("yyyy-MM-dd "),
                        MemberID    = MemberModel.UserID,
                        MemberTel   = Utils.GetFormValue("receiveMobile"),
                        MemberName  = Utils.GetFormValue("receiveName"),
                        MemberSex   = MemberModel.ContactSex,
                        OrderState  = Orderstate,
                        PayState    = Eyousoft_yhq.Model.PaymentState.未支付,
                        IsCheck     = true,
                        ConfirmCode = "",
                        Remark      = "",
                        OrderPrice  = model.AppPrice * orderNums,
                        PeopleNum   = orderNums
                    };
                    int num = OrderBll.Add(OrderModel);
                    if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.待付款)
                    {
                        return(UtilsCommons.AjaxReturnJson("1", "操作成功,请及时付款!", OrderModel.OrderID));
                    }
                    if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.未处理)
                    {
                        string result  = string.Empty; //返回发送结果
                        string sendNum = string.Empty; //发送账号
                        Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
                        if (exModel == null || exModel.MsgNumber <= 0)
                        {
                            return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!"));
                        }
                        IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                        var ProductTypeModel = new Eyousoft_yhq.BLL.ProductType().GetModel(model.ProductType);

                        if (ProductTypeModel == null || ProductTypeModel.AdminName == null)
                        {
                            sendNum = HuiYuanInfo.ContactTel;
                            string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】";

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                            #region  短信日志
                            Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                            {
                                TelCode  = sendNum,
                                MsgText  = Msg,
                                ReResult = result
                            };
                            new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                            #endregion
                        }
                        else
                        {
                            for (int i = 0; i < ProductTypeModel.AdminName.Count; i++)
                            {
                                sendNum = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN).Telephone;
                                string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】";

                                Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                                #region  短信日志
                                Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                {
                                    TelCode  = sendNum,
                                    MsgText  = Msg,
                                    ReResult = result
                                };
                                new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                #endregion
                            }
                        }
                        if (result == "成功")
                        {
                            return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!已通知客服人员!"));
                        }
                        return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!"));
                    }
                    return(UtilsCommons.AjaxReturnJson("0", "操作失败!"));
                }
                else
                {
                    return(UtilsCommons.AjaxReturnJson("0", "操作失败,请登陆后重新操作... ..."));
                }
            }
            return(UtilsCommons.AjaxReturnJson("0", "操作失败,此产品已经下架... ..."));
        }
예제 #29
0
        /// <summary>
        /// 拼接价格组成表格
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        private string GetPriceStandardTable(IList <EyouSoft.Model.TourStructure.MTourPriceStandard> list)
        {
            StringBuilder sb = new StringBuilder();

            if (list != null && list.Count > 0)
            {
                #region 拼接表头
                sb.Append("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='list_2'>");
                sb.Append("<tr>");
                sb.Append("<th align='center'>标准</th>");
                #endregion
                //统计是否是第一次循环intcount=0为第一次加载 循环表头 intcount=1第二次 不循环表头
                int intcount = 0;
                //循环报价标准
                foreach (MTourPriceStandard item in list)
                {
                    if (intcount == 0)
                    {
                        sb.Append("<th align='center'>成人价</th><th align='center'>儿童价</th>");
                        sb.Append("<tr>");
                        intcount = 1;
                    }
                    //循环表体数据
                    foreach (MTourPriceLevel modelMTourPriceLevel in item.PriceLevel)
                    {
                        if (modelMTourPriceLevel.LevType == EyouSoft.Model.EnumType.ComStructure.LevType.门市价)
                        {
                            sb.Append("<td align='center'>" + item.StandardName + "</td><td align='center'>" + UtilsCommons.GetMoneyString(modelMTourPriceLevel.AdultPrice, ProviderToMoney) + "</td><td align='center'>" + UtilsCommons.GetMoneyString(modelMTourPriceLevel.ChildPrice, ProviderToMoney) + "</td>");
                        }
                    }
                    sb.Append("</tr>");
                }
                sb.Append("</table>");
            }
            return(sb.ToString());
        }
예제 #30
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            BFinance bll    = new BFinance();
            string   planId = Utils.GetQueryStringValue("planID");

            if (planId != "")
            {
                //支出项目基本信息
                MPayRegister model = bll.GetPayRegisterBaseByPlanId(planId);
                if (model != null)
                {
                    lbl_listTitle.Text  = "计调项:" + model.PlanTyp + "   单位名称:" + model.Supplier + "   结算金额:" + UtilsCommons.GetMoneyString(model.Payable, ProviderToMoney);
                    lbl_listTitle.Text += "   已付金额" + UtilsCommons.GetMoneyString(model.Paid, ProviderToMoney) + "   未付金额:" + UtilsCommons.GetMoneyString(model.Unpaid, ProviderToMoney);

                    if (model.PaymentType == EyouSoft.Model.EnumType.PlanStructure.Payment.导游现付)
                    {
                        this.phdAdd.Visible = false;
                    }
                }
                //支出项目登记列表
                IList <MRegister> ls = bll.GetPayRegisterLstByPlanId(planId);
                if (ls != null && ls.Count > 0)
                {
                    rpt_list.DataSource = ls;
                    rpt_list.DataBind();
                }
            }
        }