コード例 #1
0
        private void SaveRoomHistoryFee(ImportFee importFee, int SummaryID, SqlHelper helper, string AddMan)
        {
            PrintRoomFeeHistory printRoomFeeHistory = new PrintRoomFeeHistory();

            printRoomFeeHistory.Cost           = importFee.TotalPrice;
            printRoomFeeHistory.CostCapital    = Tools.CmycurD(printRoomFeeHistory.Cost);
            printRoomFeeHistory.RealCost       = printRoomFeeHistory.Cost;
            printRoomFeeHistory.PreChargeMoney = 0;
            printRoomFeeHistory.DiscountMoney  = 0;
            printRoomFeeHistory.RealMoneyCost1 = printRoomFeeHistory.Cost;
            printRoomFeeHistory.RealMoneyCost2 = 0;
            printRoomFeeHistory.AddMan         = AddMan;
            printRoomFeeHistory.AddTime        = DateTime.Now;
            int    OrderNumberID = 0;
            string PrintNumber   = Foresight.DataAccess.PrintRoomFeeHistory.GetLastestPrintNumber(importFee.RoomID, helper, out OrderNumberID);

            printRoomFeeHistory.PrintNumber     = PrintNumber;
            printRoomFeeHistory.OrderNumberID   = OrderNumberID;
            printRoomFeeHistory.ChargeBackMoney = 0;
            printRoomFeeHistory.ChargeTime      = DateTime.Now;
            printRoomFeeHistory.ChageType1      = 0;
            printRoomFeeHistory.IsCancel        = false;
            printRoomFeeHistory.Save(helper);
            RoomFeeHistory roomFee = new RoomFeeHistory();

            roomFee.ID                = importFee.ID;
            roomFee.RoomID            = importFee.RoomID;
            roomFee.UseCount          = importFee.TotalPoint;
            roomFee.StartTime         = importFee.StartTime;
            roomFee.EndTime           = importFee.EndTime;
            roomFee.Cost              = importFee.TotalPrice;
            roomFee.AddTime           = DateTime.Now;
            roomFee.AddUserName       = User.GetCurrentUserName();
            roomFee.IsCharged         = true;
            roomFee.ChargeID          = SummaryID;
            roomFee.IsStart           = true;
            roomFee.UnitPrice         = importFee.UnitPrice;
            roomFee.ImportFeeID       = importFee.ID;
            roomFee.ChargeFeeID       = 0;
            roomFee.ChargeFee         = 0;
            roomFee.RealCost          = roomFee.Cost;
            roomFee.Discount          = 0;
            roomFee.TotalRealCost     = roomFee.RealCost;
            roomFee.TotalDiscountCost = 0;
            roomFee.RestCost          = 0;
            roomFee.PrintID           = printRoomFeeHistory.ID;
            roomFee.ChargeTime        = DateTime.Now;
            roomFee.ChargeState       = 1;
            roomFee.IsImportFee       = true;
            roomFee.Save(helper);
        }
