public bool Update(string empresaid, tb_plla_pdt_tabla16 BE) { //return tablaDA.Update(empresaid, BE); bool zreturn = tablaDA.Update(empresaid, BE); Sql_Error = tablaDA.Sql_Error; return zreturn; }
public DataSet GetAll_Consulta(string empresaid, tb_plla_pdt_tabla16 BE) { using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid))) { using (SqlCommand cmd = new SqlCommand("gspTbPllaPdtTabla16_CONSULTA", cnx)) { DataSet ds = new DataSet(); { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@tippagoid", string.IsNullOrEmpty(BE.tippagoid) ? (object)DBNull.Value : BE.tippagoid); } try { cnx.Open(); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { da.Fill(ds); } return ds; } catch (Exception ex) { Sql_Error = ex.Message; throw new Exception(ex.Message); } } } }
public DataSet GetAll(string empresaid, tb_plla_pdt_tabla16 BE) { using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid))) { using (SqlCommand cmd = new SqlCommand("gspTbPllaPdtTabla16_SEARCH", cnx)) { DataSet ds = new DataSet(); { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@tippagoid", SqlDbType.Char, 1).Value = BE.tippagoid; cmd.Parameters.Add("@tippagoname", SqlDbType.VarChar, 20).Value = BE.tippagoname; } try { cnx.Open(); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { da.Fill(ds); } return ds; } catch (Exception ex) { Sql_Error = ex.Message; throw new Exception(ex.Message); } } } }
public bool Delete(string empresaid, tb_plla_pdt_tabla16 BE) { using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid))) { using (SqlCommand cmd = new SqlCommand("gspTbPllaPdtTabla16_DELETE", cnx)) { { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@tippagoid", SqlDbType.Char, 1).Value = BE.tippagoid; } try { cnx.Open(); if (cmd.ExecuteNonQuery() > 0) { return true; } else { return false; } } catch (Exception ex) { Sql_Error = ex.Message; throw new Exception(ex.Message); } } } }
public DataSet GetOne(string empresaid, tb_plla_pdt_tabla16 BE) { //return tablaDA.GetOne(empresaid, tipoplla); DataSet xreturn = null; xreturn = tablaDA.GetOne(empresaid, BE); Sql_Error = tablaDA.Sql_Error; return xreturn; }
public DataSet GetAll_Consulta(string empresaid, tb_plla_pdt_tabla16 BE) { //return tablaDA.GetAll_Consulta(empresaid, BE); DataSet xreturn = null; xreturn = tablaDA.GetAll_Consulta(empresaid, BE); Sql_Error = tablaDA.Sql_Error; return xreturn; }
public void Llenar_cboTpago() { cboTpago.ValueMember = "tippagoid"; cboTpago.DisplayMember = "descripcion"; var BL = new tb_plla_pdt_tabla16BL(); var BE = new tb_plla_pdt_tabla16(); cboTpago.DataSource = BL.GetAll_Consulta(VariablesPublicas.EmpresaID, BE).Tables[0]; }