/// <summary>
        /// Description : Delete History of employee
        /// Written By : Danbi Seo
        /// Date Written : 2016.03.22
        ///
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public ActionResult Delete(EmpInfoEnt ent)
        {
            ComnData cd   = new ComnData();
            RsltEnt  rslt = cd.Update(ent, "D", "EmpInfo.DelEmp");

            return(Json(rslt));
        }
        /// <summary>
        /// Description : Insert ot update employee information
        /// Written By : Danbi Seo
        /// Date Written : 2016.01.20
        ///
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public ActionResult UpdateBiz(EmpInfoEnt ent)
        {
            ent.userIP = Request.UserHostAddress;
            ent.pStdDt = ent.pStdDt.Replace(",", "");

            ComnData cd      = new ComnData();
            RsltEnt  rslt    = new RsltEnt();
            string   strMode = ent.hdnMode;

            #region attach file
            HttpPostedFileBase flePto = Request.Files["flePto"];

            // Uploadig photo
            if (flePto != null)
            {
                string strSavePath = Config.GetFileDir("CM_EMP_MST.PTO_NM", Server.MapPath("/")), strFullPath;
                if (flePto.FileName.Length > 0)
                {
                    strFullPath = Config.GetUniqueFileName(strSavePath, flePto.FileName);
                    flePto.SaveAs(strFullPath);

                    ent.pPtoNm = strFullPath.Substring(strFullPath.LastIndexOf("\\") + 1);
                }
            }
            #endregion

            #region
            if (ent.hdnMode == "I")
            {
                rslt = cd.Update(ent, strMode, "EmpInfo.InsEmp");
                if (rslt.bRslt)
                {   //CM_EMP_HST procedure
                    rslt.bRslt = data.GetEmpHstBiz(ent);
                }
            }
            else if (ent.hdnMode == "U")
            {
                rslt = cd.Update(ent, strMode, "EmpInfo.UpdEmp");
            }
            else if (ent.hdnMode == "H") // adding history
            {
                if (ent.pPtoNm == "")    // original image INSERT
                {
                    ent.pPtoNm = ent.hdnPto;
                }
                rslt = cd.Update(ent, strMode, "EmpInfo.InsEmp");
            }
            #endregion
            return(Json(rslt, "text/json"));
        }
        /// <summary>
        /// Description : Extra information (exam info, consulting info) Input_biz
        /// Written By : Danbi Seo
        /// Date Written : 2016.06.25
        ///
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public JsonResult AddInfoInputBiz(EmpInfoEnt ent)
        {
            ent.userIP = Request.UserHostAddress;
            ComnData cd = new ComnData();

            string strMapUrl = string.Empty;

            switch (ent.pTabDvs)
            {
            case "exam":
                ent.txtExamDt = ent.txtExamDt.Replace("-", "");
                switch (ent.hdnAddInfoMode)
                {
                case "I":
                    ent.txtExamSeq = data.GetMaxExamSeq(ent);
                    strMapUrl      = "EmpInfo.InsExam";
                    break;

                case "U":
                    strMapUrl = "EmpInfo.UpdExam";
                    break;

                case "D":
                    strMapUrl = "EmpInfo.DelExam";
                    break;

                default:
                    break;
                }
                break;

            case "cnsl":
                ent.txtCnslDt = ent.txtCnslDt.Replace("-", "");
                switch (ent.hdnAddInfoMode)
                {
                case "I":
                    ent.txtCnslSeq = data.GetMaxCnslSeq(ent);
                    strMapUrl      = "EmpInfo.InsCnsl";
                    break;

                case "U":
                    strMapUrl = "EmpInfo.UpdCnsl";
                    break;

                case "D":
                    strMapUrl = "EmpInfo.DelCnsl";
                    break;

                default:
                    break;
                }
                break;

            case "prs":
                ent.txtPrsDt = ent.txtPrsDt.Replace("-", "");
                switch (ent.hdnAddInfoMode)
                {
                case "I":
                    ent.txtPrsSeq = data.GetMaxPrsSeq(ent);
                    strMapUrl     = "EmpInfo.InsPrs";
                    break;

                case "U":
                    strMapUrl = "EmpInfo.UpdPrs";
                    break;

                case "D":
                    strMapUrl = "EmpInfo.DelPrs";
                    break;

                default:
                    break;
                }
                break;
            }
            RsltEnt rslt = cd.Update(ent, ent.hdnAddInfoMode, strMapUrl);

            return(Json(rslt));
        }