コード例 #1
0
    protected void ddlGradeClass_SelectedIndexChanged(object sender, EventArgs e)
    {
        string[] asYearsClassID = ddlGradeClass.SelectedValue.Split(',');
        short    iYears         = short.Parse(asYearsClassID[0]);
        int      iClassID       = int.Parse(asYearsClassID[1]);

        if (iYears == 999)
        { //是否為歷屆班級
            Se.siYearsSel                   = 0;
            Se.siGradeIDSel                 = HealthShareUtil.YearsToGradeID(0);
            Se.siClassIDSel                 = 0;
            ddlGradeClassGrad.Visible       = true;
            ddlGradeClassGrad.SelectedIndex = 0;
        }
        else
        {
            Se.siYearsSel             = iYears;                                 //學年
            Se.siGradeIDSel           = HealthShareUtil.YearsToGradeID(iYears); //不知道幹嘛的
            Se.siClassIDSel           = (short)iClassID;                        //班級
            ddlGradeClassGrad.Visible = false;
        }

        sYearsGradeClass = ddlGradeClass.SelectedItem.ToString();
        sGradeClassSel   = DMHealth.GradeClass(Se.siYearsSel, Se.siClassIDSel);

        if (AfterClassChange != null)//AfterClassChange 事件
        {
            AfterClassChange(this, e);
        }
    }
コード例 #2
0
    protected void btnReCover_Click(object sender, EventArgs e)
    {
        String sPID = gvSt.SelectedDataKey[0].ToString();

        String[] reGradAndClass = selectGradeClass.SelectedValue.Split(',');
        String   reSeat         = txtSeatNum.Text.Trim();

        if (!checkRecoverField())
        {
            return;
        }
        if (DMHealth.isSameGradeClassSeatInTable("St", reGradAndClass[0], reGradAndClass[1], reSeat))
        {
            ladRecoverHintMassage.Text = selectGradeClass.SelectedItem.Text + reSeat + "號已經存在!!\n請確認後再做設定!!";
            return;
        }
        DMHealth.DelRetentionRestoreSt(sPID, reGradAndClass[0], reGradAndClass[1], reSeat);//回復資料
        //確認學生基本資料表是否真的有回復成功,有的話會有回復班級提醒,沒有的話跳出"回復失敗"
        this.ClientScript.RegisterStartupScript(this.GetType(), "DuplicateSeatAlert", "alert('已回復至" +
                                                selectGradeClass.SelectedItem.Text +
                                                reSeat +
                                                "號。')", true);
        //changeGvView(true);
        changeDataRetentionUI(true);
        gvSt.DataSource = ods;//可以改
        gvSt.DataBind();
    }
コード例 #3
0
    protected void gvSt_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        string sPID = e.Keys["PID"].ToString();

        DMHealth.RemoveToStDataRetention(sPID);
        e.Cancel = true;
        gvSt.DataBind();
        e.Cancel = true;
    }
コード例 #4
0
 void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Se.siYearsSel = 0;//初始選單設定
         //ClassSel1.updateStatus();//初始選單設定
         DMHealth.ColumnSet(gvSt.Columns);
     }
 }
コード例 #5
0
 void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DMHealth.ColumnSet(gvSt.Columns);
         selectGradeClass.DataSourceID = "GradeClass_ods";
         selectGradeClass.DataBind();
     }
     labMessage.Visible = false;
     gvSt.DataSource    = ods;
 }
コード例 #6
0
    protected void ddlGradeClassGrad_SelectedIndexChanged(object sender, EventArgs e)
    {
        string[] asYearsClassID = ddlGradeClassGrad.SelectedValue.Split(',');
        short    iYears         = short.Parse(asYearsClassID[0]);
        int      iClassID       = int.Parse(asYearsClassID[1]);

        Se.siYearsSel   = iYears;
        Se.siGradeIDSel = HealthShareUtil.YearsToGradeID(iYears);
        Se.siClassIDSel = (short)iClassID;

        sYearsGradeClass = ddlGradeClassGrad.SelectedItem.ToString();           //年級班級
        sGradeClassSel   = DMHealth.GradeClass(Se.siYearsSel, Se.siClassIDSel); //年級(小一入學學年度)班級

        //AfterClassChange 事件
        if (AfterClassChange != null)
        {
            AfterClassChange(this, e);
        }
    }