Skip to content

Commit

Permalink
complete
Browse files Browse the repository at this point in the history
  • Loading branch information
yuseop-choung committed Jun 7, 2021
2 parents 78af6a4 + a4c0104 commit 3d2de45
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Server/Classes/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ public static bool Register(Employee employee)
// 일정
public static bool AddSchedule(Schedule schedule)
{

MySqlCommand cmd = new MySqlCommand(
"INSERT INTO schedule VALUES (@author, @title, @start, @end, @scope, @contents, @target);",
con);
using(MemoryStream ms = new MemoryStream())
using (MemoryStream ms = new MemoryStream())
{
MySqlParameter start = new MySqlParameter("@start", MySqlDbType.DateTime, (int)ms.Length);
MySqlParameter end = new MySqlParameter("@end", MySqlDbType.DateTime, (int)ms.Length);
Expand Down Expand Up @@ -166,10 +167,6 @@ public static bool AddSchedule(Schedule schedule)
public static List<Schedule> GetSchedule(Employee emp)
{
List<Schedule> schedules = new List<Schedule>();
string s1 = "회사 전체";
string s2 = "본부 전체";
string s3 = "팀 전체";
string s4 = "개인";

string sql = $"(SELECT * FROM schedule WHERE scope = '회사 전체')"
+ $" UNION (SELECT * FROM schedule WHERE scope = '본부 전체' AND target='{Filter(emp.central)}')"
Expand Down

0 comments on commit 3d2de45

Please sign in to comment.