protected void btnAdd_Click(object sender, EventArgs e) { OperationResult objOperationResult = new OperationResult(); typeofeepDto objtypeofeepDto = new typeofeepDto(); HistoryBL oHistoryBL = new HistoryBL(); if (Session["v_TypeofEEPId"] == null) { objtypeofeepDto.i_TypeofEEPId = int.Parse(ddlEpps.SelectedValue.ToString()); objtypeofeepDto.v_HistoryId = Session["v_HistoryId"].ToString(); objtypeofeepDto.r_Percentage = txtPorcentaje11.Text == ""? (float?)null :int.Parse(txtPorcentaje11.Text); oHistoryBL.AddTypeOfEEPP(ref objOperationResult, objtypeofeepDto, ((ClientSession)Session["objClientSession"]).GetAsList()); Session["v_TypeofEEPId"] = null; } else { objtypeofeepDto.v_TypeofEEPId = Session["v_TypeofEEPId"].ToString(); objtypeofeepDto.i_TypeofEEPId = int.Parse(ddlEpps.SelectedValue.ToString()); objtypeofeepDto.v_HistoryId = Session["v_HistoryId"].ToString(); objtypeofeepDto.r_Percentage = int.Parse(txtPorcentaje11.Text); oHistoryBL.UpdateTypeOfEEPP(ref objOperationResult, objtypeofeepDto, ((ClientSession)Session["objClientSession"]).GetAsList()); } ddlEpps.SelectedValue = "-1"; txtPorcentaje11.Text = ""; ActualizarGrilla(); }