accountaccess.cs

来自「酒店管理系统,您酒店物业管理的好帮手」· CS 代码 · 共 39 行

CS
39
字号
using System;
using System.Collections.Generic;
using System.Text;
using Hotel.DAO;
using System.Data;
using Hotel.Entity;

namespace Hotel.Operation
{
    public class AccountAccess
    {
        GetDatabase objGetDatabase = null;
        //Account accountEntity = null;

        public AccountAccess()
        {
            objGetDatabase = new GetDatabase();
        }
        //通过帐号查清单
        public DataSet GetAccount(int num)
        {
            string sql = "select 项目=(select ItemName from ItemsPrice where ItemID="
                +"Account.ItemID),单价=(select Price from ItemsPrice where ItemId=Account.ItemID),"
                +"数量=ANumber,总价=Consume,折扣=Rebate,实价=EndPrice from Account where RoomUseID=" + num;
            DataSet ds = new DataSet();
            ds = objGetDatabase.GetDataSet(sql, "Account");
            return ds;
        }
        //添加消费
        public int AddAccount(Account ac)
        {
            string sql = "insert Account values("+ac.RoomUseID+","+ac.ItemID+","
                +ac.ANumber+","+ac.Consume+","+ac.Rebate+","+ac.EndPrice+",'"+ac.Remark+"')";
            int k = objGetDatabase.ExecuteSql(sql);
            return k;
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?