Views/Stats/General.ashx

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ WebHandler Language="C#" Class="General" %>

using System;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using MicroDBHelper;
using MicroDTHelper;

public class General : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";

        string flag = "This tips.",
                Action = context.Server.UrlDecode(context.Request.QueryString["action"]),
                MID = context.Server.UrlDecode(context.Request.QueryString["mid"]),
                Type = context.Server.UrlDecode(context.Request.QueryString["type"]),
                StartDate = context.Server.UrlDecode(context.Request.QueryString["startdate"]),
                EndDate = context.Server.UrlDecode(context.Request.QueryString["enddate"]);

        //Type = "Test";
        //StartDate = "2021-10-13"; //DateTime.Now.toDateFormat("yyyy-MM-dd");
        //EndDate = "2021-10-13"; //DateTime.Now.ToString("yyyy-MM-dd");

        if (!string.IsNullOrEmpty(StartDate) && !string.IsNullOrEmpty(EndDate))
            flag = GetOvertimeMeal(Type, StartDate, EndDate);

        context.Response.Write(flag);
    }


    private string GetOvertimeMeal(string Location, string StartDate, string EndDate)
    {
        string flag = string.Empty,
                TotalData = string.Empty,
                MealData = string.Empty,
                DutyData = string.Empty,
               QueryFieldsStr = string.Empty;

        int Meal0 = 0,
                Meal1 = 0,
                Meal2 = 0,
                Meal3 = 0,
                Meal4 = 0;

        if (!string.IsNullOrEmpty(Location))
        {
            Location = Location.toStringTrim();
            QueryFieldsStr = " and Location='" + Location + "'";
        }

        //*****************统计加班就餐Start********************
        DataTable _dt = MicroDataTable.GetDataTable("OvertimeMeal");
        if (_dt != null && _dt.Rows.Count > 0)
        {
            for (int i = 0; i < _dt.Rows.Count; i++)
            {
后面还有 150 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。