public void CRE_Detalle_Expediente(SqlCommand comando, MOD_Detalle_Expediente obj) { try { string sp = "SP_CRE_Detalle_Expediente"; comando.CommandType = CommandType.StoredProcedure; comando.CommandText = sp; comando.Parameters.Clear(); comando.Parameters.Add(new SqlParameter("@DEX_ID_EXPEDIENTE", SqlDbType.Int)); comando.Parameters.Add(new SqlParameter("@DEX_ID_CENTRO_ATENCION", SqlDbType.Int)); comando.Parameters.Add(new SqlParameter("@DEX_FECHA", SqlDbType.Date)); comando.Parameters.Add(new SqlParameter("@DEX_PESO", SqlDbType.Decimal)); comando.Parameters.Add(new SqlParameter("@DEX_LONGITUD", SqlDbType.Decimal)); comando.Parameters.Add(new SqlParameter("@DEX_ID_ARTICULO", SqlDbType.Int)); comando.Parameters.Add(new SqlParameter("@DEX_CANTIDAD", SqlDbType.Decimal)); comando.Parameters[0].Value = obj.DEX_id_expediente; comando.Parameters[1].Value = obj.DEX_id_centro_atencion; comando.Parameters[2].Value = obj.DEX_fecha; comando.Parameters[3].Value = obj.DEX_peso; comando.Parameters[4].Value = obj.DEX_longitud; comando.Parameters[5].Value = obj.DEX_id_articulo; comando.Parameters[6].Value = obj.DEX_cantidad; comando.ExecuteNonQuery(); } catch (Exception exc) { throw exc; } }
public MOD_Detalle_Expediente SEL_Grid_By_Id_Detalle_Expediente(SqlCommand comando, int codigo_linea, int codigo_expediente, int codigo_centro) { try { string sp = "SP_SEL_GRID_BY_ID_Detalle_Expediente"; comando.CommandType = CommandType.StoredProcedure; comando.CommandText = sp; comando.Parameters.Clear(); comando.Parameters.Add(new SqlParameter("@DEX_ID_LINEA", SqlDbType.Int)); comando.Parameters.Add(new SqlParameter("@DEX_ID_EXPEDIENTE", SqlDbType.Int)); comando.Parameters.Add(new SqlParameter("@DEX_ID_CENTRO_ATENCION", SqlDbType.Int)); comando.Parameters[0].Value = codigo_linea; comando.Parameters[1].Value = codigo_expediente; comando.Parameters[2].Value = codigo_centro; IDataAdapter da = new SqlDataAdapter((SqlCommand)comando); DataSet ds = new DataSet(); da.Fill(ds); DataTable dt = ds.Tables[0]; MOD_Detalle_Expediente obj = new MOD_Detalle_Expediente(); for (int i = 0; i < dt.Rows.Count; i++) { obj.DEX_id_linea = Convert.ToInt32(dt.Rows[i]["DEX_ID_LINEA"]); obj.DEX_id_expediente = Convert.ToInt32(dt.Rows[i]["DEX_ID_EXPEDIENTE"]); obj.DEX_fecha = dt.Rows[i]["DEX_FECHA"].ToString(); obj.DEX_peso = Convert.ToDecimal(dt.Rows[i]["DEX_PESO"]); obj.DEX_longitud = Convert.ToDecimal(dt.Rows[i]["DEX_LONGITUD"]); obj.DEX_id_centro_atencion = Convert.ToInt32(dt.Rows[i]["DEX_ID_CENTRO_ATENCION"]); obj.DEX_id_articulo = Convert.ToInt32(dt.Rows[i]["DEX_ID_ARTICULO"]); obj.DEX_cantidad = Convert.ToDecimal(dt.Rows[i]["DEX_CANTIDAD"]); obj.ART_descripcion = dt.Rows[i]["ART_DESCRIPCION"].ToString(); obj.UND_descripcion = dt.Rows[i]["UND_DESCRIPCION"].ToString(); } return obj; } catch (Exception exc) { throw exc; } }
public void UPD_Detalle_Expediente(MOD_Detalle_Expediente obj) { try { LOG_Detalle_Expediente Logica = new LOG_Detalle_Expediente(); Logica.UPD_Detalle_Expediente(obj); } catch (Exception ) { throw ; } }
public Boolean CRE_Detalle_Expediente(MOD_Detalle_Expediente obj) { try { LOG_Detalle_Expediente Logica = new LOG_Detalle_Expediente(); Logica.CRE_Detalle_Expediente(obj); return true; } catch (Exception ) { return false; throw ; } }