public ActionResult GetAppointments(int doctorId, int patientId, [FromBody] DateBody dateFilter = null) { try { var result = userService.GetAppointments(doctorId, patientId, dateFilter?.DateStart, dateFilter?.DateStart); return(Ok(result)); } catch (Exception ex) { logger.LogError(ex, ""); throw; } }
public ActionResult CreateAppointment([FromBody] DateBody dateFilter, int doctorId, int patientId) { try { var result = userService.InsertAppointment(doctorId, patientId, dateFilter.DateStart, dateFilter.DateEnd); return(Ok(result)); } catch (Exception ex) { logger.LogError(ex, ""); throw; } }
public void GetTable(int year, int month) { int days = DateTime.DaysInMonth(year, month);//这个月有多少天 DateTime st = Convert.ToDateTime(year + "-" + month + "-01"); DateTime myst = new DateTime(); DataTable dt = null; if (UserID > 0) { dt = signBll.SelUserByMonth(st, UserID); } else { dt = signBll.SelUserByMonth(st, B_User_Plat.GetLogin().UserID); } int first = (int)st.DayOfWeek, index = 0; //日期标识,当前进行到了多少天 for (int i = 1; i <= 7; i++) //首周需要特殊处理 { Literal lit = DateBody.FindControl("Rep_W1_D" + i) as Literal; if (i < first) { lit.Text = GetEmptyHtml(st.AddDays(i - first)); } else { myst = st.AddDays(index); lit.Text = GetHtml(GetOneDay(dt, myst), myst); index++; } } for (int w = 2; w <= 5; w++) //第二周开始循环处理 { for (int i = 1; i <= 7; i++) //周内日循环 { Literal lit = DateBody.FindControl("Rep_W" + w + "_D" + i) as Literal; myst = st.AddDays(index); if (myst.Month > month) { lit.Text = GetEmptyHtml(myst); } else { lit.Text = GetHtml(GetOneDay(dt, myst), myst); } index++; } } }