Views/Forms/HR/OnDutyTpl.ashx
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="OnDutyTpl" %>
using System;
using System.Web;
using MicroUserHelper;
using MicroAuthHelper;
using System.Data;
using System.Data.SqlClient;
using MicroDBHelper;
using MicroDTHelper;
using MicroPublicHelper;
public class OnDutyTpl : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
MicroAuth.CheckLogin();
string DeptIDs = context.Server.UrlDecode(context.Request.QueryString["DeptIDs"]),
StartDate = context.Server.UrlDecode(context.Request.QueryString["StartDate"]),
EndDate = context.Server.UrlDecode(context.Request.QueryString["EndDate"]),
UserObj= context.Server.UrlDecode(context.Request.QueryString["UserObj"]);
//DeptIDs = "85";
//StartDate = "2021-08-30";
//EndDate = "2021-09-05";
if (!string.IsNullOrEmpty(DeptIDs) && !string.IsNullOrEmpty(StartDate) && !string.IsNullOrEmpty(EndDate))
GetOnDutyTpl(DeptIDs, StartDate, EndDate, UserObj);
}
private void GetOnDutyTpl(string DeptIDs, string StartDate, string EndDate, string UserObj)
{
var getDateTimeDiff = MicroPublic.GetDateTimeDiff(StartDate, EndDate);
int TotalDays = getDateTimeDiff.TotalDays.toInt();
Boolean IsFormalEmployee = UserObj.toBoolean(); //判断是否仅下载正式员工
DataTable _dtInsert = new DataTable();
_dtInsert.Columns.Add("部门", typeof(string));
_dtInsert.Columns.Add("电脑ID", typeof(string));
_dtInsert.Columns.Add("姓名", typeof(string));
_dtInsert.Columns.Add("地点", typeof(string));
if (TotalDays > 0)
{
//*****(全局)得到节假日 日期Start*****
string _sql4 = "select * from CalendarDays where Invalid=0 and Del=0 and DayDate between @StartDay and @EndDay ";
SqlParameter[] _sp4 = {
new SqlParameter("@StartDay", SqlDbType.VarChar, 50),
new SqlParameter("@EndDay", SqlDbType.VarChar, 50),
};
_sp4[0].Value = StartDate.toDateFormat();
_sp4[1].Value = EndDate.toDateFormat();
DataTable _dt4 = MsSQLDbHelper.Query(_sql4, _sp4).Tables[0];
后面还有 153 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
