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

📄 calcfee.aspx.cs

📁 asp.net 2.0的教务管理软件源码
💻 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;

public partial class Personal_CalcFee : System.Web.UI.Page
{
    decimal p;
    decimal q;
    DateTime d1;
    DateTime d2;
    int de_ID;
    LoginInfo My;
    protected void Page_Load(object sender, EventArgs e)
    {
        My = new LoginInfo(Session["LoginID"]);
        if (My.LoginID == 0) Response.Redirect("~/Signin.aspx");

        d1 = Convert.ToDateTime(Request["d1"]);
        d2 = Convert.ToDateTime(Request["d2"]);
        de_ID = Convert.ToInt32(Request["de_ID"]);
        lblCalcEmployee.Text = My.LoginName;
        panSign.Visible = IsPostBack;
        panFormula.Visible = !IsPostBack;
        lblStartDate.Text = d1.ToShortDateString();
        lblEndDate.Text = d2.ToShortDateString();
        lblCalcDate.Text = DateTime.Now.ToShortDateString();
        litDepartment.Text = DBExec.ExecGetObject("SELECT de_Name FROM J_Department WHERE de_ID="+de_ID).ToString();
    }

    protected void btnCalc_Click(object sender, EventArgs e)
    {
        try
        {
            p = Convert.ToDecimal(txtP.Text) / 100;
            q = Convert.ToDecimal(txtQ.Text) / 100;
        }
        catch 
        {
            return;
        }
        SqlDataSource1.SelectParameters[4] = new Parameter("p", TypeCode.Decimal, p.ToString());
        SqlDataSource1.SelectParameters[5] = new Parameter("q", TypeCode.Decimal, q.ToString());
     }
    protected void GridView1_DataBound(object sender, EventArgs e)
    {
        if (GridView1.Rows.Count > 0)
        {
            GridView1.Rows[GridView1.Rows.Count-1].Cells[1].Text = "合 计";
        }
    }
}

⌨️ 快捷键说明

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