Ejemplo n.º 1
0
    protected void btnSaveProgram_Click(object sender, EventArgs e)
    {
        string msgmodal;

        if (UDFLib.ConvertToInteger(txtDuration.Text) <= 0 && UDFLib.ConvertIntegerToNull(ddlProgramCategory.SelectedValue) != 4)
        {
            msgmodal = String.Format("alertm('dur')");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", msgmodal, true);
            return;
        }
        string lProgramType = "VESSELTRAINING";

        if (rdbVideo.Checked)
        {
            lProgramType = "JIBETRAINING";
        }
        hdfProgramCategory.Value = ddlProgramCategory.SelectedValue;
        hdfProgram_Id.Value      = BLL_LMS_Training.Ins_Program_Details(UDFLib.ConvertIntegerToNull(hdfProgram_Id.Value), UDFLib.ConvertIntegerToNull(ddlProgramCategory.SelectedValue), txtProgramName.Text.Trim(), txtProgramDescription.Text.Trim(), UDFLib.ConvertIntegerToNull(txtDuration.Text.Trim()), lProgramType, Convert.ToInt32(Session["USERID"]), 1).ToString();
        BindItemTreeView();
        if (UDFLib.ConvertIntegerToNull(hdfProgram_Id.Value) != null)
        {
            btnNewChapter.Visible = true;
        }
        ddlProgramCategory.Enabled = false;
        msgmodal = String.Format("alertm('sav')");
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", msgmodal, true);
    }
Ejemplo n.º 2
0
    protected void btnNewChapter_Click(object sender, EventArgs e)
    {
        if (UDFLib.ConvertToInteger(txtDuration.Text) <= 0 && UDFLib.ConvertIntegerToNull(ddlProgramCategory.SelectedValue) != 4)
        {
            string msgmodal = String.Format("alertm('dur')");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", msgmodal, true);
            return;
        }

        if (UDFLib.ConvertToInteger(hdfProgram_Id.Value) == 0)
        {
            string lProgramType = "VESSELTRAINING";
            if (rdbVideo.Checked)
            {
                lProgramType = "JIBETRAINING";
            }

            hdfProgramCategory.Value = ddlProgramCategory.SelectedValue;
            hdfProgram_Id.Value      = BLL_LMS_Training.Ins_Program_Details(null, UDFLib.ConvertIntegerToNull(ddlProgramCategory.SelectedValue), txtProgramName.Text.Trim(), txtProgramDescription.Text.Trim(), UDFLib.ConvertIntegerToNull(txtDuration.Text.Trim()), lProgramType, Convert.ToInt32(Session["USERID"]), 1).ToString();
        }

        String msgretv = String.Format("OpenPopupWindowBtnID('POP__ChapterDetails', 'Chapter Details','LMS_Chapter_Details.aspx?Chapter_ID=&Program_ID=" + hdfProgram_Id.Value + "&ProgramCategory=" + UDFLib.ConvertIntegerToNull(ddlProgramCategory.SelectedValue) + "', 'popup', 840, 1000, null, null, false, false, true, false,'" + btnSearch.ClientID + "')");

        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgret6v", msgretv, true);
    }