Пример #1
0
    protected void DLnotline_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        Label hl = new Label();

        hl = (Label)e.Item.FindControl("lbQname");
        Label lb = new Label();

        lb = (Label)e.Item.FindControl("LabelNnum");
        string jsstr = "notsg('" + lb.Text + "', '" + DDLgrade.SelectedValue + "', '" + Server.UrlEncode(hl.Text) + "');";

        hl.Attributes.Add("onclick", jsstr);

        string pp = LearnSite.Common.Photo.ExistStuPhoto(lb.Text);

        if (pp != "none")
        {
            lb.Attributes.Add("class", "tooltip");
            lb.ToolTip   = pp;
            lb.BackColor = Color.Bisque;
        }

        LearnSite.BLL.NotSign bll = new LearnSite.BLL.NotSign();
        string getnote            = bll.GetNoteToday(lb.Text);

        if (getnote.Trim() != "")
        {
            hl.ToolTip = getnote;
        }
        else
        {
            hl.ToolTip = "点击请给未签到备注";
        }
    }
Пример #2
0
    protected void BtnExcelNoSign_Click(object sender, EventArgs e)
    {
        int sgrade = Int32.Parse(DDLgrade.SelectedValue);
        int sclass = Int32.Parse(DDLclass.SelectedValue);
        int sterm  = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());

        LearnSite.BLL.NotSign nbll = new LearnSite.BLL.NotSign();
        nbll.NotSignExcel(sgrade, sclass, sterm);
    }
Пример #3
0
 private void showNotSign()
 {
     if (LearnSite.Common.CookieHelp.IsStudentLogin())
     {
         string mynum = cook.Snum;
         LearnSite.BLL.NotSign nbll = new LearnSite.BLL.NotSign();
         GVNoSign.DataSource = nbll.NotSignSnumdetail(mynum);
         GVNoSign.DataBind();
     }
 }
Пример #4
0
 private void showNotSign()
 {
     if (LearnSite.Common.CookieHelp.IsStudentLogin())
     {
         string mynum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();
         LearnSite.BLL.NotSign nbll = new LearnSite.BLL.NotSign();
         GVNoSign.DataSource = nbll.NotSignSnumdetail(mynum);
         GVNoSign.DataBind();
     }
 }
Пример #5
0
 private void Showdone()
 {
     if (Request.QueryString["Nnum"] != null)
     {
         string Nnum = Request.QueryString["Nnum"].ToString();
         LearnSite.BLL.NotSign bll = new LearnSite.BLL.NotSign();
         string Nnote = bll.GetNoteToday(Nnum);
         TextBox1.Text = Nnote;
         if (Nnote.Trim() != "")
         {
             Btnnotsign.Text = "修改";
         }
         else
         {
             Btnnotsign.Text = "添加";
         }
     }
 }
Пример #6
0
 protected void GVNoSign_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         int    Qyear              = Int32.Parse(Request.QueryString["Qyear"].ToString());
         int    Qmonth             = Int32.Parse(Request.QueryString["Qmonth"].ToString());
         int    Qday               = Int32.Parse(Request.QueryString["Qday"].ToString());
         string Nnum               = e.Row.Cells[1].Text;
         LearnSite.BLL.NotSign bll = new LearnSite.BLL.NotSign();
         string Nnote              = bll.GetNoteThisday(Nnum, Qyear, Qmonth, Qday);
         e.Row.Cells[10].Text = Nnote;
         //当鼠标放上去的时候 先保存当前行的背景颜色 并给附一颜色
         e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#E1E8E1',this.style.fontWeight='';");
         //当鼠标离开的时候 将背景颜色还原的以前的颜色
         e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor,this.style.fontWeight='';");
         //单击行改变行背景颜色
         e.Row.Attributes.Add("onclick", "this.style.backgroundColor='#D8E0D8'; this.style.color='buttontext';this.style.cursor='default';");
     }
 }
Пример #7
0
 protected void Btnnotsign_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["Nnum"] != null && TextBox1.Text.Trim() != "")
     {
         string Nnum = Request.QueryString["Nnum"].ToString();
         LearnSite.BLL.NotSign bll = new LearnSite.BLL.NotSign();
         if (bll.ExistsToday(Nnum))
         {
             //存在则更新
             bll.UpdateNote(Nnum, TextBox1.Text.Trim());
             Labelmsg.Text = "修改缺席备注成功!";
             System.Threading.Thread.Sleep(500);
         }
         else
         {
             //不存在则添加
             LearnSite.Model.NotSign model = new LearnSite.Model.NotSign();
             DateTime dt     = DateTime.Now;
             int      Nday   = dt.Day;
             int      Nmonth = dt.Month;
             int      Nyear  = dt.Year;
             model.Nnum   = Nnum;
             model.Ndate  = dt;
             model.Nday   = Nday;
             model.Nmonth = Nmonth;
             model.Nweek  = dt.DayOfWeek.ToString();
             model.Nyear  = Nyear;
             model.Nnote  = TextBox1.Text.Trim();
             model.Ngrade = Int32.Parse(Request.QueryString["Ngrade"].ToString());
             model.Nterm  = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
             int results = bll.Add(model);
             if (results > 0)
             {
                 Labelmsg.Text = "添加缺席备注成功!";
             }
             System.Threading.Thread.Sleep(500);
         }
     }
 }