신규 스케쥴 추가시 조회되지 않는 현상 수정
스케쥴 승인,1,2 기능 구현
This commit is contained in:
@@ -238,6 +238,34 @@ namespace Project
|
||||
}
|
||||
}
|
||||
|
||||
agi.HtmlDocument doc = new agi.HtmlDocument();
|
||||
doc.LoadHtml(contents);
|
||||
|
||||
//파일참조 태그를 모두 가져옴
|
||||
var tags_include = doc.QuerySelectorAll("include");
|
||||
foreach (var item in tags_include)
|
||||
{
|
||||
var filename = item.InnerText;
|
||||
|
||||
var load_file = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "View", filename.Replace("/", "\\"));
|
||||
load_file = load_file.Replace("\\\\", "\\");
|
||||
String fileContents;// = String.Empty;
|
||||
|
||||
Console.WriteLine("## " + item.OuterHtml);
|
||||
if (System.IO.File.Exists(load_file))
|
||||
{
|
||||
fileContents = System.IO.File.ReadAllText(load_file, System.Text.Encoding.UTF8);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileContents = string.Format("<div class=\"fg-red\">#include Error:nofile:{0}</div>",
|
||||
filename); //파일이없다면 해당 부분은 오류 처리한다.
|
||||
}
|
||||
contents = contents.Replace(item.OuterHtml, fileContents);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//콘텐츠내의 file 을 찾아서 처리한다. ; 정규식의 처리속도가 느릴듯하여, 그냥 처리해본다
|
||||
while (true)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace Project
|
||||
public class CustomerController : BaseController
|
||||
{
|
||||
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using Microsoft.Owin;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Project
|
||||
@@ -19,10 +21,100 @@ namespace Project
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
[HttpPost]
|
||||
public string Add(FormCollection tbpdate)
|
||||
{
|
||||
return "test";
|
||||
var vals = Request.GetQueryNameValuePairs();
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Add()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View("/jobreport/add");
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntitiesJobreport();
|
||||
var sd = DateTime.Now.ToString("yyyy-MM-01");
|
||||
var ed = DateTime.Now.ToShortDateString();
|
||||
var rows = db.vJobReportForUser.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == FCOMMON.info.Login.no && t.pdate.CompareTo(sd) >= 0 && t.pdate.CompareTo(ed) <= 1).OrderByDescending(t => t.pdate);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
|
||||
tbody.AppendLine($"<th scope='row'>{item.pdate.Substring(5)}</th>");
|
||||
tbody.AppendLine($"<td>{item.ww}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
|
||||
if (item.status == "진행 중" || item.status.EndsWith("%"))
|
||||
tbody.AppendLine($"<td class='table-info text-center'>{item.status}</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td class='text-center'>{item.status}</td>");
|
||||
|
||||
tbody.AppendLine($"<td>{item.type}</td>");
|
||||
tbody.AppendLine($"<td>{item.projectName}</td>");
|
||||
tbody.AppendLine($"<td>{item.hrs}</td>");
|
||||
tbody.AppendLine($"<td>{item.ot}</td>");
|
||||
|
||||
tbody.AppendLine("<td><span class='d-inline-block text-truncate' style='max-width: 150px;'>");
|
||||
tbody.AppendLine(item.description);
|
||||
tbody.AppendLine("</span></td>");
|
||||
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
||||
@@ -153,14 +153,13 @@ namespace Project.Dialog
|
||||
FCOMMON.info.Login.permission = 0;
|
||||
FCOMMON.info.Login.gpermission = int.Parse(gperm);
|
||||
|
||||
|
||||
using (var dbEnity = new EEEntitiesMain())
|
||||
{
|
||||
var drGrpUser = dbEnity.EETGW_GroupUser.Where(t => t.uid == userdr.id & t.gcode == gCode).FirstOrDefault();
|
||||
FCOMMON.info.Login.process = drGrpUser.Process;
|
||||
if (drGrpUser == null) FCOMMON.info.Login.process = (userdr.id == "dev" ? "개발자":"");
|
||||
else FCOMMON.info.Login.process = drGrpUser.Process;
|
||||
}
|
||||
|
||||
|
||||
//로그인정보 기록
|
||||
AddLoginInfo();
|
||||
|
||||
@@ -174,7 +173,6 @@ namespace Project.Dialog
|
||||
Util.MsgE("데이터베이스 조회 실패 다음 오류 메세지를 참고하세요.\n\n" + ex.Message + "\n\n증상이 동일 할 경우 서버가 접속가능한지 먼저 확인하세요");
|
||||
DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MakeAutoJobReport()
|
||||
@@ -222,9 +220,6 @@ namespace Project.Dialog
|
||||
"자동입력을 해제하려면 '업무일지-자동입력' 화면에서 내역을 변경하거나 종료일자를 설정하시기 바랍니다");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void AddLoginInfo()
|
||||
@@ -268,23 +263,6 @@ namespace Project.Dialog
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void label3_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
//var f = new Dialog.fSelectDept();
|
||||
//if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
//{
|
||||
// if (cmbDept.Items.Contains(f.deptName) == false)
|
||||
// cmbDept.Items.Add(f.deptName);
|
||||
// cmbDept.Text = f.deptName;
|
||||
//}
|
||||
}
|
||||
|
||||
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
FCOMMON.Util.RunExplorer("mailto:chikyun.kim@amkor.co.kr");
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Project._Common
|
||||
drGuser.level = 1;
|
||||
drGuser.uid = this.tbId.Text.Trim();
|
||||
drGuser.state = this.tbState.Text.Trim();
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
//drGuser.useJobReport = this.chkJobReport.Checked;
|
||||
drGuser.useUserState = this.chkUserSt.Checked;
|
||||
db.EETGW_GroupUser.Add(drGuser);
|
||||
@@ -168,6 +168,7 @@ namespace Project._Common
|
||||
drUser.gcode = gcode;
|
||||
drUser.level = 1;
|
||||
drUser.id = tbId.Text.Trim();
|
||||
drUser.password = "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C"; //기본값0
|
||||
|
||||
drUser.name = tbNameK.Text.Trim();
|
||||
drUser.nameE = tbNameE.Text.Trim();
|
||||
@@ -184,6 +185,7 @@ namespace Project._Common
|
||||
|
||||
else
|
||||
{
|
||||
if (drUser.password.isEmpty()) drUser.password = "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C";
|
||||
drUser.name = tbNameK.Text.Trim();
|
||||
drUser.nameE = tbNameE.Text.Trim();
|
||||
drUser.dept = this.tbDept.Text.Trim();
|
||||
|
||||
Reference in New Issue
Block a user