#region Copyright © 2015 CLIPSOFT Co.,Ltd. All Rights Reserved.
//
// All rights are reserved. Reproduction or transmission in whole or in part, 
// in any form or by any means, electronic, mechanical or otherwise, is 
// prohibited without the prior written consent of the copyright owner.
//
// Filename:SelectConsentSvcDac.cs
//
#endregion
using System;
using CLIP.eForm.Consent.Entity;
using CLIP.eForm.Server.Data;
using IBatisNet.DataMapper;
using System.Collections;
using System.Collections.Generic;

namespace CLIP.eForm.Consent.Dac {
  public class UserDac : DacBase {
    /// <summary>
    /// 사용자 정보를 반환
    /// 의사의 경우(like 03%) 전화번호 대신 엔존번호를 가져온다
    /// </summary>
    /// <param name="mapper">The mapper.</param>
    /// <param name="param">The parameter.</param>
    /// <returns></returns>
    public UserVO GetUserInfo(ISqlMapper mapper, Hashtable param) {
      return mapper.QueryForObject<UserVO>("GET_USER_INFO", param);
    }

    //public IList<UserFormSetVO> GetUserFormSet(ISqlMapper mapper, Hashtable param)
    //{
    //    return mapper.QueryForList<UserFormSetVO>("getUserFormSet", param);
    //}

    public int SetUserFormSet(ISqlMapper mapper, Hashtable param) {
      //return mapper.QueryForObject<Int32>("setUserFormSet", param);
      return (int) mapper.Insert("setUserFormSet", param);
    }

    public int DelUserFormSet(ISqlMapper mapper, Hashtable param) {
      //mapper.QueryForObject<Int32>("delUserFormSet", param);
      return mapper.Delete("delUserFormSet", param);
    }

    public IList<UserSignImageVO> GetUserSignImage(ISqlMapper mapper, Hashtable param) {
      return mapper.QueryForList<UserSignImageVO>("getUserSignImage", param);
    }

    public MobileLoginResult doLogin(ISqlMapper mapper, Hashtable param) {
      return mapper.QueryForObject<MobileLoginResult>("doLogin", param);
    }

    public IList<UserLoginDeptList> getUserdeptList(ISqlMapper mapper, Hashtable param) {
      return mapper.QueryForList<UserLoginDeptList>("getUserdeptList", param);
    }

    public MobileUserInfo getMobileUserInfo(ISqlMapper mapper, Hashtable param) {
      return mapper.QueryForObject<MobileUserInfo>("getMobileUserInfo", param);
    }

    public String GetBaseData(ISqlMapper mapper, Hashtable param) {
      return mapper.QueryForObject<String>("GET_BASE_DATA", param);
    }

    //public IList<ImageServerPropsVO> GetImageServerProps(ISqlMapper mapper, Hashtable param)
    //{
    //    return mapper.QueryForList<ImageServerPropsVO>("getImageServerProps", param);
    //}
  }
}
