public int uspINS_TAREO(BE_TAREO oBESOl) { try { return(new DA_TAREO().uspINS_TAREO(oBESOl)); } catch (Exception ex) { throw ex; } }
public int uspINS_TAREO(BE_TAREO oBESOl) { object[] Parametros = new[] { (object)UC_FormWeb.mSQLFieldOrNull(oBESOl.IDE_TAREO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBESOl.FECHA, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBESOl.IDE_LOTE, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBESOl.HRS, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBESOl.IDE_PERSONA, tgSQLFieldType.TEXT), }; return(Convert.ToInt32(new Util().ExecuteScalar("uspINS_TAREO", Parametros))); }
//protected void ddllote_SelectedIndexChanged(object sender, EventArgs e) //{ // datosLotes(); //} //protected void datosLotes() //{ // BL_TAREO xobj = new BL_TAREO(); // DataTable dtResul = new DataTable(); // dtResul = xobj.uspSEL_LOTE_POR_ID(ddllote.SelectedValue); // if (dtResul.Rows.Count > 0) // { // HdCodigo.Value = dtResul.Rows[0]["IDE_LOTE"].ToString(); // txtHrs.Text = dtResul.Rows[0]["TARIFA_X_HORA"].ToString(); // } // else // { // HdCodigo.Value = string.Empty; // txtHrs .Text = string.Empty; // } //} protected void btnGuardar_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; if (ddllote.SelectedIndex == 0) { cleanMessage = "Seleccionar Lote"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtHrs.Text == string.Empty) { cleanMessage = "Ingresar horas de trabajo"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (ddlPersona.SelectedIndex == 0) { cleanMessage = "Seleccionar Personal"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtFecha.Text == string.Empty) { cleanMessage = "Ingresar fecha de trabajo"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { BE_TAREO oBESol = new BE_TAREO(); oBESol.IDE_TAREO = Convert.ToInt32(string.IsNullOrEmpty(HdCodigo.Value) ? "0" : HdCodigo.Value); oBESol.FECHA = txtFecha.Text; oBESol.IDE_LOTE = Convert.ToInt32(ddllote.SelectedValue); oBESol.HRS = Convert.ToDecimal(txtHrs.Text); oBESol.IDE_PERSONA = Convert.ToInt32(ddlPersona.SelectedValue); int rpta; rpta = new BL_TAREO().uspINS_TAREO(oBESol); if (rpta > 0) { tareos(); txtHrs.Text = string.Empty; cleanMessage = "Registro exitoso"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { cleanMessage = "No se puede cargar más archivo"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } } }