Ejemplo n.º 1
0
        /// <summary> 
        /// 기업사용자 생성 
        /// </summary>  
        /// <param name="entrprsUserT">기업사용자 정보</param> 
        /// <returns>생성된 Row의 Key값</returns> 
        public void InsertEntrprsUser(EntrprsUserT entrprsUserT)
        {
            BeginTran();
            try
            {
                string existYn = new UserDac().SelectUserExistYn(entrprsUserT.UserId);
                if (existYn == "Y")
                {
                    // 사용자 ID 중복체크
                    throw new Exception("해당 사용자ID 는 이미 사용중입니다.");
                }

                // 사용자 생성
                UserT userT = new UserT();
                userT.UserId = entrprsUserT.UserId;
                userT.UserSeCode = "AC007002"; //사용자구분코드( 기업사용자: AC007002)

                new UserBiz().InsertUser(userT, "Y");

                // 기업사용자 INSERT
                new EntrprsUserDac().InsertEntrprsUser(entrprsUserT);

                Commit();
            }
            catch (Exception ex)
            {
                RollBack();
                throw (ex);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// ID,PW 찾기
 /// </summary>
 /// <param name="userT"></param>
 /// <returns></returns>
 public UserT FindIdPw(UserT userT)
 {
     string userId = new UserDac().SelectUserId(userT);
     if (userId != null && userId.Length > 0)
     {
         if (userT.FindSeCode == "PW")
         {
             //비밀번호 초기화
             InitUserPassword(userT.UserId);
         }
         userT.UserId = userId;
         userT.IsSuccess = true;
     }
     else
     {
         userT.IsSuccess = false;
     }
     return userT;
 }
Ejemplo n.º 3
0
        /// <summary> 
        /// 개인사용자 생성 
        /// </summary>  
        /// <param name="indvdlUserT">개인사용자 정보</param> 
        /// <returns>생성된 Row의 Key값</returns> 
        public void InsertIndvdlUser(IndvdlUserT indvdlUserT)
        {
            BeginTran();
            try
            {
                //회원가입을 통해 개인사용자를 생성하는 경우 아이핀 고유번호 중복체크
                if (!String.IsNullOrEmpty(indvdlUserT.IpinInnb))
                {
                    string ipinExistYn = new IndvdlUserDac().SelectIpinExistYn(indvdlUserT.IpinInnb);
                    if (ipinExistYn == "Y")
                    {
                        //아이핀 고유번호 중복체크
                        throw new Exception("해당 사용자는 이미 회원가입된 사용자입니다.");
                    }
                }

                string existYn = new UserDac().SelectUserExistYn(indvdlUserT.UserId);
                if (existYn == "Y")
                {
                    // 사용자 ID 중복체크
                    throw new Exception("해당 사용자ID 는 이미 사용중입니다.");
                }

                // 사용자 생성
                UserT userT = new UserT();
                userT.UserId = indvdlUserT.UserId;
                userT.Password = Security.Security.Encrypt(indvdlUserT.Password); //TODO 암호화
                //userT.Password = indvdlUserT.Password;
                userT.UserSeCode = "AC007001"; //사용자구분코드( 개인사용자: AC007001)

                new UserBiz().InsertUser(userT, "N");

                // 개인사용자 INSERT
                new IndvdlUserDac().InsertIndvdlUser(indvdlUserT);

                Commit();
            }
            catch (Exception ex)
            {
                RollBack();
                throw (ex);
            }
        }
Ejemplo n.º 4
0
        public int LoginCheck(string id, string pwd)
        {
            UserDac dac = new UserDac();

            return(dac.LoginCheck(id, pwd));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 기업회원가입 등록
        /// </summary>
        /// <param name="entrprsT"></param>
        public void JoinEntrprsMember(EntrprsT entrprsT)
        {
            EntrprsDac entrprsDac = new EntrprsDac();

            long entrprsSn = 0;

            // 제조업여부
            entrprsT.MfcrtrAt = string.IsNullOrEmpty(entrprsT.MfcrtrAt) ? "N" : "Y";

            // 수입업여부
            entrprsT.IrtbAt = string.IsNullOrEmpty(entrprsT.IrtbAt) ? "N" : "Y";

            // 수리업여부
            entrprsT.RepairIndutyAt = string.IsNullOrEmpty(entrprsT.RepairIndutyAt) ? "N" : "Y";

            // 계량증명업여부
            entrprsT.MesurProofIndutyAt = string.IsNullOrEmpty(entrprsT.MesurProofIndutyAt) ? "N" : "Y";

            // 계량기사용자여부
            entrprsT.MrnrEmplyrAt = string.IsNullOrEmpty(entrprsT.MrnrEmplyrAt) ? "N" : "Y";

            BeginTran();

            try
            {
                //기업정보 등록
                entrprsSn = entrprsDac.InsertEntrprs(entrprsT);

                if (entrprsT.entrprsAdresList != null && entrprsT.entrprsAdresList.Count > 0)
                {
                    for (int i = 0; i < entrprsT.entrprsAdresList.Count; i++)
                    {
                        EntrprsAdresT entrprsAdresT = entrprsT.entrprsAdresList[i];
                        entrprsAdresT.EntrprsSn = entrprsSn;

                        //기업주소정보 등록
                        entrprsDac.InsertEntrprsAdres(entrprsAdresT);
                    }
                }

                EntrprsUserT entrprsUserT = new EntrprsUserT();
                entrprsUserT.EntrprsSn = entrprsSn;
                entrprsUserT.UserId = entrprsT.UserId;
                entrprsUserT.UserNm = entrprsT.UserNm;
                entrprsUserT.Telno = entrprsT.Telno;
                entrprsUserT.Mbtlnum = entrprsT.Mbtlnum;
                entrprsUserT.EmailAdres = entrprsT.EmailAdres;
                entrprsUserT.MngrAt = "Y"; //관리자여부
                entrprsUserT.EntrprsUserSttusCode = "AC019003"; //기업사용자상태코드(승인대기로 설정)
                entrprsUserT.RegisterSeCode = "AC007002";   //등록자구분코드( 기업사용자: AC007002)
                entrprsUserT.RegisterId = entrprsT.UserId;
                entrprsUserT.UpdusrSeCode = "AC007002";     //수정자구분코드( 기업사용자: AC007002)
                entrprsUserT.UpdusrId = entrprsT.UserId;

                //기업사용자 ID 중복체크
                string existYn = new UserDac().SelectUserExistYn(entrprsUserT.UserId);
                if (existYn == "Y")
                {
                    // 사용자 ID 중복체크
                    throw new Exception("해당 사용자ID 는 이미 사용중입니다.");
                }

                // 사용자 생성
                UserT userT = new UserT();
                userT.UserId = entrprsUserT.UserId;
                userT.Password = Security.Security.Encrypt(entrprsT.Password);
                userT.UserSeCode = "AC007002"; //사용자구분코드( 기업사용자: AC007002)

                new UserBiz().InsertUser(userT, "N");

                // 기업사용자 INSERT
                new EntrprsUserDac().InsertEntrprsUser(entrprsUserT);

                Commit();
            }
            catch (Exception e)
            {
                this.RollBack();
                throw e;
            }
        }
Ejemplo n.º 6
0
 public static DataTable GetAllUsers()
 {
     return(UserDac.RetrieveAll().Tables[0]);
 }
Ejemplo n.º 7
0
 public DataTable Retrieve(String UserID)
 {
     return(UserDac.Retrieve(UserID).Tables[0]);
 }