diff --git a/BO/Controllers/userController.cs b/BO/Controllers/userController.cs index 31d7cad..edc0538 100644 --- a/BO/Controllers/userController.cs +++ b/BO/Controllers/userController.cs @@ -57,9 +57,13 @@ namespace NP.BO.Controllers vm.Lects = new List() { }; vm.FileList = new List() { }; vm.CMPRs = new List() { }; + vm.Councels = new List() { }; + vm.ComCodes2 = GetComCodes("bldgcat"); if (vm.intval > 0) { vm.User = Dao.Get("users.users", new System.Collections.Hashtable() { { "userno", vm.intval } , { "includesysadmin", 1 } }).First(); + vm.Councel = new Councel() { }; + vm.Councels = Dao.Get("users.councels", new System.Collections.Hashtable() { { "userno", vm.intval } }); LogSet(new ActLog() { logtype = 20, logtarget = 21, logdata = vm.User.username + "("+vm.User.userid+")", userno = vm.User.userno, uno = SUserInfo.UserNo, uip = GetUserIP() }); if (vm.viewname == "user") { diff --git a/BO/Views/user/ur.cshtml b/BO/Views/user/ur.cshtml index 21db612..133dd02 100644 --- a/BO/Views/user/ur.cshtml +++ b/BO/Views/user/ur.cshtml @@ -293,41 +293,79 @@ 목록 - + + + @foreach (var item in Model.Councels) + { + + @item.rnorvt + @item.bldgcatname + @item.qtext + @item.atext + @item.cdtymdnlhms + @(item.coname) (@(item.coid)) + + } + + + +
 
+
+ 목록 +
+ +
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
@@ -346,15 +384,19 @@ { @Html.Partial("./Partial/Summernote") } + } @section scripts{ } diff --git a/BO/Views/user/us.cshtml b/BO/Views/user/us.cshtml index c944b9d..b2f963e 100644 --- a/BO/Views/user/us.cshtml +++ b/BO/Views/user/us.cshtml @@ -46,6 +46,7 @@ 핸드폰 상태 최근로그인 + 상담하기 입장 } else if (Model.viewname == "professor") @@ -83,6 +84,7 @@ else if (Model.viewname == "admin") @item.mobile @item.statusname @item.logintime.ToString("yy-MM-dd HH:mm") + [상담하기] [입장] } @@ -244,6 +246,11 @@ else if (Model.viewname == "admin") msg("업로드가 실패했습니다.


" + capResult.msg, null, true); } } - + + function gocouncel(no) { + setv("dform_intval", no); + $("#dform_tabidx").val(3); + $("#dform").attr("action","/user/@(Model.viewname)reg").submit(); + } } \ No newline at end of file diff --git a/BO/Web.config b/BO/Web.config index 86f6ba4..13face9 100644 --- a/BO/Web.config +++ b/BO/Web.config @@ -55,8 +55,8 @@ - - + + diff --git a/BO/obj/Debug/BO.csprojAssemblyReference.cache b/BO/obj/Debug/BO.csprojAssemblyReference.cache index 9b4ca0c..a7bdf91 100644 Binary files a/BO/obj/Debug/BO.csprojAssemblyReference.cache and b/BO/obj/Debug/BO.csprojAssemblyReference.cache differ diff --git a/Base/Controller/ACommonUser.cs b/Base/Controller/ACommonUser.cs index 7ffdadd..42f8b7f 100644 --- a/Base/Controller/ACommonUser.cs +++ b/Base/Controller/ACommonUser.cs @@ -216,6 +216,27 @@ namespace NP.Base.Controllers { return JsonOK(Dao.Save("users.exitjoin", new Hashtable() { { "usernos", usernos }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } + [HttpPost] + public JsonResult CouncelSave(VMUser vm) + { + vm.Councel.uno = SUserInfo.UserNo; vm.Councel.uip = GetUserIP(); + vm.Councel.userno = vm.intval2; + //수정 + if(vm.Councel.bno < 1) + { + Dao.Insert("councel.in", vm.Councel); + return JsonOK(vm.Councel.bno); + } + else + { + return JsonOK(Dao.Save("councel.up", vm.Councel)); + } + } + [HttpPost] + public JsonResult CouncelDel(int bno) + { + return JsonOK(Dao.Save("councel.del",new Hashtable(){ {"bno",bno },{"uno",SUserInfo.UserNo },{"uip",GetUserIP() } })); + } } } \ No newline at end of file diff --git a/Base/obj/Debug/Base.csprojAssemblyReference.cache b/Base/obj/Debug/Base.csprojAssemblyReference.cache index e8460a2..eff1ae4 100644 Binary files a/Base/obj/Debug/Base.csprojAssemblyReference.cache and b/Base/obj/Debug/Base.csprojAssemblyReference.cache differ diff --git a/Dao/DB/DB1.Scheme.txt b/Dao/DB/DB1.Scheme.txt index f970ce8..d6272c1 100644 --- a/Dao/DB/DB1.Scheme.txt +++ b/Dao/DB/DB1.Scheme.txt @@ -1479,5 +1479,6 @@ create table councel ( bldgcat smallint not null, qtext mediumtext DEFAULT NULL, atext mediumtext DEFAULT NULL, - ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL + isdel tinyint not null default 0, + cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL ,primary key(bno)); \ No newline at end of file diff --git a/Dao/MyBatis/Maps/User.xml b/Dao/MyBatis/Maps/User.xml index 915c356..33f6149 100644 --- a/Dao/MyBatis/Maps/User.xml +++ b/Dao/MyBatis/Maps/User.xml @@ -10,6 +10,7 @@ + @@ -686,6 +687,39 @@ ,snsid=#snsid# ,jointype=#jointype# where userno=#userno# + + + + + insert into councel(userno,bldgcat,qtext,atext,) + values (#userno#,#bldgcat#,#qtext#,#atext#,); + SELECT LAST_INSERT_ID() + + + + update councel set + ,bldgcat = #bldgcat# + ,qtext = #qtext# + ,atext = #atext# + where bno=#bno# + + + + update councel set + ,isdel = 1 + where bno = #bno# + diff --git a/Dao/obj/Debug/Dao.csprojAssemblyReference.cache b/Dao/obj/Debug/Dao.csprojAssemblyReference.cache index d0e4512..2cbd845 100644 Binary files a/Dao/obj/Debug/Dao.csprojAssemblyReference.cache and b/Dao/obj/Debug/Dao.csprojAssemblyReference.cache differ diff --git a/Model/Users.cs b/Model/Users.cs index bbc06ff..42b5b5b 100644 --- a/Model/Users.cs +++ b/Model/Users.cs @@ -1,4 +1,5 @@ using System; +using System.CodeDom; using System.Collections.Generic; using System.Text; namespace NP.Model @@ -660,4 +661,30 @@ namespace NP.Model } } + [Serializable] + public class Councel : BaseModel + { + /// + /// 상담번호 + /// + public int bno { get; set; } + /// + /// 구분 + /// + public int userno { get; set; } + /// + /// 질문 + /// + public String qtext { get; set; } + /// + /// 답변 + /// + public String atext { get; set; } + public int bldgcat { get; set; } + public String bldgcatname { get; set; } + public String coname{get; set;} + public String coid{get; set;} + + } + } diff --git a/Model/VMUser.cs b/Model/VMUser.cs index db04c31..0c0c005 100644 --- a/Model/VMUser.cs +++ b/Model/VMUser.cs @@ -22,6 +22,8 @@ namespace NP.Model public String ru { get; set; } public int userno { get; set; } public int pwcallno { get; set; } + public Councel Councel{get; set;} + public IList Councels{get; set;} }