using System; using System.Collections.Generic; using System.Text; namespace NP.Model { [Serializable] public class BaseModel { public string rootfolder { get { return Base.Files; } } public string rootfolder2 { get { return Base.Subjects; } } public Int64 fileno { get; set; } public Int64 fileno2 { get; set; } public Int64 filesize { get; set; } public String filesizename { get { return filesize > 1000 ? ((filesize / 1000).ToString("#,0") + "KB") : (filesize.ToString() + "Byte"); } } public DateTime filecdt { get; set; } public String fileurl { get; set; } public String fileurl2 { get; set; } public String orgname { get; set; } public String orgname2 { get; set; } public bool isfileext { get { return fileno > 0 && !string.IsNullOrEmpty(fileurl); } } public String filedata { get { return string.Format("{0}:{1}:{2}", fileno, rootfolder + (fileurl ?? ""), orgname); } } public String fullurl { get { return fileno > 0 ? (rootfolder + (fileurl ?? "")) : ""; } } public String fullurl2 { get { return fileno > 0 ? (rootfolder2 + (fileurl ?? "")) : ""; } } public String nourl { get { return "/content/img/loading-sm.gif"; } } public DateTime cdt { get; set; } public bool incdt(int indays) { return cdt.AddDays(indays) > DateTime.Now; } /// /// yyyy-MM-dd /// public String cdtymd{get{return this.cdt.ToString("yyyy-MM-dd");}} /// /// yyyy-MM-dd HH:mm /// public String cdtymdhm{get{return this.cdt.ToString("yyyy-MM-dd HH:mm");}} /// /// yyyy-MM-dd(ddd) /// public String cdtymdwd{get{return this.cdt.ToString("yyyy-MM-dd(ddd)", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR"));}} /// /// yyyy-MM-dd HH:mm:ss /// public String cdtymdhms{get{return this.cdt.ToString("yyyy-MM-dd HH:mm:ss");}} /// /// yyyy-MM-dd
HH:mm:ss ///
public String cdtymdbrhms{get{return this.cdt.ToString("yyyy-MM-dd
HH:mm:ss");}} /// /// yyyy-MM-dd\r\nHH:mm:ss /// public String cdtymdnlhms{get{return cdt.ToString("yyyy-MM-dd") + System.Environment.NewLine + cdt.ToString("HH:mm:ss");}} /// /// 생성한사람번호 /// public Int64 cno { get; set; } /// /// 생성한사람이름 /// public String cnoname { get; set; } public String cnoid { get; set; } public DateTime udt { get; set; } /// /// yyyy-MM-dd /// public String udtymd{get{return this.udt.ToString("yyyy-MM-dd");}} /// /// yy-MM-dd /// public String udtymd2 { get { return this.udt.ToString("yy-MM-dd"); } } /// /// yyyy-MM-dd HH:mm /// public String udtymdhm{get{return this.udt.ToString("yyyy-MM-dd HH:mm");}} /// /// yyyy-MM-dd(ddd) /// public String udtymdwd{get{return this.udt.ToString("yyyy-MM-dd(ddd)", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR"));}} public Int64 uno { get; set; } public String uip { get; set; } public int pagetotalcount { get; set; } public Int32 rno { get; set; } public Int32 rnorvt {get{return this.pagetotalcount - (rno - 1);}} /// /// 하위메뉴 갯수 /// public int ccount { get; set; } public String value { get; set; } public String refcode { get; set; } public String text { get; set; } /// /// 0: 사용안함, 1: 사용함 /// public int isuse { get; set; } /// /// 1: 사용함, 0: 사용안함 /// public String isusename{get{return this.isuse == 1 ? "사용함" : "사용안함";}} public String isuseyn { get { return this.isuse == 1 ? "Y" : "N"; } } ///// ///// ; 으로 분류된 파일번호 ///// //public String filenos { get; set; } //public String filenos2 { get; set; } ///// ///// 최초파일등록 시 다중파일 처리 시 FGNo를 통일 시키기위한 변수 (사용자번호:파일그룹시퀀스:yyyyMMddHHmmssfff) ///// //public String fgkey { get; set; } //public DateTime? date1 { get; set; } //public DateTime? date2 { get; set; } //public int intv1 { get; set; } //public int intv2 { get; set; } //public int intv3 { get; set; } //public Int64? longv1 { get; set; } //public Int64? longv2 { get; set; } //public Int64? longv3 { get; set; } //public double? dblv1 { get; set; } //public double? dblv2 { get; set; } //public double? dblv3 { get; set; } public String zstring0 { get; set; } public String zstring1 { get; set; } public String zstring2 { get; set; } //public String zstring3 { get; set; } //public String zstring4 { get; set; } //public String zstring5 { get; set; } //public String zstring6 { get; set; } //public String zstring7 { get; set; } //public String zstring8 { get; set; } //public String zstring9 { get; set; } //public String zstring10 { get; set; } //public String zstring11 { get; set; } //public String zstring12 { get; set; } //public String zstring13 { get; set; } //public String zstring14 { get; set; } //public String zstring15 { get; set; } //public String zstring16 { get; set; } //public String zstring17 { get; set; } //public String zstring18 { get; set; } //public String zstring19 { get; set; } public String zstring20 { get; set; } //public String zstringsum { get; set; } public String GetCR(String v){return (v ?? "").Replace(System.Environment.NewLine, "
");} public IList arrstring {get;set;} /// /// 사용자유형 관리자(31: 컨설턴트, 32: DB담당, 33: 회계담당, 34: 통합관리자), 사용자(1: 내부회원, 2: 스크랩회원, 3: 홈페이지회원, 4: 명함, 5: 외부기관, 11: 인사담당자, 12: 회계담당자 ) /// protected String GetUserType(int usertype) { return usertype == 1 ? "교육생" : usertype == 11 ? "강사" : usertype == 81 ? "고객사관리자" : usertype == 91 ? "통합관리자" : usertype == 92 ? "일반관리자" : "-"; } public int? limit { get; set; } public String saveflag { get; set; } public String inquery { get; set; } public String upquery { get; set; } } [Serializable] public class JsonRtn { /// /// NP.Base.ENUM.JSONCode > 1000: 성공, 9999: 일반오류, 9998: 권한없음, 9997: 인증안됨 /// /// public Int64 code { get; set; } public object obj { get; set; } public String msg { get; set; } public String err { get; set; } } [Serializable] public class FindData : BaseModel { public String caption { get; set; } public String header { get; set; } public String data { get; set; } } [Serializable] public class ComCode : BaseModel { /// /// 공통코드 /// public int ccode { get; set; } /// /// 콩통코드명 /// public String cname { get; set; } /// /// 공통코드그룹키 /// public String cgroup { get; set; } /// /// 공통코드그룹명 /// public String cgroupname { get; set; } /// /// 상위공통코드(구로구: 서울) /// public int? pcode { get; set; } /// /// 상위공통코드명 (서울 : 구로구) /// public String pcodename { get; set; } /// /// 참고코드 /// public String refcode { get; set; } /// /// 순서 /// public int corder { get; set; } /// /// 공통코드설명 /// public String cremark { get; set; } public int issystem { get; set; } } [Serializable] public class Button { public NP.Model.ENUM.Buttons ButtonType { get; set; } public NP.Model.ENUM.ButtonSize ButtonSize { get; set; } public String Style { get; set; } public String OnClick { get; set; } public String Special { get; set; } /// /// 버튼라벨 /// public String Text { get; set; } /// /// cssClass /// public String CssClass { get; set; } } [Serializable] public class TextDic { /// /// name, id, id: name.replace('.', '_') /// public String Name { get; set; } /// /// 기본선택값 /// public String Value { get; set; } /// /// 기본값(기본값:기본텍스트) /// public String DF { get; set; } /// /// 클래스 /// public String CssClass { get; set; } /// /// 조작함수 /// public String OnChange { get; set; } public String Style { get; set; } public String Special { get; set; } public String PH { get; set; } public bool IsReadOnly { get; set; } } [Serializable] public class SelectDic { /// /// name, id, id: name.replace('.', '_') /// public String Name { get; set; } /// /// 기본선택값 /// public String Selected { get; set; } /// /// 기본값(기본값:기본텍스트) /// public String DF { get; set; } /// /// 클래스 /// public String CssClass { get; set; } /// /// 조작함수 /// public String OnChange { get; set; } public String Special { get; set; } } [Serializable] public class InputRadio { public IList ComCodes { get; set; } public String Name { get; set; } public NP.Model.ENUM.Special? Special { get; set; } public String ListData { get; set; } public String Selected { get; set; } public String OnChange { get; set; } public String ChangeId { get; set; } } [Serializable] public class Select { public IList ComCodes { get; set; } public String Name { get; set; } public NP.Model.ENUM.Special? Special { get; set; } public String Selected { get; set; } public String OnChange { get; set; } public String DefaultValue {get;set;} public String DefaultText { get; set; } public String CssClass { get; set; } public String Style { get; set; } /// /// optionvalue:optiontext;optionvalue:optiontext /// public String ListData { get; set; } } [Serializable] public class DateTimeBox { public String Name { get; set; } public String Value { get; set; } public String Id { get; set; } } [Serializable] public class DateBox { public String Name { get; set; } public String Value { get; set; } } [Serializable] public class EditorApi { public String Name { get; set; } public String Style { get; set; } public int Row { get; set; } public String Data { get; set; } } [Serializable] public class FileApi { public String Name { get; set; } public bool IsMultiple { get; set; } public String InitImgs { get; set; } /// /// generic, image, text, office, html, video, audio, pdf, flash, object, other /// http://plugins.krajee.com/file-input/plugin-options /// public String FileType { get; set; } /// /// fgno:fileno:filename /// public String ItemInfo { get; set; } /// /// jpg;png... /// public String Exts { get; set; } public int Idx { get; set; } public bool ReadOnly { get; set; } public bool IsSaveSingle { get; set; } public String UploadData { get; set; } public String FnUpload { get; set; } public String FnDeleted { get; set; } public String FnDeleteBefore { get; set; } public String FnFileSelected { get; set; } public Int64 Fgno { get; set; } public Int64 FNo { get; set; } /// /// ; 으로 분류된 파일번호 /// public String FileNos { get; set; } public bool HidePreview { get; set; } } [Serializable] public class File : BaseModel { public Int64 fgno { get; set; } public String tablename { get; set; } /// /// 사용한테이블.컬럼명.[키] /// public String columnname { get; set; } //public Int64 FileNo { get; set; } //public String OrgName { get; set; } //public String FileUrl { get; set; } //public int FileSize { get; set; } public String extension { get; set; } public bool isimage { get { return "GIF,JPG,PNG".Contains(this.extension.ToUpper()); } } public int dcount { get; set; } public IList Files { get; set; } public String usernocallback { get; set; } } [Serializable] public class Comment : BaseModel { public Int64 cmtno { get; set; } /// /// 0: order, 1: resume /// public Int64? cmttype { get; set; } public Int64? pcmtno { get; set; } public int cdepth { get; set; } public Int64? tcmtno { get; set; } public int haschild { get; set; } public Int64? baseno { get; set; } public String username { get; set; } /// /// resume(1: 전화, 2: 메일, 3: 면접, 4: 방문, 9: 기타) /// public String memotype { get; set; } public String memo { get; set; } public Int64? fgno { get; set; } public int isdel { get; set; } public int cmtcount { get; set; } } public class Data : BaseModel { public int dtype { get; set; } public int intval { get; set; } public int intval2 { get; set; } public int intval3 { get; set; } public int intval4 { get; set; } public int intval5 { get; set; } public int intval6 { get; set; } public int intval7 { get; set; } public int intval8 { get; set; } public int intval9 { get; set; } public int intval10 { get; set; } public int intval11 { get; set; } public int intval12 { get; set; } public int intval13 { get; set; } public int intval14 { get; set; } public int intval15 { get; set; } public int intval16 { get; set; } public int intval17 { get; set; } public int intval18 { get; set; } public int intval19 { get; set; } public int intval20 { get; set; } public int intval21 { get; set; } public int intval22 { get; set; } public int intval23 { get; set; } public int intval24 { get; set; } public int intval25 { get; set; } public int intval26 { get; set; } public int intval27 { get; set; } public int intval28 { get; set; } public int intval29 { get; set; } public int intval30 { get; set; } public int intvaletc { get; set; } public int intvaletc2 { get; set; } public String strval { get; set; } public String strval2 { get; set; } public String strval3 { get; set; } public String strval4 { get; set; } public String strval5 { get; set; } public String strval6 { get; set; } public String strval7 { get; set; } public String strval8 { get; set; } public String strval9 { get; set; } public String strval10 { get; set; } public Int64 longval { get; set; } public Int64 longval2 { get; set; } public Int64 longval3 { get; set; } public Int64 longval4 { get; set; } public Int64 longval5 { get; set; } public Int64 longval6 { get; set; } public Int64 longval7 { get; set; } public Int64 longval8 { get; set; } public Int64 longval9 { get; set; } public Int64 longval10 { get; set; } public Int64 longval11 { get; set; } public Int64 longval12 { get; set; } public DateTime time { get; set; } public DateTime time2 { get; set; } public DateTime time3 { get; set; } public DateTime time4 { get; set; } public DateTime time5 { get; set; } public DateTime time6 { get; set; } } //public class Data //{ // public int DataType { get; set; } // public int KeyNo { get; set; } // public int IntVal0 { get; set; } // public int IntVal1 { get; set; } // public int IntVal2 { get; set; } // public int IntVal3 { get; set; } // public int IntVal4 { get; set; } // public int IntVal5 { get; set; } // public int IntVal6 { get; set; } // public int IntVal7 { get; set; } // public int IntVal8 { get; set; } // public int IntVal9 { get; set; } // public int IntVal10 { get; set; } // public int IntVal11 { get; set; } // public int IntVal12 { get; set; } // public int IntVal13 { get; set; } // public int IntVal14 { get; set; } // public int IntVal15 { get; set; } // public int IntVal16 { get; set; } // public int IntVal17 { get; set; } // public int IntVal18 { get; set; } // public int IntVal19 { get; set; } // public int IntVal20 { get; set; } // public Int64 Total { get; set; } // public Int64 Total2 { get; set; } // public Int64 LongVal0 { get; set; } // public Int64 LongVal1 { get; set; } // public Int64 LongVal2 { get; set; } // public Int64 LongVal3 { get; set; } // public Int64 LongVal4 { get; set; } // public Int64 LongVal5 { get; set; } // public Int64 LongVal6 { get; set; } // public Int64 LongVal7 { get; set; } // public Int64 LongVal8 { get; set; } // public Int64 LongVal9 { get; set; } // public Int64 LongVal10 { get; set; } // public Int64 LongVal11 { get; set; } // public Int64 LongVal12 { get; set; } // public Int64 LongVal13 { get; set; } // public Int64 LongVal14 { get; set; } // public Int64 LongVal15 { get; set; } // public Int64 LongVal16 { get; set; } // public Int64 LongVal17 { get; set; } // public Int64 LongVal18 { get; set; } // public Int64 LongVal19 { get; set; } // public Int64 LongVal20 { get; set; } // public String StringVal1 { get; set; } // public String StringVal2 { get; set; } // public String StringVal3 { get; set; } // public String StringVal4 { get; set; } // public String StringVal5 { get; set; } // public String StringVal6 { get; set; } // public String StringVal7 { get; set; } // public String StringVal8 { get; set; } // public String StringVal9 { get; set; } // public String StringVal10 { get; set; } // public int RNO { get; set; } // public DateTime? DateVal1 { get; set; } // public IList Datas { get; set; } // public Int64 AdminNo { get; set; } // public String AdminName { get; set; } // public int Month{ get; set; } // public int Year { get; set; } // public String OrderBy { get; set; } // public Int64 GetLongByIndex(int idx) // { // switch (idx) // { // case 0:return LongVal0; // case 1: return LongVal1; // case 2: return LongVal2; // case 3: return LongVal3; // case 4: return LongVal4; // case 5: return LongVal5; // case 6: return LongVal6; // case 7: return LongVal7; // case 8: return LongVal8; // case 9: return LongVal9; // case 10: return LongVal10; // case 11: return LongVal11; // case 12: return LongVal12; // case 13: return LongVal13; // case 14: return LongVal14; // case 15: return LongVal15; // case 16: return LongVal16; // case 17: return LongVal17; // case 18: return LongVal18; // case 19: return LongVal19; // case 20: return LongVal20; // } // return 0; // } // public Int64 GetIntByIndex(int idx) // { // switch (idx) // { // case 0: return IntVal0; // case 1: return IntVal1; // case 2: return IntVal2; // case 3: return IntVal3; // case 4: return IntVal4; // case 5: return IntVal5; // case 6: return IntVal6; // case 7: return IntVal7; // case 8: return IntVal8; // case 9: return IntVal9; // case 10: return IntVal10; // case 11: return IntVal11; // case 12: return IntVal12; // case 13: return IntVal13; // case 14: return IntVal14; // case 15: return IntVal15; // case 16: return IntVal16; // case 17: return IntVal17; // case 18: return IntVal18; // case 19: return IntVal19; // case 20: return IntVal20; // } // return 0; // } //} }