Exemplo n.º 1
0
    protected void btnSaveAndCloseSchedule_Click(object sender, EventArgs e)
    {
        int Evaluation_ID = UDFLib.ConvertToInteger(ddlEvaluations.SelectedValue);
        int RankID        = (GridView_NotSelected.SelectedIndex >= 0) ? UDFLib.ConvertToInteger(GridView_NotSelected.SelectedValue) : UDFLib.ConvertToInteger(GridView_Selected.SelectedValue);

        int Ret = Update_Evaluation_Planning();

        if (Ret == 1)
        {
            int chkStatus = 0;
            if (chkOffice.Checked == true)
            {
                chkStatus = 1;
                BLL_Crew_Evaluation.INSERT_EvaluationLocation(Evaluation_ID, UDFLib.ConvertToInteger(ddlEvaluator.SelectedValue), UDFLib.ConvertToInteger(txtNotify.Text), GetSessionUserID(), chkStatus);
            }
            else
            {
                chkStatus = 0;
                BLL_Crew_Evaluation.INSERT_EvaluationLocation(Evaluation_ID, -1, UDFLib.ConvertToInteger(txtNotify.Text), GetSessionUserID(), chkStatus);
            }

            string js = "alert('Evaluation Planning Updated.');closeDiv('dvEvaluationScheduling');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "SaveAndClose", js, true);
        }
    }
Exemplo n.º 2
0
    protected void btnSaveSchedule_Click(object sender, EventArgs e)
    {
        int Evaluation_ID = UDFLib.ConvertToInteger(ddlEvaluations.SelectedValue);
        int RankID        = (GridView_NotSelected.SelectedIndex >= 0) ? UDFLib.ConvertToInteger(GridView_NotSelected.SelectedValue) : UDFLib.ConvertToInteger(GridView_Selected.SelectedValue);

        int Ret = Update_Evaluation_Planning();

        if (Ret == 1)
        {
            string js1 = "alert('Evaluation Planning Updated.');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alert1", js1, true);

            Bind_Evaluation_Ranks(Evaluation_ID);

            if (GridView_Selected.Rows.Count > 0)
            {
                GridView_Selected.SelectedIndex = GridView_Selected.DataKeys.IndexOf(RankID);
                Load_MonthsAndRules_ForRank(RankID);
            }
            //  if (chkOffice.Checked == true)
            //{
            int chkStatus = 0;
            if (chkOffice.Checked == true)
            {
                chkStatus = 1;
                BLL_Crew_Evaluation.INSERT_EvaluationLocation(Evaluation_ID, UDFLib.ConvertToInteger(ddlEvaluator.SelectedValue), UDFLib.ConvertToInteger(txtNotify.Text), GetSessionUserID(), chkStatus);
            }
            else
            {
                chkStatus = 0;
                BLL_Crew_Evaluation.INSERT_EvaluationLocation(Evaluation_ID, -1, UDFLib.ConvertToInteger(txtNotify.Text), GetSessionUserID(), chkStatus);
            }

            // }
        }
    }