Ejemplo n.º 1
0
        public async Task <ActionResult> Post([FromBody] EmployProofModel employproof)
        {
            employproof.reg_date = DateTime.Now;
            await _employproof.Add(employproof);

            return(Ok());
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Put([FromBody] EmployProofModel employproof, int employee_proof_seq)
        {
            employproof.upd_date           = DateTime.Now;
            employproof.employee_proof_seq = employee_proof_seq;
            await _employproof.Update(employproof);

            return(Ok());
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Delete(int seq)
        {
            EmployProofModel employproof = new EmployProofModel
            {
                employee_proof_seq = seq
            };
            await _employproof.Delete(employproof);

            return(Ok());
        }
 public async Task Update(EmployProofModel employproofModel)
 {
     _context.Entry(employproofModel).Property(x => x.name).IsModified            = true;
     _context.Entry(employproofModel).Property(x => x.register_number).IsModified = true;
     _context.Entry(employproofModel).Property(x => x.home_address).IsModified    = true;
     _context.Entry(employproofModel).Property(x => x.phone_number).IsModified    = true;
     _context.Entry(employproofModel).Property(x => x.department).IsModified      = true;
     _context.Entry(employproofModel).Property(x => x.work_address).IsModified    = true;
     _context.Entry(employproofModel).Property(x => x.position).IsModified        = true;
     _context.Entry(employproofModel).Property(x => x.work_period).IsModified     = true;
     _context.Entry(employproofModel).Property(x => x.purpose).IsModified         = true;
     _context.Entry(employproofModel).Property(x => x.reg_date).IsModified        = true;
     _context.Entry(employproofModel).Property(x => x.upd_date).IsModified        = true;
     _context.Entry(employproofModel).Property(x => x.download_count).IsModified  = true;
     await _context.SaveChangesAsync();
 }
        public static string GetProofHTMLString(EmployProofModel employProof)
        {
            var name            = employProof.name;
            var register_number = employProof.register_number;
            var home_address    = employProof.home_address;
            var phone_number    = employProof.phone_number;

            var department   = employProof.department;
            var work_address = employProof.work_address;
            var position     = employProof.position;
            var work_period  = employProof.work_period;
            var purpose      = employProof.purpose;

            var blank = "test";

            var sb = new StringBuilder();

            sb.AppendFormat($@"
                        <html>
                          <head>
                           </head>
                            <body>
                            <div class='header'>
                                <img class='logo' src = ''></img>
                                <br />
                                <br />
                                <br />
                                <div class='title'>
                                    <h1>재직&nbsp증명서</h1>
                                </div>
                                <br />
                                <br />
                                <br />
                            </div>
            ");
            sb.AppendFormat($@"
                            <div class='content'>
                                <div class='divi-line'><span></span></div>
                                <h1>인적사항</h1>
                                <table >
                                    <tr class='br-black'>
                                        <td class='td-1'>이&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 름</td>
                                        <td class='td-2'>: {name}</td>
                                    </tr>
                                    <tr>
                                        <td>주민등록번호</td>
                                        <td>: {register_number}</td>
                                    </tr>
                                    <tr>
                                        <td>주&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 소</td>
                                        <td>: {home_address}</td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp연&nbsp &nbsp 락&nbsp &nbsp 처</td>
                                        <td>: {phone_number}</td>
                                    </tr>
                                </table>
                                <br />
                                <br />
                                <br />
                                <h1>재직사항</h1>
                                <table >
                                    <tr class='br-black'>
                                        <td class='td-1'>부&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 서</td>
                                        <td class='td-2'>: {department}</td>
                                    </tr>
                                    <tr>
                                        <td>주&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 소</td>
                                        <td>: {work_address}</td>
                                    </tr>
                                    <tr>
                                        <td>직&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 위</td>
                                        <td>: {position}</td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp재&nbsp 직&nbsp 기&nbsp 간</td>
                                        <td>: {work_period}</td>
                                    </tr>
                                    <tr class='br-black-end'>
                                        <td>&nbsp발&nbsp 급&nbsp 용&nbsp 도</td>
                                        <td>: {purpose}</td>
                                    </tr>
                                </table>
                                <br />
                                <br />
                                <h5>위와 같이 재직하고 있음을 증명합니다.</h5>
                                <br />
            ");


            sb.AppendFormat($@"
                                <div class = 'blank'><p>{blank}</p></div>
                                <br />
                                <br />
                                <br />
                                <ul class='caution'>
                                    <li>주&nbsp &nbsp 소 : {work_address}</li>
                                    <li>회사명 : (주)핀인사이트 </li>
                                    <li class = 'bot'>대표자 : 이&nbsp 민&nbsp 호 &nbsp &nbsp &nbsp &nbsp <img class = 'stemp' src = ''></img></li>
                                </ul>
                                <div class='divi-line'><span></span></div>
                                </div >
                                </body >
                                </html > ");

            return(sb.ToString());
        }
 public async Task Delete(EmployProofModel employproofModel)
 {
     _context.Entry(employproofModel).Property(x => x.name).IsModified = true;
     await _context.SaveChangesAsync();
 }