udpate login.html

This commit is contained in:
backuppc
2025-07-10 14:36:05 +09:00
parent 43526a26ec
commit 26cb328f8f
31 changed files with 866 additions and 543 deletions

View File

@@ -39,23 +39,43 @@ namespace Project.Web.Controllers
}
[HttpGet]
public HttpResponseMessage GetUserGroups()
{
var dt = DBM.GetUserGroups();
var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
});
var resp = new HttpResponseMessage()
{
Content = new StringContent(
txtjson,
System.Text.Encoding.UTF8,
"application/json")
};
return resp;
}
[HttpGet]
public HttpResponseMessage GetholyUser()
{
var sql = string.Empty;
sql = $"select uid,cate,sdate,edate,HolyReason " +
$"from EETGW_HolydayRequest " +
$"where gcode = '{FCOMMON.info.Login.gcode}'" +
$"and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()";
if (info.Login.gcode == null)
info.Login.gcode = "EET1P";
sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode);
sql = $" select uid,cate,sdate,edate,HolyReason,Users.name " +
$" from EETGW_HolydayRequest INNER JOIN " +
$" Users ON EETGW_HolydayRequest.uid = Users.id " +
$" where EETGW_HolydayRequest.gcode = @gcode" +
$" and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()";
//sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode);
var cs = Properties.Settings.Default.gwcs;// "Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D!";
var cn = new System.Data.SqlClient.SqlConnection(cs);
var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
cmd.Parameters.AddWithValue("gcode", FCOMMON.info.Login.gcode);
var da = new System.Data.SqlClient.SqlDataAdapter(cmd);
var dt = new System.Data.DataTable();
da.Fill(dt);
@@ -77,10 +97,9 @@ namespace Project.Web.Controllers
};
return resp;
}
[HttpGet]
public HttpResponseMessage Index()
{