Ejemplo n.º 1
0
    protected void ImgAdd_Click(object sender, EventArgs e)
    {
        this.SetFocus("ctl00_MainContent_txtJoiningType");
        HiddenFlag.Value = "Add";
        OperationMode    = "Add Joining Type";

        ClearField();

        DataTable dtPBill = new DataTable();

        dtPBill = objBLL.Get_JoiningType_PBillComponent(null);
        GVOffPBill.DataSource = dtPBill;
        GVOffPBill.DataBind();

        string JoiningType = String.Format("showModal('divadd',false);");

        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "JoiningType", JoiningType, true);
    }
Ejemplo n.º 2
0
    protected void onUpdate(object source, CommandEventArgs e)
    {
        HiddenFlag.Value = "Edit";
        OperationMode    = "Edit Joining Type";

        DataTable dt = new DataTable();

        dt = objBLL.Get_JoiningType_List(Convert.ToInt32(e.CommandArgument.ToString()));


        txtJoiningTypeID.Text              = dt.Rows[0]["ID"].ToString();
        txtJoiningType.Text                = dt.Rows[0]["Joining_Type"].ToString();
        txtJoiningCode.Text                = dt.Rows[0]["JCode"].ToString();
        chkSeniorityConsidered.Checked     = dt.Rows[0]["SeniorityConsidered"].ToString() == "True" ? true : false;
        chkVessselPBill_Considered.Checked = dt.Rows[0]["VesselPortageBillConsidered"].ToString() == "True" ? true : false;
        chkServiceConsidered.Checked       = dt.Rows[0]["ServiceConsidered"].ToString() == "True" ? true : false;
        chkPBillConsidered.Checked         = dt.Rows[0]["OfficePortageBillConsidered"].ToString() == "True" ? true : false;
        chkOperatorExp.Checked             = dt.Rows[0]["OperatorExpConsidered"].ToString() == "True" ? true : false;
        chkWatchKeeping.Checked            = dt.Rows[0]["WatchKeepingConsidered"].ToString() == "True" ? true : false;



        DataTable dtPBill = new DataTable();

        dtPBill = objBLL.Get_JoiningType_PBillComponent(Convert.ToInt32(e.CommandArgument.ToString()));
        GVOffPBill.DataSource = dtPBill;
        GVOffPBill.DataBind();

        string InfoDiv = "Get_Record_Information_Details('CRW_LIB_JOININGTYPES','ID=" + txtJoiningTypeID.Text + "')";

        ScriptManager.RegisterStartupScript(this, this.GetType(), "InfoDiv", InfoDiv, true);


        string AddSingoffReasonmodal = String.Format("showModal('divadd',false);" + (chkPBillConsidered.Checked == true ? "$('[id$=dvPBill]').toggle();" : ""));

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