Ejemplo n.º 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            int iSessionUserID = GetSessionUserID();
            if (lstRankList.SelectedValue != "0")
            {
                foreach (GridViewRow row in gvMenu.Rows)
                {
                    if (row.RowType == DataControlRowType.DataRow)
                    {
                        BLL_Infra_ShipSettings.Ins_Upd_Rank_Menu_Acess(UDFLib.ConvertIntegerToNull(gvMenu.DataKeys[row.RowIndex].Value.ToString())
                                                                       , Convert.ToInt32(DDLVessel.SelectedValue), Convert.ToInt32(lstRankList.SelectedValue)
                                                                       , Convert.ToInt32((((Label)row.FindControl("lblScreenID")).Text).ToString())
                                                                       , (((CheckBox)row.FindControl("chkMenu")).Checked == true) ? 1 : 0
                                                                       , (((CheckBox)row.FindControl("chkView")).Checked == true) ? 1 : 0
                                                                       , (((CheckBox)row.FindControl("chkAdd")).Checked == true) ? 1 : 0
                                                                       , (((CheckBox)row.FindControl("chkEdit")).Checked == true) ? 1 : 0
                                                                       , (((CheckBox)row.FindControl("chkDelete")).Checked == true) ? 1 : 0
                                                                       , (((CheckBox)row.FindControl("chkApprove")).Checked == true) ? 1 : 0
                                                                       , iSessionUserID);
                    }
                }
            }


            Load_Rank_Menu();
            lblMessage.Text = "Access rights has been saved.";
        }
        catch (Exception ex)
        {
        }
    }