Exemple #1
0
        protected void btnAddWeek_Click(object sender, EventArgs e)
        {
            WeekSumInfo wksum = new WeekSumInfo();

            wksum.Save();
            Response.Redirect("AddWeek.aspx?sumId=" + wksum.WeekSumId);
        }
Exemple #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            DateTime    date           = DateTime.Now;
            int         departid       = Convert.ToInt32(Session["DepartId"]);
            int         recvEmployeeId = Convert.ToInt32(DayInfo.getRecvEmployeeId(departid));
            int         wksumId        = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            WeekSumInfo wksum          = new WeekSumInfo(wksumId);

            wksum.IsApply        = 0;
            wksum.IsSend         = 1;
            wksum.ApplyTime      = date;
            wksum.RecvEmployeeId = recvEmployeeId;
            wksum.Save();
            gvwBind();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('发送成功!');</script>");
        }
Exemple #3
0
        protected void btnSaveWkSum_Click(object sender, EventArgs e)
        {
            int wksumid = Convert.ToInt32(Request["WeekSumId"].ToString());

            if (gvwDay.Rows.Count == 0)
            {
                DayInfo.DelWeekSum(wksumid);
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('周总结为空,已删除!');</script>");
            }
            else
            {
                WeekSumInfo wksum = new WeekSumInfo(wksumid);
                wksum.WeekSumName = txtSumName.Text.ToString();
                wksum.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('编辑成功!');</script>");
            }
            Response.Redirect("WeekApply.aspx");
        }
Exemple #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int         wksumid = Convert.ToInt32(Request["WeekSumId"].ToString());
            WeekSumInfo wksum   = new WeekSumInfo(wksumid);
            DateTime    time    = DateTime.Now;

            wksum.IsApply    = 1;
            wksum.RepplyTime = time;
            wksum.ApplyView  = txtView.Text.ToString();
            if (rblApprove.Items[0].Selected)
            {
                wksum.IsApprove = 0;
            }
            else if (rblApprove.Items[1].Selected)
            {
                wksum.IsApprove = 1;
            }
            wksum.Save();
            Response.Redirect("WeekApprove.aspx");
        }
Exemple #5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int wksumid = Convert.ToInt32(Request["sumId"].ToString());

            if (gvwDay.Rows.Count == 0)
            {
                DayInfo.DelWeekSum(wksumid);
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请添加日志');</script>");
            }
            else
            {
                int         emid  = Convert.ToInt32(Session["EmployeeId"]);
                WeekSumInfo wksum = new WeekSumInfo(wksumid);
                wksum.WeekSumName    = txtSumName.Text.ToString();
                wksum.SendEmployeeId = emid;
                wksum.IsSend         = 0;
                wksum.IsApply        = 0;
                wksum.IsApprove      = 0;
                wksum.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('添加成功');</script>");
            }
            Response.Redirect("WeekApply.aspx");
        }