public void InitView()
    {
        int          t_zhuyuan_id = Int32.Parse(Request.QueryString["t_zhuyuan_id"]);
        ZhuyuanModel zhuyuanModel = ZhuyuanLogic.GetZhuyuanInfoById(t_zhuyuan_id);

        this.Name.Text       = zhuyuanModel.getName();
        this.Sex.Text        = zhuyuanModel.getSex();
        this.Age.Text        = zhuyuanModel.getAge().ToString();
        this.RoomNo.Text     = zhuyuanModel.getRoomNo();
        this.ArriveTime.Text = zhuyuanModel.getArriveTime().ToString();
    }
Пример #2
0
        public bool AddZhuyuanInfo(ZhuyuanModel zhuyuanModel)
        {
            string sqlString = "insert into [t_zhuyuan] (name,sex,age,roomNo,arriveTime,isLeave,leaveTime,money,checkinOperator,checkoutOperator) values (";

            sqlString += SqlString.GetQuotedString(zhuyuanModel.getName()) + ",";
            sqlString += SqlString.GetQuotedString(zhuyuanModel.getSex()) + ",";
            sqlString += zhuyuanModel.getAge() + ",";
            sqlString += SqlString.GetQuotedString(zhuyuanModel.getRoomNo()) + ",";
            sqlString += "'" + zhuyuanModel.getArriveTime() + "',";
            sqlString += zhuyuanModel.getIsLeave() + ",";
            sqlString += "'" + zhuyuanModel.getLeaveTime() + "',";
            sqlString += zhuyuanModel.getMoney() + ",";
            sqlString += SqlString.GetQuotedString(zhuyuanModel.getCheckinOperator()) + ",";
            sqlString += SqlString.GetQuotedString(zhuyuanModel.getCheckoutOperator()) + ")";

            DataBase db = new DataBase();

            if (db.InsertOrUpdate(sqlString) < 0)
            {
                this.errMessage = "登记病人住院信息发生了错误!";
                return(false);
            }
            return(true);
        }