Ejemplo n.º 1
0
        public long InsertEntrprs(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
            {
                //사업자번호 체크
                string existYn = new EntrprsBiz().SelectEntrprsBizrnoExistYn(entrprsT.Bizrno);
                if (existYn == "Y")
                {
                    throw new Exception("이미 등록된 사업자번호입니다.");
                }
                entrprsSn = entrprsDac.InsertEntrprs(entrprsT);

                //기업주소 정보 INSERT
                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);
                    }
                }

                Commit();
            }
            catch (Exception e)
            {
                this.RollBack();
                throw e;
            }

            return entrprsSn;
        }
Ejemplo n.º 2
0
        public ActionResult EntrprsMemberRegist(string companyNm, string bizrno, string existYn)
        {
            EntrprsT entrprsT = null;
            bizrno = bizrno.Replace("-", "");
            if (existYn == "Y")
            {
                entrprsT = new EntrprsBiz().SelectEntrprsOfBizrno(bizrno);
            }
            else
            {
                entrprsT = new EntrprsT();
                entrprsT.EntrprsNm = companyNm;
                entrprsT.Bizrno = bizrno;
            }

            //지역전화번호[AC016000] 공통코드 조회
            IList<CmmnCodeT> telnoList = new CommonBiz().SelectCmmnCodeList("AC016000");

            //핸드폰번호[AC017000] 공통코드 조회
            IList<CmmnCodeT> mbtlnumList = new CommonBiz().SelectCmmnCodeList("AC017000");

            //이메일종류[AC018000] 공통코드 조회
            IList<CmmnCodeT> emailList = new CommonBiz().SelectCmmnCodeList("AC018000");

            //기업주소구분코드[AC002000] 공통코드 조회
            IList<CmmnCodeT> entrprsAdresSeCodeList = new CommonBiz().SelectCmmnCodeList("AC002000");

            JoinMembPageT joinMembPageT = new JoinMembPageT();
            joinMembPageT.TelnoList = telnoList;
            joinMembPageT.MbtlnumList = mbtlnumList;
            joinMembPageT.EmailList = emailList;
            joinMembPageT.EntrprsAdresSeCodeList = entrprsAdresSeCodeList;
            joinMembPageT.EntrprsT = entrprsT;

            return View(joinMembPageT);
        }
Ejemplo n.º 3
0
        public ActionResult LsftCnfirmAction(string userSeCode, string bizrno, string ipinNo)
        {
            bool isSuccess = true;
            string strMessage = "";
            string entrprsExistYn = "N";    //기업존재여부

            bizrno = bizrno.Replace("-", "");
            try
            {
                //TODO tokenId 확인

                if (userSeCode == "AC007001")
                {
                    //TODO IPIN 중복확인
                    string existYn = "N";
                    if (existYn == "Y")
                    {
                        throw new Exception("이미 가입한 회원입니다.");
                    }
                }
                else if (userSeCode == "AC007002")
                {
                    //기업회원
                    //----------------------------------------------------------------
                    // 사업자번호 체크하여 기존에 등록된 정보가 있는지 여부를 판별하여
                    // 기존에 정보가 존대한다면 해당 정보가 회원으로 설정되어 있는지 여부를 판별한다.
                    //----------------------------------------------------------------
                    string existYn = new EntrprsBiz().SelectEntrprsBizrnoExistYn(bizrno);
                    if (existYn == "Y")
                    {
                        //기업정보 검색
                        EntrprsT entrprsT = new EntrprsBiz().SelectEntrprsOfBizrno(bizrno);
                        if (entrprsT != null)
                        {
                            //회원여부 체크
                            if (entrprsT.MberAt == "Y")
                            {
                                throw new Exception("이미 회원가입한 사업자번호 입니다.");
                            }
                            else
                            {
                                entrprsExistYn = "Y";
                            }
                        }
                    }
                }
                else if (userSeCode == "AC007003")
                {
                    //기관회원 사업자번호 체크
                    /*
                    string existYn = new InsttBiz().SelectInsttBizrnoExistYn(bizrno);
                    if (existYn == "Y")
                    {
                        throw new Exception("이미 회원가입한 사업자번호 입니다.");
                    }
                     */
                }

                //TODO session에 토큰값 저장 후 암호화 하여 리턴

            }
            catch (Exception ex)
            {
                isSuccess = false;
                strMessage = ex.Message;
            }

            return Json(new { Success = isSuccess, Message = strMessage, EntrprsExistYn = entrprsExistYn }, JsonRequestBehavior.AllowGet);
        }