/**Escribede un objeto de la clase CIndice*/ public void EscribeIndicePrimario(CIndice indPri) { BinaryWriter bw; bw = getBw(); bw.BaseStream.Seek(indPri.getDirInd(), SeekOrigin.Begin); bw.Write(indPri.getTipoInd()); bw.Write(indPri.getTamIndPri()); bw.Write(indPri.getIndPrim()); bw.Write(indPri.getSigInd()); bw.Write(indPri.getCabBloques()); bw.Write(indPri.getDirInd()); }
/**Se obtiene el Id de un indice primario*/ public string dameIndPri(CIndice ind) { string cad = null; switch (ind.getTipoInd()) { case 3://Tipo Entero cad = BitConverter.ToInt32(ind.getIndPrim(), 0).ToString(); break; case 5://Clave primaria de tipo Long cad = BitConverter.ToInt64(ind.getIndPrim(), 0).ToString(); break; case 7://Tipo cadena char []car = new char[1]; car[0] = (char)ind.getIndPrim()[0]; cad = new string(car); break; } return (cad); }