using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using NP.Model; using System.Collections; using NP.Base.Auth; using NP.Base.ENUM; namespace NP.Base.Controllers { public partial class FCommonController : NP.Base.BaseController { [HttpPost] public JsonResult BuyBook(int bkno, int pcnt, bool iscart) { if (iscart) { //장바구니 //장바구니에 기존들어있던 동일 교재 삭제 후 추가해야 함 var cart = new PayCart() { itemno = bkno, pcnt = pcnt, ptype = 2, userno = SUserInfo.UserNo, status = 1, uno = SUserInfo.UserNo, uip = GetUserIP() }; if (Dao.Save("pay.cart.in", cart) < 1) { return JsonBack(new JsonRtn() { code = -81 }); } return JsonOK(1); } return JsonOK(0); } [HttpPost] public JsonResult BuyCM(VMCourse vm) { if (vm.iscart==1) { //장바구니 Int64? fgno = (Int64?)null; if (Request.Files.GetMultiple("file1").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { fgno = SetFile(Request.Files.GetMultiple("file1").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "paycart", "fgno"); } //장바구니에 기존들어있던 동일 강좌/강좌교재 삭제 후 추가해야 함 var cart = new PayCart() { itemno = vm.cmno, isrefund = vm.isrefund, userno = SUserInfo.UserNo, pcnt = 1, status = 1, fgno = fgno, uno = SUserInfo.UserNo, uip = GetUserIP() }; if (!string.IsNullOrEmpty(vm.savedata)) { cart.Ds = new List() { }; cart.bknos = ""; foreach(var d in vm.savedata.Split(';')) { cart.bknos += "," + d.Split(':')[0]; cart.Ds.Add(new PayCart() { itemno = GetInt(d.Split(':')[0]), pcnt = GetInt(d.Split(':')[1]) }); } cart.bknos = cart.bknos.Substring(1); } Dao.Save("pay.cart.clear", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }); var carts = Dao.Get("pay.cart.check", new Hashtable() {{"userno" , SUserInfo.UserNo}, { "itemno", cart.itemno }, { "bknos", cart.bknos } }); if(carts.Count() > 0) { return JsonBack(new JsonRtn() { code = -81, obj = carts.First().itemname }); } return JsonOK(Dao.Save("pay.cart.in", cart)); } else { if (vm.isgroup == 0) { //개별결제는 개인정보 수정 및 계약서파일 저장 Int64? fgno = (Int64?)null; var isok = true; if (Request.Files.GetMultiple("file1").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { fgno = SetFile(Request.Files.GetMultiple("file1").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payitem", "fgno2"); if (fgno == null || fgno < 1){ isok = false; } } if (isok) { //개인정보 수정 var user = new Users() { usertype = 1, userno = SUserInfo.UserNo, asno = vm.asno < 1 ? (int?)null : vm.asno, email = vm.email, mobile = vm.mobile, depart = vm.depart, ccposition = vm.ccposition, uno = SUserInfo.UserNo, uip = GetUserIP() }; var telno = (vm.telno??"").Replace("-", ""); user.telno = telno.Length == 11 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 3), telno.Substring(3, 4), telno.Substring(7, 4)) : telno.Length == 10 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 3), telno.Substring(3, 3), telno.Substring(6, 4)) : telno.Length == 9 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 2), telno.Substring(2, 3), telno.Substring(5, 4)) : telno.Length == 8 ? string.Format("{0}-{1}", telno.Substring(0, 4), telno.Substring(4, 4)) : telno.Length == 7 ? string.Format("{0}-{1}", telno.Substring(0, 3), telno.Substring(3, 4)) : user.telno; var check = Dao.Get("users.checkuser", new Hashtable() { { "usernonot", SUserInfo.UserNo }, { "email", vm.email } }).First(); if (check < 9) { return JsonOK(check * -1); } LogSet(new ActLog() { logtype = 30, logtarget = 21, logdata = user.username, userno = user.userno, uno = SUserInfo.UserNo, uip = GetUserIP() }); if (Dao.Save("users.up", user) > 0) { if (vm.iscert == 1) { //자격증강좌 Int64? fgno2 = (Int64?)null; if (Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { fgno2 = SetFile(Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payitem", "fgno"); } //자격검정신청 //신청가능확인(기간,제한인원,동일강좌,유사강좌) var lects = Dao.Get("pay.cmcheck.forpay", new Hashtable() { { "cmno", vm.cmno }, { "userno", SUserInfo.UserNo } }); if (lects.Count() < 1) { //수강신청기간이 아님 return JsonBack(new JsonRtn() { code = 1000, msg = "수강신청기간이 아닙니다.", obj = 0 }); } else if (lects.Where(w => w.status > 0).Count() > 0) { return JsonBack(new JsonRtn() { code = 1000, msg = "이미 신청한 강좌입니다. [" + string.Join(", ", lects.Where(w => w.status > 0).Select(s => s.cname)) + "]", obj = 0 }); } else if (lects.Where(w => w.quota != 0 && w.quota <= w.countlect).Count() > 0) { return JsonBack(new JsonRtn() { code = 1000, msg = "제한인원을 초과한 강좌입니다. [" + string.Join(", ", lects.Where(w => w.quota != 0 && w.quota <= w.countlect).Select(s => s.cname)) + "]", obj = 0 }); } //pay, lect 삽입 var pay = new Pay() { uno = SUserInfo.UserNo, uip = GetUserIP(), userno = SUserInfo.UserNo, cmno = vm.cmno, fgno = fgno, isrebate=vm.isrefund, fgno2 = fgno2 }; Dao.Insert("pay.certpay", pay); if (pay.payno > 0) { int bcnt = 0; if (!string.IsNullOrEmpty(vm.savedata)) { pay.PIs = new List() { }; pay.inquery = "pis"; foreach(var s in vm.savedata.Split(';')) { bcnt++; pay.PIs.Add(new PayItem() { itemno = GetLong(s.Split(':')[0]), pcnt = GetInt(s.Split(':')[1]) }); } } if (Dao.Save("pay.certpayitem", pay) == bcnt+2) { return JsonOK(pay.payno); } } return JsonOK(0); } return JsonOK(fgno??0, true); } } } else { var lects = Dao.Get("pay.cmcheck.forgrouppay", new Hashtable() { { "cmno", Int32.Parse(vm.savedata3)},{ "userno", SUserInfo.UserNo} }); if(lects.Where(w=>w.cmno == Int32.Parse(vm.savedata3)).First().quota != 0 && (vm.savedata2.Split(',').Count() + lects.Where(w=>w.cmno == Int32.Parse(vm.savedata3)).Count()) > lects.Where(w => w.cmno == Int32.Parse(vm.savedata3)).First().quota) { return JsonBack(new JsonRtn() { code = -82, msg = "신청인원이 제한인원을 초과했습니다. [" + "제한인원 : " + lects.Where(w => w.cmno == Int32.Parse(vm.savedata3)).First().quota + "명]", obj = 0 }); } //단체결제는 직장만 저장 return JsonOK(Dao.Save("users.asno.save", new Hashtable() { { "userno", SUserInfo.UserNo }, { "asno", vm.asno } })); } } return JsonOK(0); } [HttpPost] public JsonResult PayStart(VMPay vm) { vm.PPLog = Dao.Get("pay.pplogs", new Hashtable() { { "pplno", vm.pplno }, { "userno", SUserInfo.UserNo } }).First(); vm.PayItems = new List() { }; foreach (var d in vm.items.Split(';')) { var dd = d.Split(':'); vm.PayItems.Add(new PayItem() { ptype = GetInt(dd[0]), itemno = GetLong(dd[1]), pcnt = GetInt(dd[2]), userno = vm.isgroup == 0 || dd[0] == "2" ? SUserInfo.UserNo : GetInt(dd[3]), isrebate = GetInt(dd[4]), fgno = dd[5] == "0" ? (Int64?)null : GetLong(dd[5]), rbank = vm.PPLog.rbankname, rbankaccnum = vm.PPLog.rbankacc, tbankuser = vm.PPLog.rbankowner }); } if (vm.isgroup == 1) { } else { if (vm.PayItems.Where(w => w.ptype == 0).Count() > 0) { //개별 검증 //신청가능확인(기간,제한인원,동일강좌,유사강좌) var lects = Dao.Get("pay.cmcheck.forpay", new Hashtable() { { "cmnos", string.Join(",", vm.PayItems.Where(w => w.ptype == 0).Select(s => s.itemno)) }, { "userno", SUserInfo.UserNo } }); if (lects.Count() < 1) { //수강신청기간이 아님 return JsonBack(new JsonRtn() { code = 1000, msg = "수강신청기간이 아닙니다.", obj = 0 }); } else if (lects.Where(w => w.status > 0).Count() > 0) { return JsonBack(new JsonRtn() { code = 1000, msg = "이미 신청한 강좌입니다. [" + string.Join(", ", lects.Where(w => w.status > 0).Select(s => s.cname)) + "]", obj = 0 }); } else if (lects.Where(w => w.quota != 0 && w.quota <= w.countlect).Count() > 0) { return JsonBack(new JsonRtn() { code = 1000, msg = "제한인원을 초과한 강좌입니다. [" + string.Join(", ", lects.Where(w => w.quota != 0 && w.quota <= w.countlect).Select(s => s.cname)) + "]", obj = 0 }); } else if (lects.Select(s => s.cmno).Count() != vm.PayItems.Where(w => w.ptype == 0).Count()) { return JsonBack(new JsonRtn() { code = 1000, msg = "구매상품이 올바르지 않습니다.", obj = 0 }); } foreach (var pi in vm.PayItems.Where(w => w.ptype == 0)) { pi.rstime = lects.Where(w => w.cmno == pi.itemno).First().rstime; pi.retime = lects.Where(w => w.cmno == pi.itemno).First().retime; pi.orgamt = lects.Where(w => w.cmno == pi.itemno).First().infee; pi.discamt = lects.Where(w => w.cmno == pi.itemno).First().infee - lects.Where(w => w.cmno == pi.itemno).First().payamt; pi.payamt = lects.Where(w => w.cmno == pi.itemno).First().payamt; } } } //교재확인 if (!vm.ispaycert && vm.PayItems.Where(w => w.ptype == 2).Count() > 0) { var books = Dao.Get("cm.books", new Hashtable() { { "bknos", string.Join(",", vm.PayItems.Where(w => w.ptype == 2).Select(s => s.itemno)) } }); if (books.Count() != vm.PayItems.Where(w => w.ptype == 2).Count()) { return JsonBack(new JsonRtn() { code = 1000, msg = "구매상품이 올바르지 않습니다.", obj = 0 }); } foreach (var pi in vm.PayItems.Where(w => w.ptype == 2)) { var b = books.Where(w => w.bkno == pi.itemno).First(); pi.itemname = b.bkname; pi.orgamt = pi.payamt = b.price * (pi.pcnt < 1 ? 1 : pi.pcnt); } } if (vm.ispaycert) { //자격증강좌 결제 시작 //vm.Pay = new Pay() //{ // payno = vm.payno, // ptype = vm.ptype, // isdvr = vm.PayItems.Where(w => w.ptype == 2).Count() > 0 ? 1 : 0, // uno = SUserInfo.UserNo, // uip = GetUserIP(), // userno = SUserInfo.UserNo, // deliamt = vm.isdvr == 1 && vm.PayItems.Where(w => w.ptype == 2).Count() > 0 ? GetInt(GetConfig("deliveramt")) : 0 //}; //if (vm.Pay.ptype == 3) //{ // //가상계좌 결제 시 ?일동안만 입금가능 / 수강신청중 빠른 것 // vm.Pay.paylimit = Convert.ToDateTime(DateTime.Now.AddDays(paylimitday).ToString("yyyy-MM-dd")).AddSeconds(-1); // //if (vm.PayItems.Where(w => w.ptype == 4).First().retime < vm.Pay.paylimit) // //{ // // vm.Pay.paylimit = Convert.ToDateTime(vm.PayItems.Where(w => w.ptype == 4).First().retime.Value.AddDays(1).ToString("yyyy-MM-dd")).AddSeconds(-1); // //} // vm.Pay.acceptmethod = "vbank(" + vm.Pay.paylimit.Value.ToString("yyyyMMddHHmm") + ")"; //} //if (Dao.Save("pay.paycert.paystart", vm.Pay) > 0) //{ // vm.Pay.payamt = vm.PayItems.Sum(s => s.payamt2); // if (vm.Pay.isdvr == 1) // { // vm.Pay.payamt += GetInt(GetConfig("deliveramt")); // try // { // vm.PayDVR.payno = vm.Pay.payno; // vm.PayDVR.isdvr = vm.isdvr; // vm.PayDVR.uno = SUserInfo.UserNo; vm.PayDVR.uip = GetUserIP(); // Dao.Save("pay.paydvr.in", vm.PayDVR); // } // catch (Exception exx) { SetError("배송정보입력오류: " + vm.Pay.payno + ": " + exx.Message); } // } // var pginfos = GetConfig("pginfo").Split('|'); // string timeTemp = "" + DateTime.UtcNow.Subtract(DateTime.MinValue.AddYears(1969)).TotalMilliseconds; // vm.Pay.timestamp = timeTemp.Split('.')[0]; // System.Security.Cryptography.SHA256Managed sha256Managed = new System.Security.Cryptography.SHA256Managed(); // vm.Pay.signature = ComputeHash(string.Format("oid={0}&price={1}×tamp={2}", pginfos[4] + vm.Pay.payno, vm.Pay.payamt, vm.Pay.timestamp)); // vm.Pay.oid2 = pginfos[4]; // return JsonBack(new JsonRtn() { code = 1000, obj = vm.Pay }); //} } else if (vm.ispayexam) { //자격증시험 결제 진행 //vm.Pay = new Pay() //{ // ptype = vm.ptype, // isexam = 1, // uno = SUserInfo.UserNo, // uip = GetUserIP(), // ispg = 1, // userno = SUserInfo.UserNo, // orgamt = vm.PayItems.Sum(s => s.orgamt), // discamt = vm.PayItems.Sum(s => s.discamt), // payamt = vm.PayItems.Sum(s => s.payamt), // PIs = vm.PayItems //}; //if (vm.Pay.ptype == 3) //{ // //가상계좌 결제 시 ?일동안만 입금가능 / 수강신청중 빠른 것 // vm.Pay.paylimit = Convert.ToDateTime(DateTime.Now.AddDays(paylimitday).ToString("yyyy-MM-dd")).AddSeconds(-1); // //if (vm.PayItems.Where(w => w.retime != null && w.retime < vm.Pay.paylimit).Count() > 0) // //{ // // vm.Pay.paylimit = Convert.ToDateTime(vm.PayItems.Where(w => w.retime != null && w.retime < vm.Pay.paylimit).Min(m => m.retime).Value.AddDays(1).ToString("yyyy-MM-dd")).AddSeconds(-1); // //} // vm.Pay.acceptmethod = "vbank(" + vm.Pay.paylimit.Value.ToString("yyyyMMddHHmm") + ")"; //} //if (Dao.PayIn(vm.Pay) > 0) //{ // var pginfos = GetConfig("pginfo").Split('|'); // string timeTemp = "" + DateTime.UtcNow.Subtract(DateTime.MinValue.AddYears(1969)).TotalMilliseconds; // vm.Pay.timestamp = timeTemp.Split('.')[0]; // System.Security.Cryptography.SHA256Managed sha256Managed = new System.Security.Cryptography.SHA256Managed(); // vm.Pay.signature = ComputeHash(string.Format("oid={0}&price={1}×tamp={2}", pginfos[4] + vm.Pay.payno, vm.Pay.payamt, vm.Pay.timestamp)); // vm.Pay.oid2 = pginfos[4]; // return JsonBack(new JsonRtn() { code = 1000, obj = vm.Pay }); //} } else { vm.Pay = new Pay() { ptype = vm.ptype, isdvr = vm.PayItems.Where(w => w.ptype == 2).Count() > 0 ? 1 : 0, uno = SUserInfo.UserNo, uip = GetUserIP(), ispg = 1, isexam = vm.ispaycart ? 2 : 0, isgroup = vm.isgroup, userno = SUserInfo.UserNo, orgamt = vm.PayItems.Sum(s => s.orgamt), discamt = vm.PayItems.Sum(s => s.discamt), deliamt = vm.isdvr == 1 && vm.PayItems.Where(w => w.ptype == 2).Count() > 0 ? GetInt(GetConfig("deliveramt")) : 0, payamt = vm.PayItems.Sum(s => s.payamt) + (vm.isdvr == 1 && vm.PayItems.Where(w => w.ptype == 2).Count() > 0 ? GetInt(GetConfig("deliveramt")) : 0), iscashrct = vm.ptype == 1 ? 0 : vm.iscashrct, cashrcthp = vm.ptype == 1 ? null : vm.cashrcthp, pplno = vm.pplno, PIs = vm.PayItems }; if (vm.Pay.isdvr == 1) { //vm.PayDVR.isdvr = vm.isdvr; //vm.Pay.PayDVR = vm.PayDVR; } if (vm.Pay.ptype == 3 && vm.Pay.payamt > 0) { //0원 강좌는 제외 //가상계좌 결제 시 ?일동안만 입금가능 / 수강신청중 빠른 것 vm.Pay.paylimit = Convert.ToDateTime(DateTime.Now.AddDays(paylimitday).ToString("yyyy-MM-dd")).AddSeconds(-1); //if (vm.PayItems.Where(w => w.retime != null && w.retime < vm.Pay.paylimit).Count() > 0) //{ // vm.Pay.paylimit = Convert.ToDateTime(vm.PayItems.Where(w => w.retime != null && w.retime < vm.Pay.paylimit).Min(m => m.retime).Value.AddDays(1).ToString("yyyy-MM-dd")).AddSeconds(-1); //} vm.Pay.acceptmethod = "vbank(" + vm.Pay.paylimit.Value.ToString("yyyyMMddHHmm") + ")"; } if (vm.Pay.payamt < 1) { vm.Pay.ptype = 6; } else if (vm.Pay.ptype == 6 && vm.Pay.payamt > 0) { vm.Pay.ptype = 1; } if (Dao.PayIn(vm.Pay) > 0) { var pginfos = GetConfig("pginfo").Split('|'); string timeTemp = "" + DateTime.UtcNow.Subtract(DateTime.MinValue.AddYears(1969)).TotalMilliseconds; vm.Pay.timestamp = timeTemp.Split('.')[0]; System.Security.Cryptography.SHA256Managed sha256Managed = new System.Security.Cryptography.SHA256Managed(); vm.Pay.signature = ComputeHash(string.Format("oid={0}&price={1}×tamp={2}", GetConfig("PAYMENT_CLASSIFICATION") + vm.Pay.payno, vm.Pay.payamt, vm.Pay.timestamp)); vm.Pay.oid2 = GetConfig("PAYMENT_CLASSIFICATION"); return JsonBack(new JsonRtn() { code = 1000, obj = vm.Pay }); } } return JsonBack(new JsonRtn() { code = 1000, obj = 0, msg = "구매상품이 올바르지 않습니다." }); } [HttpPost] public JsonResult PayCancel(Int64 payno) { return JsonOK(Dao.Save("pay.paycancel", new Hashtable() { { "payno", payno }, { "userno", SUserInfo.UserNo }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } [HttpPost] public JsonResult PayCartDel(String pcnos) { return JsonOK(Dao.Save("pay.paycart.del", new Hashtable() { { "pcno" + (pcnos.Contains(",") ? "s" : ""), pcnos }, { "userno", SUserInfo.UserNo }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } [HttpPost] public JsonResult PayCartFlag(String pcnos) { return JsonOK(Dao.Save("pay.paycart.flag", new Hashtable() { { "pcno" + (pcnos.Contains(",") ? "s" : ""), pcnos }, { "userno", SUserInfo.UserNo }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } [HttpPost] public JsonResult PayItemGet(Int64 payno) { Pay pay = Dao.Get("pay.mypay", new Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", payno } }).FirstOrDefault(); PayItem payitem = Dao.Get("pay.mypayitem", new Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", payno } }).FirstOrDefault(); PayItem result = new PayItem() { payamt = pay.payamt, payoktime = pay.payoktime, ptype = pay.ptype, ispg = pay.ispg, itemname = payitem.itemname, payamt2 = payitem.payamt, pino = payitem.pino, payno = pay.payno }; if(payitem != null) { return JsonBack(new JsonRtn() {code = 1000,obj= result}); } return JsonOK(0); } [HttpPost] public JsonResult PayTaxGet(Int64 payno) { var rtn = new Hashtable() { }; var h = Dao.Get("pay.paytax.fornew", new Hashtable() { { "payno", payno }, { "userno", SUserInfo.UserNo } }).First(); rtn.Add("h", h); var d = Dao.Get("pay.paytax.fornewitem", new Hashtable() { { "payno", payno }, { "userno", SUserInfo.UserNo } }); if (h.isgroup == 1 && d.Where(w=>w.taxno < 1 && w.rstatus==0).Count() < 1) { d = new List() { }; } rtn.Add("d", d); return JsonBack(rtn); } [HttpPost] public JsonResult PayTaxSave(PayTax p) { p.uno = SUserInfo.UserNo; p.uip = GetUserIP(); if (Dao.Get("cr.paytaxes", new Hashtable() { { "payno", p.payno }, { "cno", SUserInfo.UserNo }, { "iscancel", 0 }}).Count() > 0) { return JsonBack(new JsonRtn() { code = -1 }); } Int64? fgno = (Int64?)null; if (Request.Files.GetMultiple("file1").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { fgno = SetFile(Request.Files.GetMultiple("file1").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "paycart", "fgno"); } p.fgno = fgno; p.brno = (p.brno ?? "").Replace("-", ""); p.grno = (p.grno ?? "").Replace("-", ""); Dao.Insert("pay.paytax.in", p); if (p.taxno > 0) { return JsonOK(Dao.Save("pay.paytaxitem.in", p)); } return JsonOK(0); } [HttpPost] public JsonResult PayRefundGet(Int64 payno) { var rtn = new Hashtable() { }; var h = Dao.Get("pay.pay", new Hashtable() { { "payno", payno }, { "userno", SUserInfo.UserNo },{"pstatus",1 },{ "rstatusnot",2} }).FirstOrDefault(); rtn.Add("h", h); if (h != null) { rtn.Add("d", Dao.Get("pay.payitem.forrefund", new Hashtable() { { "payno", payno }, { "userno", SUserInfo.UserNo } })); } else { rtn.Add("d", new List() { }); } return JsonBack(rtn); } [HttpPost] public JsonResult PayRfdSave(PayRfd p) { p.uno = SUserInfo.UserNo; p.uip = GetUserIP(); if (p.ptype == 1) { p.isowner = 1; } Dao.Insert("pay.payrfd.in", p); if (p.rfdno > 0) { return JsonOK(Dao.Save("pay.payrfditem.in", p)); } return JsonOK(0); } [HttpPost] public JsonResult GetOffPayUsers(String usernos) { return JsonBack(new JsonRtn() { code = 1000, obj = Dao.Get("users.users.foroffby", usernos) }); } [HttpPost] public JsonResult PayRfdSaveFinal(PayRfd p) { p.uno = SUserInfo.UserNo; p.uip = GetUserIP(); Int64? fgnor = (Int64?)null; if (Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { fgnor = SetFile(Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payrfd", "fgnor"); } Int64? fgnob = (Int64?)null; if (Request.Files.GetMultiple("file3").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { fgnob = SetFile(Request.Files.GetMultiple("file3").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payrfd", "fgnob"); } p.fgnor = fgnor; p.fgnob = fgnob; return JsonOK(Dao.Save("pay.payrfd.up", p)); } [HttpPost] public JsonResult PayRfdSelfCancel(PayRfd p) { p.uno = SUserInfo.UserNo; p.uip = GetUserIP(); p.rstatus = 4; //자진취소 return JsonOK(Dao.Save("pay.payrfdcancel.up", p)); } } }