public clientCompositeType GetClientById(int iIdClient) { clientCompositeType et = new clientCompositeType(); //try //{ param = new SqlParameter[1]; param[0] = new SqlParameter("@fiid_client", SqlDbType.Int); param[0].Value = iIdClient; DataTable dt = objDB.ExecStore("sp_getClientById", param); et.iIdClient = int.Parse(dt.Rows[0].ItemArray[0].ToString()); et.sDescription = dt.Rows[0].ItemArray[1].ToString(); et.bStatus = bool.Parse(dt.Rows[0].ItemArray[2].ToString()); return(et); //} //catch (Exception ex) //{ // throw ex.Message(); //} }
/// <summary> /// Obtiene todos los Tipos de Cambio /// </summary> /// <returns></returns> public List <clientCompositeType> getAll() { List <clientCompositeType> lst = new List <clientCompositeType>(); //try //{ DataTable dt = objDB.Consult("sp_selectClient"); foreach (DataRow dr in dt.Rows) { clientCompositeType et = new clientCompositeType(); et.iIdClient = int.Parse(dr.ItemArray[0].ToString()); et.sDescription = dr.ItemArray[1].ToString(); et.bStatus = bool.Parse(dr.ItemArray[2].ToString()); lst.Add(et); } return(lst); //} //catch (Exception ex) //{ // throw ex.Message(); //} }