Example #1
0
    protected void btnSaveFleet_Click(object sender, EventArgs e)
    {
        if (HiddenFlag.Value == "Add")
        {
            int Res = objBLL.INSERT_New_Fleet(txtFleetName.Text, UDFLib.ConvertToInteger(ddlFleet_Vessel_Manager.SelectedValue), txtSuptdEmail.Text, txtTechTeamEmail.Text
                                              , UDFLib.ConvertToInteger(Session["USERID"].ToString()));
        }
        else
        {
            int Res = objBLL.Update_Fleet(Convert.ToInt32(txtFleetID.Text), txtFleetName.Text, UDFLib.ConvertToInteger(ddlFleet_Vessel_Manager.SelectedValue), txtSuptdEmail.Text, txtTechTeamEmail.Text
                                          , UDFLib.ConvertToInteger(Session["USERID"].ToString()));
        }

        BindFleet();

        string hidemodal = String.Format("hideModal('divadd')");

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