using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using System.Security.Principal;
using System.Security.Cryptography;
using System.IO;
using System.Web.Mail;
using System.Web.Compilation;
using NP.Model;
using System.Net.Http;
using OfficeOpenXml;
using System.Collections;
using System.Net.Mail;
using System.Net;
namespace NP.Base
{
public partial class BaseController : Controller
{
public static String _sip;
public static String SIP
{
get
{
if (string.IsNullOrEmpty(_sip))
{
_sip = System.Web.Configuration.WebConfigurationManager.AppSettings["SIP"];
}
return _sip;
}
set
{
_sip = value;
}
}
public const String SUI = "NPTECHSUI";
public const String SUIT = "NPTECHSUIT";
public const String SUIF = "NPTECHSUIF";
public const String SUIFT = "NPTECHSUIFT";
public const String SUIFCROOM = "NPTECHSUIFCROOM";
public const String SUIFTCROOM = "NPTECHSUIFTCROOM";
private const String SUIDATE = "190517";
private bool? securev = null;
private bool IsSecure
{
get
{
if(securev == null)
{
securev = GetConfig("usessl") == "Y";
}
return securev.Value;
}
}
public NP.Model.SSUserInfo SUserInfo = new Model.SSUserInfo();
public void SSClear()
{
HttpContext.Session.Clear();
}
public NP.Dao.CommonDao Dao { get; set; }
//public NP.Sms.CommonDao Sms { get; set; }
///
/// 1: 관리자, 2: 사용자
///
public int TopMenuNo { get; set; }
public int PageRowCount { get; set; }
public String MainSubDomain { get; set; }
public String OffCode { get; set; }
public String OffCode1 { get; set; }
public String OffCode2 { get; set; }
public String OffCode3 { get; set; }
public String OnCode { get; set; }
public String OnCode1 { get; set; }
public String OnCode2 { get; set; }
public String OnCode3 { get; set; }
public String TestCode { get; set; }
public String TestCode1 { get; set; }
public String TestCode2 { get; set; }
public String TestCode3 { get; set; }
public int IsDupCheck { get; set; }
private static IList MENUS { get; set; }
protected int paylimitday = 31;
public IList GetMENUS
{
get
{
if (MENUS == null || MENUS.Count() < 1)
{
MENUS = Dao.Get("sys.menu.menuauth", new System.Collections.Hashtable() { { "topmenuno", TopMenuNo } });
}
return MENUS.ToList();
}
set
{
MENUS = value;
}
}
protected void ResetMenuBase()
{
MENUS = null;
}
public string GetUserIP()
{
string ipAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (!string.IsNullOrEmpty(ipAddress))
{
string[] addresses = ipAddress.Split(',');
if (addresses.Length != 0)
{
ipAddress = addresses[0];
}
}
if (string.IsNullOrEmpty(ipAddress))
{
ipAddress = Request.ServerVariables["REMOTE_ADDR"];
}
return ipAddress;
}
string EncKey = "YNP.net";
///
/// AES to Base64 암호화
///
///
///
public string EncString(string text, String enckey = "YNP.net")
{
byte[] inputText = System.Text.Encoding.Unicode.GetBytes(text);
byte[] passwordSalt = Encoding.ASCII.GetBytes(enckey.Length.ToString());
PasswordDeriveBytes secretKey = new PasswordDeriveBytes(enckey, passwordSalt);
Rijndael rijAlg = Rijndael.Create();
rijAlg.Key = secretKey.GetBytes(32);
rijAlg.IV = secretKey.GetBytes(16);
ICryptoTransform encryptor = rijAlg.CreateEncryptor(rijAlg.Key, rijAlg.IV);
System.IO.MemoryStream msEncrypt = new System.IO.MemoryStream();
CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write);
csEncrypt.Write(inputText, 0, inputText.Length);
csEncrypt.FlushFinalBlock();
byte[] encryptBytes = msEncrypt.ToArray();
msEncrypt.Close();
csEncrypt.Close();
// Base64
string encryptedData = Convert.ToBase64String(encryptBytes);
return encryptedData;
}
///
/// AES to Base64 복호화
///
///
///
public string DecString(string text)
{
byte[] encryptedData = Convert.FromBase64String(text);
byte[] passwordSalt = Encoding.ASCII.GetBytes(EncKey.Length.ToString());
PasswordDeriveBytes secretKey = new PasswordDeriveBytes(EncKey, passwordSalt);
Rijndael rijAlg = Rijndael.Create();
rijAlg.Key = secretKey.GetBytes(32);
rijAlg.IV = secretKey.GetBytes(16);
ICryptoTransform decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);
System.IO.MemoryStream msDecrypt = new System.IO.MemoryStream(encryptedData);
CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read);
int decryptedCount = csDecrypt.Read(encryptedData, 0, encryptedData.Length);
msDecrypt.Close();
try
{
csDecrypt.Close();
}
catch (Exception ex)
{
NP.Base.Logger.Error(ex.Message);
}
// Base64
string decryptedData = Encoding.Unicode.GetString(encryptedData, 0, decryptedCount);
return decryptedData;
}
///
/// ajax권한을 대체하기 위해 인증 키를 사용한다. ajax에서 처리하려는 데이터테이블을 대분자값으로 암호화하여 쿠키를 생성하고 검증한다.
///
///
///
public String Enc(String TABLEUPPER)
{
return EncString(TABLEUPPER);
}
public JsonResult JsonNoAuth()
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.NoAuth, msg = "권한부족" }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonNoData()
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.NoData, msg = "데이터없음" }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonNoApply()
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.NoApply, msg = "적용불가" }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonNoApply(Int64 rtn)
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.NoApply, msg = "적용불가", obj = rtn }, JsonRequestBehavior.AllowGet);
}
///
/// code = not null ? OK, obj = T
///
///
///
///
public JsonResult JsonBack(T t)
{
if (t == null)
{
return JsonNoData();
}
var j = Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = t }, JsonRequestBehavior.AllowGet);
j.MaxJsonLength = int.MaxValue;
return j;
}
public JsonResult JsonBack(List t)
{
if (t == null)
{
return JsonNoData();
}
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = t }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonBack(NP.Model.JsonRtn jr)
{
return Json(jr, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonBackList(IList ts)
{
var j = Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = ts }, JsonRequestBehavior.AllowGet);
j.MaxJsonLength = int.MaxValue;
return j;
}
public JsonResult JsonBackList(T ts)
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = ts }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonObj(T t)
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = t }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonOK(Int64 rtn, bool absOK = false)
{
//NP.Base.Logger.Debug(rtn.ToString());
if (rtn > 0 || absOK)
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = rtn }, JsonRequestBehavior.AllowGet);
}
return JsonNoApply(rtn);
}
public JsonResult JsonOK(string rtn, bool absOK)
{
if (!string.IsNullOrEmpty(rtn) || absOK)
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = rtn }, JsonRequestBehavior.AllowGet);
}
return JsonNoApply();
}
public JsonResult JsonOKObj(object o)
{
return Json(new NP.Model.JsonRtn() { code = (int)ENUM.JSONCode.OK, msg = "OK", obj = o }, JsonRequestBehavior.AllowGet);
}
public JsonResult JsonError(NP.Base.ENUM.JSONCode cd, String m, T t)
{
return Json(new NP.Model.JsonRtn() { code = (int)cd, msg = m, obj = t }, JsonRequestBehavior.AllowGet);
}
public String MakeSaveData(String sd, String spe = ",")
{
sd = (sd ?? "").Trim();
sd = sd.StartsWith(spe) ? sd.Substring(1, sd.Length - 1) : sd;
return sd.EndsWith(spe) ? sd.Substring(0, sd.Length - 1) : sd;
}
public DateTime GetDate(String d)
{
return Convert.ToDateTime(d);
}
public Int16 GetInt16(Object b)
{
return Convert.ToInt16(b);
}
public Int32 GetInt(Object b)
{
if (b == null || b.ToString().Trim() == "")
{ return 0; }
int i = 0;
bool r = int.TryParse(b.ToString(), out i);
if (!r)
{
return 0;
}
return i;
}
public Int64 GetLong(Object b)
{
if (b == null || b.ToString().Trim() == "") { return 0; }
return Convert.ToInt64(b);
}
public bool IsPost()
{
return Request.HttpMethod.ToUpper().Equals("POST");
}
public System.Collections.Hashtable SetHash(NP.Model.VMBase vm, bool appendSearch = true)
{
vm.pagenum = vm.pagenum ?? 1;
vm.pagerowcount = vm.pagerowcount < 1 ? (vm.isexceldown == 1 ? 100000 : PageRowCount) : vm.pagerowcount;
var rht = new System.Collections.Hashtable() { { "pagenum", vm.pagenum.Value }, { "pagerowsize", vm.pagerowcount } };
if (appendSearch)
{
rht.Add("searchtype", vm.searchtype);
rht.Add("searchtext", vm.searchtext);
}
return rht;
}
public List InitM()
{
return new List() { };
}
///
/// 그룹코드 콤마(,) 연결값으로 공통코드를 조회한다.
///
///
///
public IList GetComCodes(string cgroups)
{
return GetComCodes(cgroups, false);
}
public IList GetComCodes(string cgroups, bool isall)
{
cgroups = cgroups.Replace("'", "");
String gs = "";
foreach (var g in cgroups.Split(','))
{
gs += ",'" + g + "'";
}
gs = gs.StartsWith(",") ? gs.Substring(1) : gs;
return Dao.Get("sys.comcode.list", new System.Collections.Hashtable() { { "cgroups", gs }, {"all"+(isall?"":"x"), 1 } });
}
public NP.Model.ComCode GetComCode(int ccode)
{
return Dao.Get("sys.comcode.list", new System.Collections.Hashtable() { { "ccode", ccode } }).FirstOrDefault();
}
public IList GetComCodes(String CGroup, String PCode, String RefCode)
{
return Dao.Get("sys.comcode.list", new System.Collections.Hashtable() { { "cgroup", CGroup }, { "pcode", PCode }, { "refcode", RefCode } });
}
protected int GetCount(object list)
{
if (list == null)
{
return 0;
}
try
{
System.Reflection.PropertyInfo pi = list.GetType().GetProperty("pagetotalcount");
return (int)pi.GetValue(list, null);
}
catch (Exception ex)
{
ViewBag.Errors = ex.Message;
return 0;
}
}
protected String SingleEnc(String s)
{
return "SHA2('" + s + "', 512)";
}
protected long? SetFile2(System.Web.HttpFileCollectionBase files, long fgno, String tablename, String columnname, out Int64 fileno)
{
var fs = new List() { };
for (var i = 0; i < files.Count; i++)
{
if (!string.IsNullOrEmpty(files[i].FileName))
{
fs.Add((System.Web.HttpPostedFileBase)files[i]);
}
}
return SetFile2(fs, fgno, tablename, columnname, out fileno);
}
protected long? SetFile2(IList upFiles, long fgno, String tablename, String columnname, out Int64 fileno)
{
try
{
var fcnt = upFiles.Count;
if (fcnt < 1)
{
fileno = 0;
return (Int64?)null;
}
//만약 다중파일의 두 번째부터 이후의 파일들의 경우 파일그룹번호가 0 이면서 FGKey가 동일한 것이 DB에 있으면 그 FGNo를 사용한다.
var finfos = new NP.Model.File() { fgno = fgno, tablename = tablename, columnname = columnname, uno = SUserInfo.UserNo, uip = GetUserIP() };
finfos.Files = new List();
var _month = DateTime.Now.ToString("yyyyMM");
if (!System.IO.Directory.Exists(Server.MapPath(string.Format(@"{0}\{1}\{2}", NP.Model.Base.Files, _month, tablename))))
{
System.IO.Directory.CreateDirectory(Server.MapPath(string.Format(@"{0}\{1}\{2}", NP.Model.Base.Files, _month, tablename)));
}
int filelength = 0;
for (int i = 0; i < fcnt; i++)
{
if (!string.IsNullOrEmpty(upFiles[i].FileName))
{
filelength += upFiles[i].ContentLength;
string fileExt = System.IO.Path.GetExtension(upFiles[i].FileName.Split('\\').Last());
string fileFullPath = string.Format(@"\{0}\{1}\{2}_{3}{4}", _month, tablename, DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + SUserInfo.UserNo.ToString(), i, fileExt);
upFiles[i].SaveAs(Server.MapPath(NP.Model.Base.Files + fileFullPath));
finfos.Files.Add(new Model.File()
{
orgname = upFiles[i].FileName.Split('\\').Last(),
fileurl = fileFullPath.Replace("\\", "/"),
filesize = upFiles[i].ContentLength,
extension = fileExt.Replace(".", "")
});
}
}
if (finfos.Files.Count() > 0)
{
if (finfos.fgno < 1)
{
Dao.Insert("sys.filegroup.insert", finfos);
}
if (finfos.fgno > 0)
{
Dao.Insert("sys.filegroup.savereturn", finfos);
if (finfos.fileno > 0)
{
fileno = finfos.fileno;
return finfos.fgno;
}
}
}
fileno = 0;
return null;
}
catch (Exception ex)
{
Logger.TryError(ex.Message, ex);
fileno = 0;
return null;
}
}
protected long? SetFile(System.Web.HttpFileCollectionBase files, long fgno, String tablename, String columnname = "..", int fseq = 1, String FGKey = "XX")
{
var fs = new List() { };
for (var i = 0; i < files.Count; i++)
{
if (!string.IsNullOrEmpty(files[i].FileName))
{
fs.Add((System.Web.HttpPostedFileBase)files[i]);
}
}
return SetFile(fs, fgno, tablename, columnname, fseq, FGKey, false, false, 0);
}
protected long? SetFile(IList upFiles, long fgno, String tablename, String columnname, int fseq = 1, String FGKey = "XX", bool iscontents = false, bool issubject = false, int cmno = 0, long userno = 0)
{
try
{
var fcnt = upFiles.Count;
if (fcnt < 1)
{
return null;
}
//만약 다중파일의 두 번째부터 이후의 파일들의 경우 파일그룹번호가 0 이면서 FGKey가 동일한 것이 DB에 있으면 그 FGNo를 사용한다.
if (fgno < 1 && fseq > 1 && FGKey != "")
{
var fg = Dao.Get("sys.file.getfgnobyfgkey", FGKey).FirstOrDefault();
fgno = fg == null ? 0 : fg.fgno;
}
var finfos = new NP.Model.File() { fgno = fgno, tablename = tablename, columnname = columnname, uno = userno > 0 ? userno : SUserInfo.UserNo, uip = GetUserIP() };
finfos.Files = new List();
var _month = DateTime.Now.ToString("yyyyMM");
if (issubject)
{
if (!System.IO.Directory.Exists(Server.MapPath(string.Format(@"{0}\{1}", NP.Model.Base.Subjects, cmno))))
{
System.IO.Directory.CreateDirectory(Server.MapPath(string.Format(@"{0}\{1}", NP.Model.Base.Subjects, cmno)));
}
}
else if (!System.IO.Directory.Exists(Server.MapPath(string.Format(@"{0}\{1}\{2}", iscontents ? NP.Model.Base.Contents : NP.Model.Base.Files, _month, tablename))))
{
System.IO.Directory.CreateDirectory(Server.MapPath(string.Format(@"{0}\{1}\{2}", iscontents ? NP.Model.Base.Contents : NP.Model.Base.Files, _month, tablename)));
}
int filelength = 0;
for (int i = 0; i < fcnt; i++)
{
if (!string.IsNullOrEmpty(upFiles[i].FileName))
{
filelength += upFiles[i].ContentLength;
string fileExt = System.IO.Path.GetExtension(upFiles[i].FileName.Split('\\').Last());
string fileFullPath = issubject ? string.Format(@"\{0}\{1}_{2}_{3}{4}", cmno, SUserInfo.UserNo, DateTime.Now.ToString("yyyyMMddHHmmssfff"),i, fileExt) : string.Format(@"\{0}\{1}\{2}_{3}{4}", _month, tablename, DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + SUserInfo.UserNo.ToString(),i, fileExt);
upFiles[i].SaveAs(Server.MapPath((issubject ? NP.Model.Base.Subjects : iscontents ? NP.Model.Base.Contents : NP.Model.Base.Files) + fileFullPath));
finfos.Files.Add(new Model.File()
{
orgname = upFiles[i].FileName.Split('\\').Last(),
fileurl = fileFullPath.Replace("\\", "/"),
filesize = upFiles[i].ContentLength,
extension = fileExt.Replace(".", "")
});
}
}
if (finfos.Files.Count() > 0)
{
if (finfos.fgno < 1)
{
Dao.Insert("sys.filegroup.insert", finfos);
}
if (finfos.fgno > 0)
{
if (Dao.Save("sys.filegroup.save", finfos) > 0)
{
return finfos.fgno;
}
}
}
return null;
}
catch (Exception ex)
{
//Logger.TryError(ex.Message, ex);
SetError(ex.Message);
return null;
}
}
protected long SetFileSingle(System.Web.HttpPostedFileBase upFile, long fgno, String tablename, int fseq, String FGKey)
{
try
{
var fcnt = 1;
if (fcnt < 1)
{
return 0;
}
//만약 다중파일의 두 번째부터 이후의 파일들의 경우 파일그룹번호가 0 이면서 FGKey가 동일한 것이 DB에 있으면 그 FGNo를 사용한다.
if (fgno < 1 && fseq > 1 && FGKey != "")
{
var fg = Dao.Get("sys.file.getfgnobyfgkey", FGKey).FirstOrDefault();
fgno = fg == null ? 0 : fg.fgno;
}
var finfos = new NP.Model.File() { fgno = fgno, tablename = tablename, uno = SUserInfo.UserNo, uip = GetUserIP()/*, fgkey = FGKey*/ };
finfos.Files = new List();
var _month = DateTime.Now.ToString("yyyyMM");
if (!System.IO.Directory.Exists(Server.MapPath(string.Format(@"{0}\{1}{2}\{3}", NP.Model.Base.Files, "", _month, tablename))))
{
System.IO.Directory.CreateDirectory(Server.MapPath(string.Format(@"{0}\{1}{2}\{3}", NP.Model.Base.Files, "", _month, tablename)));
}
int filelength = 0;
for (int i = 0; i < fcnt; i++)
{
filelength += upFile.ContentLength;
string fileExt = System.IO.Path.GetExtension(upFile.FileName.Split('\\').Last());
string fileFullPath = string.Format(@"\{0}\{1}\{2}_{3}{4}", _month, tablename, DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + SUserInfo.UserNo.ToString(),i, fileExt);
upFile.SaveAs(Server.MapPath(NP.Model.Base.Files + fileFullPath));
finfos.Files.Add(new Model.File() { orgname = upFile.FileName.Split('\\').Last(), fileurl = fileFullPath.Replace("\\", "/"), filesize = upFile.ContentLength, extension = fileExt.Replace(".", "") });
}
if (finfos.Files.Count() > 0)
{
if (finfos.fgno < 1)
{
Dao.Insert("sys.filegroup.insert", finfos);
}
if (finfos.fgno > 0)
{
if (Dao.Save("sys.filegroup.save", finfos) > 0)
{
return finfos.fgno;
}
}
}
return 0;
}
catch (Exception ex)
{
Logger.TryError(ex.Message, ex);
return 0;
}
}
protected String SetFile2(System.Web.HttpFileCollectionBase upFiles, String tablename)
{
try
{
var fcnt = upFiles.Count;
if (fcnt < 1 || string.IsNullOrEmpty(upFiles[0].FileName))
{
return "";
}
//만약 다중파일의 두 번째부터 이후의 파일들의 경우 파일그룹번호가 0 이면서 FGKey가 동일한 것이 DB에 있으면 그 FGNo를 사용한다.
var finfos = new NP.Model.File() { fgno = 0, tablename = tablename, uno = SUserInfo.UserNo, uip = GetUserIP()/*, FGKey = ""*/ };
finfos.Files = new List();
var _month = DateTime.Now.ToString("yyyyMM");
if (!System.IO.Directory.Exists(Server.MapPath(string.Format(@"{0}\{1}\{2}", NP.Model.Base.Files, _month, tablename))))
{
System.IO.Directory.CreateDirectory(Server.MapPath(string.Format(@"{0}\{1}\{2}", NP.Model.Base.Files, _month, tablename)));
}
int filelength = 0;
String fileFullPath2 = "";
for (int i = 0; i < fcnt; i++)
{
filelength += upFiles[i].ContentLength;
string fileExt = System.IO.Path.GetExtension(upFiles[i].FileName.Split('\\').Last());
string fileFullPath = string.Format(@"\{0}\{1}\{2}_{3}{4}", _month, tablename, DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + SUserInfo.UserNo.ToString(),i, fileExt);
fileFullPath2 = fileFullPath;
upFiles[i].SaveAs(Server.MapPath(NP.Model.Base.Files + fileFullPath));
finfos.Files.Add(new Model.File() { orgname = upFiles[i].FileName.Split('\\').Last(), fileurl = fileFullPath.Replace("\\", "/"), filesize = upFiles[i].ContentLength, extension = fileExt.Replace(".", "") });
}
if (finfos.Files.Count() > 0)
{
if (finfos.fgno < 1)
{
Dao.Insert("sys.filegroup.insert", finfos);
}
if (finfos.fgno > 0)
{
//finfos.UserNoCallBack = NP.Model.Base.Files + fileFullPath2.Replace("\\", "/");
if (Dao.Save("sys.filegroup.save", finfos) > 0)
{
return NP.Model.Base.Files + fileFullPath2;
}
}
}
return "";
}
catch (Exception ex)
{
Logger.TryError(ex.Message, ex);
return "";
}
}
protected JsonResult SetFileNoDB(System.Web.HttpFileCollectionBase upFiles, String tablename)
{
try
{
var fcnt = upFiles.Count;
if (fcnt > 0)
{
var _month = DateTime.Now.ToString("yyyyMM");
if (!System.IO.Directory.Exists(Server.MapPath(string.Format(@"{0}{1}\{2}\{3}", NP.Model.Base.Files, "", tablename, _month))))
{
System.IO.Directory.CreateDirectory(Server.MapPath(string.Format(@"{0}{1}\{2}\{3}", NP.Model.Base.Files, "", tablename, _month)));
}
String files = "";
Int64 filelength = 0;
for (int i = 0; i < fcnt; i++)
{
filelength += upFiles[i].ContentLength;
string fileExt = System.IO.Path.GetExtension(upFiles[i].FileName.Split('\\').Last());
string fileFullPath = string.Format(@"\{0}\{1}\{2}_{3}{4}", tablename, _month, DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + SUserInfo.UserNo.ToString(),i, fileExt);
upFiles[i].SaveAs(Server.MapPath(NP.Model.Base.Files + fileFullPath));
files += ";" + Model.Base.Files + fileFullPath.Replace("\\", "/");
}
if (files != "")
{
System.Collections.Hashtable ht = new System.Collections.Hashtable() { };
ht.Add("uri", files.Substring(1));
return JsonObj