コード例 #2
0
        private static void SavePrintRoomFeeHistory(PrintRoomFeeHistory printRoomFeeHistory, int RoomID, decimal RealCost, string ChargeMan, SqlHelper helper, string RoomFullName, string RoomOwnerName, string Remark, string ChargeType, DateTime ChargeTime)
        {
            var    chargemoneytype = Foresight.DataAccess.ChargeMoneyType.GetChargeMoneyTypeByChargeName(ChargeType);
            int    ChargeType1     = chargemoneytype.ChargeTypeID;
            int    ChargeType2     = 0;
            int    OrderNumberID   = 0;
            string PrintNumber     = PrintRoomFeeHistory.GetLastestPrintNumber(OrderTypeNameDefine.chargefee.ToString(), RoomID, helper, out OrderNumberID);
            var    sys_ordernumber = Sys_OrderNumber.GetSys_OrderNumber(OrderNumberID, helper);

            printRoomFeeHistory.PrintNumber     = PrintNumber;
            printRoomFeeHistory.OrderNumberID   = sys_ordernumber != null ? sys_ordernumber.ID : 0;
            printRoomFeeHistory.OrderNumberType = sys_ordernumber != null ? sys_ordernumber.ChargeType : 1;
            decimal PreChargeMoney  = 0;
            decimal ChargeBackMoney = 0;
            decimal RealMoneyCost1  = RealCost;
            decimal RealMoneyCost2  = 0;
            decimal DiscountMoney   = 0;
            decimal money           = RealCost;
            string  MoneyDaXie      = Utility.Tools.CmycurD(RealCost);

            printRoomFeeHistory.Cost            = money;
            printRoomFeeHistory.CostCapital     = MoneyDaXie;
            printRoomFeeHistory.RealCost        = RealCost;
            printRoomFeeHistory.PreChargeMoney  = PreChargeMoney;
            printRoomFeeHistory.ChargeBackMoney = ChargeBackMoney;
            printRoomFeeHistory.RealMoneyCost1  = RealMoneyCost1;
            printRoomFeeHistory.RealMoneyCost2  = RealMoneyCost2;
            printRoomFeeHistory.DiscountMoney   = DiscountMoney;
            printRoomFeeHistory.ChargeMan       = ChargeMan;
            printRoomFeeHistory.ChargeTime      = ChargeTime;
            printRoomFeeHistory.Remark          = Remark;
            printRoomFeeHistory.ChageType1      = ChargeType1;
            printRoomFeeHistory.ChageType2      = ChargeType2;
            if (printRoomFeeHistory.AddTime == DateTime.MinValue)
            {
                printRoomFeeHistory.AddTime = DateTime.Now;
            }
            printRoomFeeHistory.WeiShuMore    = 0;
            printRoomFeeHistory.WeiShuConsume = 0;
            printRoomFeeHistory.RoomFullName  = RoomFullName;
            printRoomFeeHistory.RoomOwnerName = RoomOwnerName;
            printRoomFeeHistory.Save(helper);
        }
コード例 #3
0
ファイル: return.aspx.cs プロジェクト: sd009896/CustomerMall
        private void SavePrintRoomFeeHistory(PrintRoomFeeHistory printRoomFeeHistory, int RoomID, decimal RealCost, string ChargeMan, SqlHelper helper, string RoomFullName, string RoomOwnerName)
        {
            int      ChargeType1     = 7;
            int      ChargeType2     = 0;
            int      OrderNumberID   = 0;
            string   PrintNumber     = Foresight.DataAccess.PrintRoomFeeHistory.GetLastestPrintNumber(Foresight.DataAccess.OrderTypeNameDefine.chargefee.ToString(), RoomID, helper, out OrderNumberID);
            decimal  PreChargeMoney  = 0;
            decimal  ChargeBackMoney = 0;
            decimal  RealMoneyCost1  = RealCost;
            decimal  RealMoneyCost2  = 0;
            decimal  DiscountMoney   = 0;
            decimal  money           = RealCost;
            string   MoneyDaXie      = Tools.CmycurD(RealCost);
            DateTime ChargeTime      = DateTime.Now;
            string   Remark          = "汇收银支付";

            printRoomFeeHistory.PrintNumber     = PrintNumber;
            printRoomFeeHistory.OrderNumberID   = OrderNumberID;
            printRoomFeeHistory.Cost            = money;
            printRoomFeeHistory.CostCapital     = MoneyDaXie;
            printRoomFeeHistory.RealCost        = RealCost;
            printRoomFeeHistory.PreChargeMoney  = PreChargeMoney;
            printRoomFeeHistory.ChargeBackMoney = ChargeBackMoney;
            printRoomFeeHistory.RealMoneyCost1  = RealMoneyCost1;
            printRoomFeeHistory.RealMoneyCost2  = RealMoneyCost2;
            printRoomFeeHistory.DiscountMoney   = DiscountMoney;
            printRoomFeeHistory.ChargeMan       = ChargeMan;
            printRoomFeeHistory.ChargeTime      = ChargeTime;
            printRoomFeeHistory.Remark          = Remark;
            printRoomFeeHistory.ChageType1      = ChargeType1;
            printRoomFeeHistory.ChageType2      = ChargeType2;
            if (printRoomFeeHistory.AddTime == DateTime.MinValue)
            {
                printRoomFeeHistory.AddTime = DateTime.Now;
            }
            printRoomFeeHistory.WeiShuMore    = 0;
            printRoomFeeHistory.WeiShuConsume = 0;
            printRoomFeeHistory.RoomFullName  = RoomFullName;
            printRoomFeeHistory.RoomOwnerName = RoomOwnerName;
            printRoomFeeHistory.Save(helper);
        }