⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aaaa.aspx.cs

📁 OA自动化办公系统,就是OA自动化办公系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using COM.OA.Entity;
using COM.OA.BLL;

public partial class wc_rlzy_aaaa : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
         users loginuser =Session["loginuser"] as COM.OA.Entity.users;
         if (loginuser == null)
         {
             this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
         }
         else
         {
             //通过登录人ID查询  
             //1 已经有 今天考勤不能继续添加 否则 可添加
             int id = loginuser.u_id;
             string where = "att_u_id=" + id;
             IList<attendance> ilist = attendanceBLL.Select(where);
             if (ilist.Count == 0)//没数据 跳转传2
             {
                 this.Response.Write(string.Format(GetRedirect.REDIRECT, "rlzy_zxkq.aspx?at=2"));
             }
             else
             {
                 List<attendance> list = (List<attendance>)ilist;
                 attendance at = new attendance();
                 at = list[0];
                 string time = DateTime.Now.ToString("yyyy-MM-dd");
                 string t = at.att_date.ToString("yyyy-MM-dd");
                 if (time.Equals(t))//如果最后一条记录日期与今天相同 跳转传1
                 {
                     this.Response.Write(string.Format(GetRedirect.REDIRECT, "rlzy_zxkq.aspx?at=1"));

                 }
                 else//如果最后一条记录日期与今天不相同 跳转传2
                 {
                     this.Response.Write(string.Format(GetRedirect.REDIRECT, "rlzy_zxkq.aspx?at=2"));

                 }
             }
         }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -