protected void btnGuardarSub_Click(object sender, EventArgs e) { int orderId = Convert.ToInt32(lbl_IdSubItemN.Text); SubItemDao subDao = new SubItemDao(); if (subDao.updateSubItem(orderId, vigencia) == "Ok") { Alerta.Text = "Datos Modificados en forma Correcta"; Response.Redirect("MantenedorSubItem"); } else { Alerta.Text = subDao.updateSubItem(orderId, vigencia); } }
protected void btnGuardarSubItem_Click(object sender, EventArgs e) { Alerta.Enabled = true; String strManSubItemDescripcion = txtSubItem.Text; SubItemDao subDao = new SubItemDao(); if (subDao.insertSubItem(strManSubItemDescripcion) == "Ok") { Alerta.Text = "Se ha guardado correctamente"; Response.Redirect("MantenedorSubItem"); } else { Alerta.Text = subDao.insertSubItem(strManSubItemDescripcion); } }
private void LoadEditData(int orderId) { lblIdSubItem.Text = Convert.ToString(orderId); SubItemDao subDao = new SubItemDao(); DataSet ds = new DataSet(); da = subDao.getSubItemId(orderId); DataTable dt = new DataTable(); dt = subDao.getTableSubItemId(); foreach (DataRow row in dt.Rows) { lbl_IdSubItemN.Text = row[0].ToString(); txt_DescripcionSubItem.Text = row[1].ToString(); txt_VigenciaSubItem.Text = row[2].ToString(); } }
void getTableSubItem() { SubItemDao subDao = new SubItemDao(); DataSet ds = new DataSet(); da = subDao.getSubItem(); da.Fill(ds); this.GV_subitem.DataSource = ds; this.GV_subitem.DataBind(); }