Пример #1
0
        /// <summary>
        /// 团队收支总汇
        /// </summary>
        private void TourInOutSum(BPlan BLL, string tourID)
        {
            /*EyouSoft.Model.TourStructure.MOrderSum orders = new EyouSoft.Model.TourStructure.MOrderSum();
             * new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orders, tourID);
             * //团队收入
             * decimal tourMoneyIn = 0;
             * if (orders != null)
             * {
             *  tourMoneyIn = orders.ConfirmSettlementMoney;
             * }
             * //团队支出
             * decimal tourMoneyOut = 0;
             * IList<EyouSoft.Model.PlanStructure.MPlanBaseInfo> ls = BLL.GetList(tourID);
             * if (ls != null && ls.Count > 0)
             * {
             *  tourMoneyOut = ls.Sum(item => item.Confirmation);
             * }
             * //团队利润=团队收入-团队支出
             * lbl_tourMoney.Text = (tourMoneyIn - tourMoneyOut).ToString();
             * //利润率 = 团队利润/团队收入(不要把/100.00改成100 原因请参考.net基础之 加减乘除)
             * lbl_tourMoneyRate.Text = tourMoneyIn != 0 ? (((double)(Utils.GetDecimal(lbl_tourMoney.Text) / tourMoneyIn * 10000)) / 100.00).ToString("f2") + "%" : "0%";
             * //格式化团队利润
             * lbl_tourMoney.Text = UtilsCommons.GetMoneyString(lbl_tourMoney.Text, ProviderToMoney);
             * //格式化团队收入
             * lbl_tourMoneyIn.Text = UtilsCommons.GetMoneyString(tourMoneyIn, ProviderToMoney);
             * //格式化团队支出
             * lbl_tourMoneyOut.Text = UtilsCommons.GetMoneyString(tourMoneyOut, ProviderToMoney);*/

            var info = new EyouSoft.BLL.PlanStructure.BPlan().GetTourTotalInOut(tourID);

            this.lbl_tourMoneyIn.Text   = UtilsCommons.GetMoneyString(info.TourIncome + info.QiTaShouRu, ProviderToMoney);
            this.lbl_tourMoneyOut.Text  = UtilsCommons.GetMoneyString(info.TourOutlay, ProviderToMoney);
            this.lbl_tourMoney.Text     = UtilsCommons.GetMoneyString(info.TourProfit, ProviderToMoney);
            this.lbl_tourMoneyRate.Text = info.TourProRate.ToString("F2") + "%";
        }
Пример #2
0
        /// <summary>
        /// 团队收支总汇
        /// </summary>
        private void TourInOutSum()
        {
            /*//团队利润=团队收入-团队支出
             * lbl_tourMoney.Text = TourProfit.Value = (Utils.GetDecimal(lbl_tourMoneyIn.Text) - Utils.GetDecimal(lbl_tourMoneyOut.Text)).ToString();
             * //利润率 = 团队利润/团队收入(不要把/100.00改成100 原因请参考.net基础之 加减乘除)
             * lbl_tourMoneyRate.Text = Utils.GetDecimal(lbl_tourMoneyIn.Text) != 0 ? (((int)(Utils.GetDecimal(lbl_tourMoney.Text) / Utils.GetDecimal(lbl_tourMoneyIn.Text) * 10000)) / 100.00).ToString() + "%" : "0%";
             * //格式化团队利润
             * lbl_tourMoney.Text = UtilsCommons.GetMoneyString(lbl_tourMoney.Text, ProviderToMoney);
             * //格式化团队收入
             * lbl_tourMoneyIn.Text = UtilsCommons.GetMoneyString(lbl_tourMoneyIn.Text, ProviderToMoney);
             * //格式化团队支出
             * lbl_tourMoneyOut.Text = UtilsCommons.GetMoneyString(lbl_tourMoneyOut.Text, ProviderToMoney);*/

            var info = new EyouSoft.BLL.PlanStructure.BPlan().GetTourTotalInOut(Utils.GetQueryStringValue("tourId"));

            this.lbl_tourMoneyIn.Text   = UtilsCommons.GetMoneyString(info.TourIncome + info.QiTaShouRu, ProviderToMoney);
            this.lbl_tourMoneyOut.Text  = UtilsCommons.GetMoneyString(info.TourOutlay, ProviderToMoney);
            this.lbl_tourMoney.Text     = UtilsCommons.GetMoneyString(info.TourProfit, ProviderToMoney);
            this.lbl_tourMoneyRate.Text = info.TourProRate.ToString("F2") + "%";
        }
Пример #3
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", "操作失败"));
            }
        }